Commit 1118f7dc authored by zhangyanni's avatar zhangyanni

友情链接改成动态的

parent 068d6041
...@@ -1072,6 +1072,11 @@ const router = new Router({ ...@@ -1072,6 +1072,11 @@ const router = new Router({
component: resolve => require(['views/categorypage/category.vue'], resolve).catch(routerUtils.catchImport), component: resolve => require(['views/categorypage/category.vue'], resolve).catch(routerUtils.catchImport),
meta: {title: '项目分类'} meta: {title: '项目分类'}
}, },
{
path: '/addFriendLink',
component: resolve => require(['views/friendLink/pages/add.vue'], resolve).catch(routerUtils.catchImport),
meta: {title: '添加友情链接'}
},
] ]
}, },
//需要登录的 //需要登录的
......
import api from '../../api/api';
import Qs from 'qs';
export default {
//友情链接
addFriendLinkAxios(url, params) {
return api.fetchPost(url, params);
},
//编辑友情链接单个数据
getActivityLink(params) {
return api.fetchGet("/base/website/getWebsitePartner?id=" + params);
},
//友情链接排序
changeSort(params) {
return api.fetchPost("/base/website/changeWebsitePartnerSort", params);
},
//友情链接列表
getActivityLinkList() {
return api.fetchGet("/base/website/getWebsitePartnerList");
},
//删除友情链接
removeLink(params) {
return api.fetchGet("/base/website/removeWebsitePartner?id=" + params);
},
}
<template>
<div class="soutform loginedWrapper">
<div class="breadcrumb">
<el-breadcrumb separator="/">
<el-breadcrumb-item
:to="{ path: publicFun.isgetUserRoleFunc(5)?'/salerequire/list':publicFun.isgetUserRoleFunc(2)?'/projectdynamics':'/litemlist' }">
{{$t("releasejson.wrkbench")}}
</el-breadcrumb-item>
<el-breadcrumb-item>友情链接</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="contentPadding">
<el-form :inline="true">
<el-form-item>
<el-button type="primary" @click="friendLinkVisible = true">添加友情链接</el-button>
</el-form-item>
</el-form>
<el-table :data="tableData" tooltip-effect="dark" class="projectTable2">
<el-table-column :label="$t('releasejson.numberin')" type="index" width="70" align="center">
</el-table-column>
<el-table-column label="企业logo" align="center" width="150">
<template slot-scope="scope">
<img :src="scope.row.partnerLogo" alt="" style="width: 88px;height: 45px;object-fit: contain;">
</template>
</el-table-column>
<el-table-column label="企业名称">
<template slot-scope="scope">
<el-tooltip placement="top" effect="light">
<div slot="content" style="width: 200px;">{{scope.row.partnerName}}</div>
<p class="dwwo-2">{{scope.row.partnerName}}</p>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="网站URL">
<template slot-scope="scope">
<el-tooltip placement="top" effect="light">
<div slot="content" style="width: 200px;">{{scope.row.partnerUrl}}</div>
<p class="dwwo-2">{{scope.row.partnerUrl}}</p>
</el-tooltip>
</template>
</el-table-column>
<el-table-column :label="$t('listjson.action')" width="120" align='center'>
<template slot-scope="scope">
<el-button type="text" @click="handleEdit(scope.row)">编辑</el-button>
<el-button type="text" @click="handleRemove(scope.row)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="排序" width="120" align='center'>
<template slot-scope="scope">
<el-button :disabled="scope.$index===0" type="text" @click="moveUp(scope.$index,scope.row)">上移
</el-button>
<el-button :disabled="scope.$index===(tableData.length-1)" type="text"
@click="moveDown(scope.$index,scope.row)">下移
</el-button>
</template>
</el-table-column>
<template slot="empty">
<i class="iconfont icon-hezi501 datai"></i>
<p class="datap">{{$t('listjson.notfoundyet')}}</p>
</template>
</el-table>
</div>
<el-dialog title="友情链接" :visible.sync="friendLinkVisible" :append-to-body="true" :close-on-click-modal="false"
@close="closeSensor" width="700px" class="dialogWrap">
<el-form label-position="right" label-width="120px" :model="friendLinkData" :rules="rules"
ref="friendLinkData" style="margin:0 100px 0 60px">
<el-form-item label="企业logo:" ref="guestimg" prop="partnerLogo">
<p class="imgTitle">仅支持PNG,JPG,JPEG,最大不超过400K;</p>
<div class="uploadImg">
<up-img :actionUrl="'/base/upload/uploadOriginalImg'" @dataEvent_size="dataEventSize" @dataEvent="backimg" :iseventPartner="true" :channelPic="friendLinkData.partnerLogo" :upmax="0.4"></up-img>
<!--<uploadCmpt :title="$t('commonTitle.pictureCropper')" @postErrorText="postErrorText"-->
<!--:hasLogo="true" :limit="1" :channelPic="friendLinkData.partnerLogo"-->
<!--@postFormData="postFormData" @postFormItem="postFormItem" :autoCropWidth="88"-->
<!--:autoCropHeight="45" :portionWidth="2" :imageSize="0.4">-->
<!--</uploadCmpt>-->
</div>
<div class="errorTitle">
<span class="errorText" v-if="isShowErrorText1">{{$t("workPlace.basicForm.emptyLogo")}}</span>
<span class="errorText" v-if="isShowErrorText2">{{$t("personalAuth.errorformatCard")}}</span>
<span class="errorText" v-if="isShowErrorText3">{{$t("personalAuth.errorSizeCard")}}</span>
<span class="errorText" v-if="isShowErrorText4">{{$t("personalAuth.uploadingCard")}}</span>
<span class="errorText" v-if="isShowErrorText5">{{$t("personalAuth.errorExceedCard")}}</span>
</div>
</el-form-item>
<el-form-item label="企业名称:" prop="partnerName">
<el-input v-model="friendLinkData.partnerName" maxlength="40" placeholder="请输入企业名称"></el-input>
</el-form-item>
<el-form-item label="网站URL:" prop="partnerUrl">
<el-input v-model="friendLinkData.partnerUrl" maxlength="150" placeholder="请输入网站URL"></el-input>
</el-form-item>
<el-row style="padding-top: 20px;text-align: center">
<el-button type="primary" :disabled="disabledFlag>0" @click="addPartner"> 保存</el-button>
<el-button @click="closeSensor">取 消</el-button>
</el-row>
</el-form>
</el-dialog>
</div>
</template>
<script>
import api from '../api';
import upImg from '../../publishactivity/upimg'
import uploadCmpt from '../../../components/common/uploadCoverCmpt';
export default {
name: "add",
components: {
upImg,
uploadCmpt
},
data() {
return {
isdataEventSize: false,
friendLinkVisible: false,
tableData: [],
friendLinkData: {
partnerLogo: "",
partnerName: "",
partnerUrl: ""
},
rules: {
partnerName: [{required: true, message: '请输入企业名称', trigger: 'blur'}],
partnerLogo: [{required: true, message: '请上传企业logo', trigger: 'blur'}],
},
isShowErrorText1: false,
isShowErrorText2: false,
isShowErrorText3: false,
isShowErrorText4: false,
isShowErrorText5: false,
disabledFlag:0,
flag: 0,
}
},
methods: {
dataEventSize(state) {
this.isdataEventSize = state;
},
//校验必填图片
requiredImgFunc(){
if (this.flag == 0) {
this.isShowErrorText1 = true;
this.isShowErrorText2 = false;
this.isShowErrorText3 = false;
this.isShowErrorText4 = false;
this.isShowErrorText5 = false;
return false;
} else if (this.flag == 1) {
this.isShowErrorText4 = true;
this.isShowErrorText1 = false;
this.isShowErrorText2 = false;
this.isShowErrorText3 = false;
this.isShowErrorText5 = false;
return false;
} else {
this.isShowErrorText1 = false;
this.isShowErrorText2 = false;
this.isShowErrorText3 = false;
this.isShowErrorText4 = false;
this.isShowErrorText5 = false;
}
},
addPartner() {
this.$refs.friendLinkData.validate((valid) => {
if (valid) {
var that = this;
if(this.disabledFlag==0){
this.disabledFlag++;
let url = this.friendLinkData.id ? '/base/website/editWebsitePartner' : '/base/website/addWebsitePartners';
api.addFriendLinkAxios(url, this.friendLinkData).then(response => {
if (response.code == 0) {
this.friendLinkVisible = false;
this.$message.success(this.friendLinkData.id ? '保存成功' : '添加成功');
this.activityLinkList();
setTimeout(function(){
that.disabledFlag = 0;
return false;
},1000)
} else {
this.$message.error(response.msg);
setTimeout(function(){
that.disabledFlag = 0;
return false;
},1000)
}
})
.catch(error => {
console.log("提交出错");
setTimeout(function(){
that.disabledFlag = 0;
return false;
},1000)
return false;
});
}else {
setTimeout(function(){
that.disabledFlag = 0;
return false;
},1000)
}
}
});
},
postErrorText(data, errorData) {
this.flag = data;
if (errorData == 0) {
this.isShowErrorText1 = false;
this.isShowErrorText2 = false;
this.isShowErrorText3 = false;
this.isShowErrorText4 = false;
this.isShowErrorText5 = false;
}
if (errorData == 1) {
this.isShowErrorText1 = true;
this.isShowErrorText2 = false;
this.isShowErrorText3 = false;
this.isShowErrorText4 = false;
this.isShowErrorText5 = false;
}
if (errorData == 2) {
this.isShowErrorText1 = false;
this.isShowErrorText2 = true;
this.isShowErrorText3 = false;
this.isShowErrorText4 = false;
this.isShowErrorText5 = false;
}
if (errorData == 3) {
this.isShowErrorText1 = false;
this.isShowErrorText2 = false;
this.isShowErrorText3 = true;
this.isShowErrorText4 = false;
this.isShowErrorText5 = false;
}
if (errorData == 4) {
this.isShowErrorText1 = false;
this.isShowErrorText2 = false;
this.isShowErrorText3 = false;
this.isShowErrorText4 = true;
this.isShowErrorText5 = false;
}
if (errorData == 5) {
this.isShowErrorText1 = false;
this.isShowErrorText2 = false;
this.isShowErrorText3 = false;
this.isShowErrorText4 = false;
this.isShowErrorText5 = true;
}
},
postFormItem(data) {
if (data) {
let urlArr = [];
if (data.length > 0) {
urlArr = data.map((item, index, arr) => {
return item.url;
})
}
this.friendLinkData.partnerLogo = urlArr;
} else this.friendLinkData.partnerLogo = "";
},
postFormData(data) {
let urlArr = [];
if (data.length > 0) {
urlArr = data.map((item, index, arr) => {
return item.url;
})
}
if (urlArr.length > 1) this.friendLinkData.partnerLogo = urlArr;
else this.friendLinkData.partnerLogo = urlArr[0];
// if(this.limit>1){
// var arr = [];
// arr.push(data);
// console.log(arr)
// }else{
// this.ruleForm.companyLogoUrl = data;
// }
},
//上移
moveUp(index, row) {
var that = this;
if (index > 0) {
let upDate = that.tableData[index - 1];
that.tableData.splice(index - 1, 1);
that.tableData.splice(index, 0, upDate);
that.getmoveSortlist();
} else {
alert('已经是第一条,不可上移');
}
},
//下移
moveDown(index, row) {
var that = this;
if ((index + 1) === that.tableData.length) {
alert('已经是最后一条,不可下移');
} else {
let downDate = that.tableData[index + 1];
that.tableData.splice(index + 1, 1);
that.tableData.splice(index, 0, downDate);
that.getmoveSortlist();
}
},
//排序
getmoveSortlist() {
let num = 0;
for (let i in this.tableData) {
this.tableData[i].sort = ++num;
}
;
api.changeSort(this.tableData).then(response => {
if (response.code == 0) {
} else {
this.$message.error(response.msgCode);
}
this.activityLinkList();
})
.catch(error => {
console.log("提交出错");
return false;
});
},
//图片
backimg(url) {
this.friendLinkData.partnerLogo = url;
this.$refs.guestimg.clearValidate();
},
guestimg(url) {
this.friendLinkData.partnerLogo = url;
this.$refs.guestimg.clearValidate();
},
//添加弹框关闭
closeSensor() {
this.friendLinkVisible = false;
this.$refs['friendLinkData'].resetFields();
this.friendLinkData = {};
this.isShowErrorText1 = this.isShowErrorText2 = this.isShowErrorText3 = this.isShowErrorText4 = this.isShowErrorText5 = false;
},
handleEdit(row) {
api.getActivityLink(row.id).then(response => {
if (response.code == 0) {
this.friendLinkVisible = true;
this.friendLinkData = response.result;
} else {
this.$message.error(response.msg);
}
})
.catch(error => {
console.log("提交出错");
return false;
});
},
handleRemove(row) {
this.$confirm('是否确认删除', {
cancelButtonText: '取消',
confirmButtonText: '确认',
type: '',
customClass: 'deleteConfirm'
}).then(() => {
api.removeLink(row.id).then(response => {
if (response.code == 0) {
this.$message.success('删除成功');
this.activityLinkList();
} else {
this.$message.error(response.msg);
}
})
.catch(error => {
console.log("提交出错");
return false;
});
}).catch(() => {
});
},
activityLinkList() {
api.getActivityLinkList().then(response => {
if (response.code == 0) {
this.tableData = response.result;
} else {
this.$message.error(response.msg);
}
})
.catch(error => {
console.log("提交出错");
return false;
});
},
},
mounted() {
this.activityLinkList();
}
}
</script>
<style scoped lang="scss">
.errorTitle {
span.errorText {
position: absolute;
color: #ff4949;
font-size: 12px;
line-height: 1;
padding-top: 6px;
}
}
</style>
\ No newline at end of file
import api from '../../../api/api'; import api from '../../../api/api';
import Qs from 'qs'; import Qs from 'qs';
const baseUrl = "/business"; const baseUrl = "/business";
export default { export default {
//获取banner数据 //获取banner数据
getCountAxios(params){ getCountAxios(params) {
return api.fetchGet(baseUrl+"/index/getIndexCount"); return api.fetchGet(baseUrl + "/index/getIndexCount");
}, },
//获取首页推荐文章信息 //获取首页推荐文章信息
getIndexTopNArticle(params){ getIndexTopNArticle(params) {
return api.fetchGet(baseUrl+"/index/getIndexTopNArticle?count="+params); return api.fetchGet(baseUrl + "/index/getIndexTopNArticle?count=" + params);
}, },
//获取首页推荐行业报告 //获取首页推荐行业报告
getIndexBaseReport(params){ getIndexBaseReport(params) {
return api.fetchGet(baseUrl+"/index/getIndexBaseReport?count="+params); return api.fetchGet(baseUrl + "/index/getIndexBaseReport?count=" + params);
}, },
//获取首页推荐话题 //获取首页推荐话题
getIndexBaseTopic(params){ getIndexBaseTopic(params) {
return api.fetchGet(baseUrl+"/index/getIndexBaseTopic?count="+params); return api.fetchGet(baseUrl + "/index/getIndexBaseTopic?count=" + params);
}, },
//获取域名 //获取域名
selectBasicParams( ) { selectBasicParams() {
return api.fetchLogin( '/base/tools/selectBasicParams'); return api.fetchLogin('/base/tools/selectBasicParams');
}, },
//行业报告下载链接 //行业报告下载链接
getDownloadUrl (params){ getDownloadUrl(params) {
return api.fetchLoadingGet('/business/report/getDownloadUrl?reportId=' +params); return api.fetchLoadingGet('/business/report/getDownloadUrl?reportId=' + params);
}, },
//获取首页推荐活动 //获取首页推荐活动
getIndexBaseActivity(params,notInIds){ getIndexBaseActivity(params, notInIds) {
return api.fetchGet(baseUrl+"/index/getIndexBaseActivity?count="+params+"&notInIds="+notInIds); return api.fetchGet(baseUrl + "/index/getIndexBaseActivity?count=" + params + "&notInIds=" + notInIds);
}, },
//获取首页话题 //获取首页话题
selectIndexPcHotTopicList( params ) { selectIndexPcHotTopicList(params) {
return api.fetchLogin( '/business/topic/selectIndexPcHotTopicList',params); return api.fetchLogin('/business/topic/selectIndexPcHotTopicList', params);
}, },
//获取首页话题竞猜讨论 //获取首页话题竞猜讨论
selectIndexPcHotDiscussList( params ) { selectIndexPcHotDiscussList(params) {
return api.fetchLogin( '/business/topic/selectIndexPcHotDiscussList',params); return api.fetchLogin('/business/topic/selectIndexPcHotDiscussList', params);
}, },
//获取首页推荐公司展示信息 //获取首页推荐公司展示信息
getCompanyInfoAxios(params){ getCompanyInfoAxios(params) {
return api.fetchGet(baseUrl+"/index/getIndexTopNBusiness?count="+params); return api.fetchGet(baseUrl + "/index/getIndexTopNBusiness?count=" + params);
}, },
//获取首页最新动态信息 //获取首页最新动态信息
getActiveInfoAxios(params){ getActiveInfoAxios(params) {
return api.fetchGet(baseUrl+"/index/getIndexTopNMessage"); return api.fetchGet(baseUrl + "/index/getIndexTopNMessage");
}, },
//获取首页推荐项目展示信息 //获取首页推荐项目展示信息
getProjectInfoAxios(params){ getProjectInfoAxios(params) {
return api.fetchGet(baseUrl+"/index/getIndexTopNProject?count="+params); return api.fetchGet(baseUrl + "/index/getIndexTopNProject?count=" + params);
}, },
//获取首页合作案例展示信息 //获取首页合作案例展示信息
getCooperationCaseAxios(params){ getCooperationCaseAxios(params) {
return api.fetchGet(baseUrl+"/index/getIndexTopNPurpose"); return api.fetchGet(baseUrl + "/index/getIndexTopNPurpose");
}, },
//左侧菜单导航栏 //左侧菜单导航栏
getLeftNavAxios(params){ getLeftNavAxios(params) {
return api.fetchGet("/base/function/getPermissionFunctions"); return api.fetchGet("/base/function/getPermissionFunctions");
}, },
//获取左侧菜单统计 //获取左侧菜单统计
getLeftBannerAxios(){ getLeftBannerAxios() {
return api.fetchGet(baseUrl+"/search/getBusinessAndProjectCount") return api.fetchGet(baseUrl + "/search/getBusinessAndProjectCount")
}, },
//退出登录 //退出登录
logoutAxios(params){ logoutAxios(params) {
return api.fetchPost("/base/login/out"); return api.fetchPost("/base/login/out");
}, },
//混合搜索 //混合搜索
mixSearchAxios(params){ mixSearchAxios(params) {
return api.fetchLoadingPost("/business/search/search?"+Qs.stringify(params)); return api.fetchLoadingPost("/business/search/search?" + Qs.stringify(params));
}, },
//微信登录 //微信登录
wechatLoginAxios(params){ wechatLoginAxios(params) {
return api.fetchLogin("/base/login/wxWebLogin",Qs.stringify(params)); return api.fetchLogin("/base/login/wxWebLogin", Qs.stringify(params));
}, },
//pc微信登录 //pc微信登录
pcLoginAxios(params){ pcLoginAxios(params) {
return api.fetchLogin("/base/login/wxOpenLogin",Qs.stringify(params)); return api.fetchLogin("/base/login/wxOpenLogin", Qs.stringify(params));
}, },
//获取PC首页热门内容 //获取PC首页热门内容
getIndexHotContent (){ getIndexHotContent() {
return api.fetchLoadingGet('/business/index/getIndexHotContent'); return api.fetchLoadingGet('/business/index/getIndexHotContent');
}, },
//获取PC首页热门内容 //获取PC首页热门内容
selectHomeGuessList (params){ selectHomeGuessList(params) {
return api.fetchLogin('/base/guess/selectHomeGuessList',params); return api.fetchLogin('/base/guess/selectHomeGuessList', params);
}, },
//竞猜排行 //竞猜排行
selectGuessLeaderboardList (params){ selectGuessLeaderboardList(params) {
return api.fetchLogin('/base/guess/selectGuessLeaderboardList',Qs.stringify(params)); return api.fetchLogin('/base/guess/selectGuessLeaderboardList', Qs.stringify(params));
}, },
//获取活动介绍 //获取活动介绍
getFirstStageFunc(params){ getFirstStageFunc(params) {
return api.fetchLoadingLogin("/business/subject/activity?"+Qs.stringify(params)) return api.fetchLoadingLogin("/business/subject/activity?" + Qs.stringify(params))
}, },
//获取专题数量 //获取专题数量
getSubjectNumAxios(){ getSubjectNumAxios() {
return api.fetchLogin("/business/subject/selectSubjectActivityIndex") return api.fetchLogin("/business/subject/selectSubjectActivityIndex")
}, },
//埋点 //埋点
maiDianAxios(params){ maiDianAxios(params) {
return api.fetchLogin("/business/log/activityLog",params); return api.fetchLogin("/business/log/activityLog", params);
}, },
//获取当前访问前缀 //获取当前访问前缀
getDocumentAxios(){ getDocumentAxios() {
return api.fetchLogin('/base/tools/selectBasicParams'); return api.fetchLogin('/base/tools/selectBasicParams');
}, },
//获取开机报 //获取开机报
getNoticeImgAxios(params){ getNoticeImgAxios(params) {
return api.fetchLogin("/base/tools/selectOpenShow?showType="+params) return api.fetchLogin("/base/tools/selectOpenShow?showType=" + params)
}, },
//获取轮播图 //获取轮播图
getSwiperImgAxios(params){ getSwiperImgAxios(params) {
return api.fetchLogin("/base/tools/selectSliderShow?showType="+params) return api.fetchLogin("/base/tools/selectSliderShow?showType=" + params)
}, },
getArticleListAxios(params){ getArticleListAxios(params) {
return api.fetchGet("/business/index/getIndexTopNArticle?"+Qs.stringify(params)) return api.fetchGet("/business/index/getIndexTopNArticle?" + Qs.stringify(params))
}, },
//获取中文首页数据混排 //获取中文首页数据混排
getZhCNIndexData(){ getZhCNIndexData() {
return api.fetchGet("/business/index/getIndexMixContent") return api.fetchGet("/business/index/getIndexMixContent")
}, },
//获取英文下的活动 //获取英文下的活动
getEnActivityData(params){ getEnActivityData(params) {
return api.fetchGet("/business/index/getIndexBaseActivity?"+Qs.stringify(params)) return api.fetchGet("/business/index/getIndexBaseActivity?" + Qs.stringify(params))
}, },
//获取英文下的报告 //获取英文下的报告
getEnIndustryData(params){ getEnIndustryData(params) {
return api.fetchGet("/business/index/getIndexBaseReport?"+Qs.stringify(params)) return api.fetchGet("/business/index/getIndexBaseReport?" + Qs.stringify(params))
}, },
//行业报告前端列表 //行业报告前端列表
getActivityDetails (params){ getActivityDetails(params) {
return api.fetchLoadingGet('/business/activityEnter/getActivityDetails?channelId=' +params); return api.fetchLoadingGet('/business/activityEnter/getActivityDetails?channelId=' + params);
}, },
//报名获取基本信息 //报名获取基本信息
getBasicInfoAxios(params){ getBasicInfoAxios(params) {
return api.fetchGet("/business/activityEnter/selectTemplateField?activityId="+params); return api.fetchGet("/business/activityEnter/selectTemplateField?activityId=" + params);
}, },
//报名第一步 //报名第一步
applyForFirstStep(params){ applyForFirstStep(params) {
return api.fetchLogin("/business/activityEnter/addRegisterInformation",params); return api.fetchLogin("/business/activityEnter/addRegisterInformation", params);
}, },
getActivityLinkList() {
return api.fetchGet("/base/website/getWebsitePartnerList");
},
} }
...@@ -450,7 +450,7 @@ ...@@ -450,7 +450,7 @@
<!--</div>--> <!--</div>-->
</div> </div>
</div> </div>
<div class="en_margin" v-if="$i18n.locale=='zh-CN'"> <div class="en_margin" v-if="$i18n.locale=='zh-CN'&&friendlyLink.length>0">
<div class="content_top friendLinkWrapper"> <div class="content_top friendLinkWrapper">
<div class="topUpdateTitle"> <div class="topUpdateTitle">
<h4>{{$t("bottomNav.friendlyLink")}}</h4> <h4>{{$t("bottomNav.friendlyLink")}}</h4>
...@@ -459,7 +459,7 @@ ...@@ -459,7 +459,7 @@
<div class="cooperationUl"> <div class="cooperationUl">
<ul> <ul>
<li v-for="item in friendlyLink" :key="item.id" @click="handleToLink(item,index)"> <li v-for="item in friendlyLink" :key="item.id" @click="handleToLink(item,index)">
<img :src="item.imageUrl" alt=""> <img :src="item.partnerLogo" alt="">
</li> </li>
</ul> </ul>
</div> </div>
...@@ -832,7 +832,7 @@ ...@@ -832,7 +832,7 @@
</div> </div>
</div> </div>
<!-- 友情链接--> <!-- 友情链接-->
<div class="content_top friendLinkWrapper"> <div class="content_top friendLinkWrapper" v-if="friendlyLink.length>0">
<div class="topUpdateTitle"> <div class="topUpdateTitle">
<h4>{{$t("bottomNav.friendlyLink")}}</h4> <h4>{{$t("bottomNav.friendlyLink")}}</h4>
<div class="borderBottom40px"></div> <div class="borderBottom40px"></div>
...@@ -840,7 +840,7 @@ ...@@ -840,7 +840,7 @@
<div class="cooperationUl"> <div class="cooperationUl">
<ul> <ul>
<li v-for="item in friendlyLink" :key="item.id" @click="handleToLink(item,index)"> <li v-for="item in friendlyLink" :key="item.id" @click="handleToLink(item,index)">
<img :src="item.imageUrl" alt=""> <img :src="item.partnerLogo" alt="">
</li> </li>
</ul> </ul>
</div> </div>
...@@ -987,51 +987,52 @@ ...@@ -987,51 +987,52 @@
matchedCount: 0 matchedCount: 0
}, },
//友情链接 //友情链接
friendlyLink: [ // friendlyLink: [
{ // {
id: 4, // id: 4,
imageUrl: require("../../../assets/img/index/webcar.jpg"), // partnerLogo: require("../../../assets/img/index/webcar.jpg"),
href: "http://www.chinanev.net/" // partnerUrl: "http://www.chinanev.net/"
//
},{ // },{
id: 5, // id: 5,
imageUrl: require("../../../assets/img/index/webggld.jpg"), // partnerLogo: require("../../../assets/img/index/webggld.jpg"),
href: "https://www.gg-lb.com/" // partnerUrl: "https://www.gg-lb.com/"
//
},{ // },{
id: 1, // id: 1,
imageUrl: require("../../../assets/img/index/webgushu.png"), // partnerLogo: require("../../../assets/img/index/webgushu.png"),
href: "https://www.kapbook.com?site_from=taiku" // partnerUrl: "https://www.kapbook.com?site_from=taiku"
},{ // },{
id: 3, // id: 3,
imageUrl: require("../../../assets/img/index/webzhongfa.png"), // partnerLogo: require("../../../assets/img/index/webzhongfa.png"),
href: "http://www.zfa.cn/" // partnerUrl: "http://www.zfa.cn/"
//
},{ // },{
id: 0, // id: 0,
imageUrl: require("../../../assets/img/index/investsh.png"), // partnerLogo: require("../../../assets/img/index/investsh.png"),
href: "http://www.investsh.org.cn" // partnerUrl: "http://www.investsh.org.cn"
}, { // }, {
id: 2, // id: 2,
imageUrl: require("../../../assets/img/index/webhuaweiyun.png"), // partnerLogo: require("../../../assets/img/index/webhuaweiyun.png"),
href: "https://www.huaweicloud.com/" // partnerUrl: "https://www.huaweicloud.com/"
//
}, { // }, {
id: 6, // id: 6,
imageUrl: require("../../../assets/img/index/websaiwen.jpg"), // partnerLogo: require("../../../assets/img/index/websaiwen.jpg"),
href: "http://www.7its.com/" // partnerUrl: "http://www.7its.com/"
//
}, { // }, {
id: 7, // id: 7,
imageUrl: require("../../../assets/img/index/webyiou.jpg"), // partnerLogo: require("../../../assets/img/index/webyiou.jpg"),
href: "https://www.iyiou.com/" // partnerUrl: "https://www.iyiou.com/"
//
}, { // }, {
id: 8, // id: 8,
imageUrl: require("../../../assets/img/maikeji.png"), // partnerLogo: require("../../../assets/img/maikeji.png"),
href: "https://www.maikeji.cn/" // partnerUrl: "https://www.maikeji.cn/"
//
},], // }],
friendlyLink:[],
userInfo: this.publicFun.getUserInfoCookieType() ? JSON.parse(this.Base64.decode(this.publicFun.getUserInfoCookieType())) : null, userInfo: this.publicFun.getUserInfoCookieType() ? JSON.parse(this.Base64.decode(this.publicFun.getUserInfoCookieType())) : null,
articleList: [],//资讯 articleList: [],//资讯
datelist:[{value:'实时榜',type:1},{value:'近7日榜',type:2},{value:'近30日榜',type:3}], datelist:[{value:'实时榜',type:1},{value:'近7日榜',type:2},{value:'近30日榜',type:3}],
...@@ -1142,7 +1143,7 @@ ...@@ -1142,7 +1143,7 @@
}, },
//友情链接 //友情链接
handleToLink(item) { handleToLink(item) {
window.open(item.href); window.open(item.partnerUrl);
}, },
//文章列表 //文章列表
classifyclk(row) { classifyclk(row) {
...@@ -1612,6 +1613,23 @@ ...@@ -1612,6 +1613,23 @@
this.positions = false; this.positions = false;
} }
}, },
//友情链接
getWebsitePartnerList(){
api.getActivityLinkList().then(response => {
if(response.code == 0) {
if(response.result) {
this.friendlyLink = response.result;
}
} else {
this.$message.error(response.msgCode);
}
})
.catch(error => {
console.log("提交出错");
return false;
});
}
}, },
beforeDestroy() { // 在组件生命周期结束的时候销毁。 beforeDestroy() { // 在组件生命周期结束的时候销毁。
window.removeEventListener('scroll', this.menu); window.removeEventListener('scroll', this.menu);
...@@ -1638,6 +1656,7 @@ ...@@ -1638,6 +1656,7 @@
this.getselectBasicParams();//配置信息 this.getselectBasicParams();//配置信息
this.getBusinessInfoData();//需求信息 this.getBusinessInfoData();//需求信息
this.getProjectInfoData();//项目信息 this.getProjectInfoData();//项目信息
this.getWebsitePartnerList();//友情链接
if(this.$i18n.locale=='zh-CN'){ if(this.$i18n.locale=='zh-CN'){
this.getIndexHotContentaxios();//热门信息 this.getIndexHotContentaxios();//热门信息
this.getIndexTopNArticle();//推荐文章 this.getIndexTopNArticle();//推荐文章
...@@ -2178,7 +2197,7 @@ ...@@ -2178,7 +2197,7 @@
} }
.friendLinkWrapper { .friendLinkWrapper {
height: 200px; min-height: 150px;
/*background: #ECECF2;*/ /*background: #ECECF2;*/
.topUpdateTitle { .topUpdateTitle {
padding-bottom: 0; padding-bottom: 0;
...@@ -2190,11 +2209,11 @@ ...@@ -2190,11 +2209,11 @@
display: -moz-box; /*老版本语法:Firefox(buggy)*/ display: -moz-box; /*老版本语法:Firefox(buggy)*/
display: -ms-flexbox; /*混合版本语法:IE 10*/ display: -ms-flexbox; /*混合版本语法:IE 10*/
display: flex; /*新版本语法:opera 12.1,Firefox 22+*/ display: flex; /*新版本语法:opera 12.1,Firefox 22+*/
justify-content: space-around; /*justify-content: space-around;*/
& li { & li {
cursor: pointer; cursor: pointer;
padding-bottom: 10px; width: calc(100% / 9);
flex: 1; margin: 0;
} }
& li:first-of-type { & li:first-of-type {
margin-left: 0; margin-left: 0;
...@@ -2203,8 +2222,12 @@ ...@@ -2203,8 +2222,12 @@
margin-right: 0; margin-right: 0;
} }
& img { & img {
width: auto; width: 88px;
height: 45px; height: 45px;
object-fit: contain;
/*border: 1px solid #E8E8E8;*/
padding: 2px 5px;
margin: 10px 0;
} }
& > ul { & > ul {
width: 100%; width: 100%;
...@@ -2213,7 +2236,9 @@ ...@@ -2213,7 +2236,9 @@
display: -moz-box; /*老版本语法:Firefox(buggy)*/ display: -moz-box; /*老版本语法:Firefox(buggy)*/
display: -ms-flexbox; /*混合版本语法:IE 10*/ display: -ms-flexbox; /*混合版本语法:IE 10*/
display: flex; /*新版本语法:opera 12.1,Firefox 22+*/ display: flex; /*新版本语法:opera 12.1,Firefox 22+*/
justify-content: space-around; /*justify-content: space-around;*/
flex-wrap: wrap;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment