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);
},
}
This diff is collapsed.
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