Commit 1118f7dc authored by zhangyanni's avatar zhangyanni

友情链接改成动态的

parent 068d6041
......@@ -1072,6 +1072,11 @@ const router = new Router({
component: resolve => require(['views/categorypage/category.vue'], resolve).catch(routerUtils.catchImport),
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 Qs from 'qs';
const baseUrl = "/business";
export default {
//获取banner数据
getCountAxios(params){
return api.fetchGet(baseUrl+"/index/getIndexCount");
getCountAxios(params) {
return api.fetchGet(baseUrl + "/index/getIndexCount");
},
//获取首页推荐文章信息
getIndexTopNArticle(params){
return api.fetchGet(baseUrl+"/index/getIndexTopNArticle?count="+params);
getIndexTopNArticle(params) {
return api.fetchGet(baseUrl + "/index/getIndexTopNArticle?count=" + params);
},
//获取首页推荐行业报告
getIndexBaseReport(params){
return api.fetchGet(baseUrl+"/index/getIndexBaseReport?count="+params);
getIndexBaseReport(params) {
return api.fetchGet(baseUrl + "/index/getIndexBaseReport?count=" + params);
},
//获取首页推荐话题
getIndexBaseTopic(params){
return api.fetchGet(baseUrl+"/index/getIndexBaseTopic?count="+params);
getIndexBaseTopic(params) {
return api.fetchGet(baseUrl + "/index/getIndexBaseTopic?count=" + params);
},
//获取域名
selectBasicParams( ) {
return api.fetchLogin( '/base/tools/selectBasicParams');
selectBasicParams() {
return api.fetchLogin('/base/tools/selectBasicParams');
},
//行业报告下载链接
getDownloadUrl (params){
return api.fetchLoadingGet('/business/report/getDownloadUrl?reportId=' +params);
getDownloadUrl(params) {
return api.fetchLoadingGet('/business/report/getDownloadUrl?reportId=' + params);
},
//获取首页推荐活动
getIndexBaseActivity(params,notInIds){
return api.fetchGet(baseUrl+"/index/getIndexBaseActivity?count="+params+"&notInIds="+notInIds);
getIndexBaseActivity(params, notInIds) {
return api.fetchGet(baseUrl + "/index/getIndexBaseActivity?count=" + params + "&notInIds=" + notInIds);
},
//获取首页话题
selectIndexPcHotTopicList( params ) {
return api.fetchLogin( '/business/topic/selectIndexPcHotTopicList',params);
selectIndexPcHotTopicList(params) {
return api.fetchLogin('/business/topic/selectIndexPcHotTopicList', params);
},
//获取首页话题竞猜讨论
selectIndexPcHotDiscussList( params ) {
return api.fetchLogin( '/business/topic/selectIndexPcHotDiscussList',params);
selectIndexPcHotDiscussList(params) {
return api.fetchLogin('/business/topic/selectIndexPcHotDiscussList', params);
},
//获取首页推荐公司展示信息
getCompanyInfoAxios(params){
return api.fetchGet(baseUrl+"/index/getIndexTopNBusiness?count="+params);
getCompanyInfoAxios(params) {
return api.fetchGet(baseUrl + "/index/getIndexTopNBusiness?count=" + params);
},
//获取首页最新动态信息
getActiveInfoAxios(params){
return api.fetchGet(baseUrl+"/index/getIndexTopNMessage");
getActiveInfoAxios(params) {
return api.fetchGet(baseUrl + "/index/getIndexTopNMessage");
},
//获取首页推荐项目展示信息
getProjectInfoAxios(params){
return api.fetchGet(baseUrl+"/index/getIndexTopNProject?count="+params);
getProjectInfoAxios(params) {
return api.fetchGet(baseUrl + "/index/getIndexTopNProject?count=" + params);
},
//获取首页合作案例展示信息
getCooperationCaseAxios(params){
return api.fetchGet(baseUrl+"/index/getIndexTopNPurpose");
getCooperationCaseAxios(params) {
return api.fetchGet(baseUrl + "/index/getIndexTopNPurpose");
},
//左侧菜单导航栏
getLeftNavAxios(params){
getLeftNavAxios(params) {
return api.fetchGet("/base/function/getPermissionFunctions");
},
//获取左侧菜单统计
getLeftBannerAxios(){
return api.fetchGet(baseUrl+"/search/getBusinessAndProjectCount")
getLeftBannerAxios() {
return api.fetchGet(baseUrl + "/search/getBusinessAndProjectCount")
},
//退出登录
logoutAxios(params){
logoutAxios(params) {
return api.fetchPost("/base/login/out");
},
//混合搜索
mixSearchAxios(params){
return api.fetchLoadingPost("/business/search/search?"+Qs.stringify(params));
mixSearchAxios(params) {
return api.fetchLoadingPost("/business/search/search?" + Qs.stringify(params));
},
//微信登录
wechatLoginAxios(params){
return api.fetchLogin("/base/login/wxWebLogin",Qs.stringify(params));
wechatLoginAxios(params) {
return api.fetchLogin("/base/login/wxWebLogin", Qs.stringify(params));
},
//pc微信登录
pcLoginAxios(params){
return api.fetchLogin("/base/login/wxOpenLogin",Qs.stringify(params));
pcLoginAxios(params) {
return api.fetchLogin("/base/login/wxOpenLogin", Qs.stringify(params));
},
//获取PC首页热门内容
getIndexHotContent (){
getIndexHotContent() {
return api.fetchLoadingGet('/business/index/getIndexHotContent');
},
//获取PC首页热门内容
selectHomeGuessList (params){
return api.fetchLogin('/base/guess/selectHomeGuessList',params);
selectHomeGuessList(params) {
return api.fetchLogin('/base/guess/selectHomeGuessList', params);
},
//竞猜排行
selectGuessLeaderboardList (params){
return api.fetchLogin('/base/guess/selectGuessLeaderboardList',Qs.stringify(params));
selectGuessLeaderboardList(params) {
return api.fetchLogin('/base/guess/selectGuessLeaderboardList', Qs.stringify(params));
},
//获取活动介绍
getFirstStageFunc(params){
return api.fetchLoadingLogin("/business/subject/activity?"+Qs.stringify(params))
getFirstStageFunc(params) {
return api.fetchLoadingLogin("/business/subject/activity?" + Qs.stringify(params))
},
//获取专题数量
getSubjectNumAxios(){
return api.fetchLogin("/business/subject/selectSubjectActivityIndex")
getSubjectNumAxios() {
return api.fetchLogin("/business/subject/selectSubjectActivityIndex")
},
//埋点
maiDianAxios(params){
return api.fetchLogin("/business/log/activityLog",params);
maiDianAxios(params) {
return api.fetchLogin("/business/log/activityLog", params);
},
//获取当前访问前缀
getDocumentAxios(){
getDocumentAxios() {
return api.fetchLogin('/base/tools/selectBasicParams');
},
//获取开机报
getNoticeImgAxios(params){
return api.fetchLogin("/base/tools/selectOpenShow?showType="+params)
getNoticeImgAxios(params) {
return api.fetchLogin("/base/tools/selectOpenShow?showType=" + params)
},
//获取轮播图
getSwiperImgAxios(params){
return api.fetchLogin("/base/tools/selectSliderShow?showType="+params)
getSwiperImgAxios(params) {
return api.fetchLogin("/base/tools/selectSliderShow?showType=" + params)
},
getArticleListAxios(params){
return api.fetchGet("/business/index/getIndexTopNArticle?"+Qs.stringify(params))
getArticleListAxios(params) {
return api.fetchGet("/business/index/getIndexTopNArticle?" + Qs.stringify(params))
},
//获取中文首页数据混排
getZhCNIndexData(){
getZhCNIndexData() {
return api.fetchGet("/business/index/getIndexMixContent")
},
//获取英文下的活动
getEnActivityData(params){
return api.fetchGet("/business/index/getIndexBaseActivity?"+Qs.stringify(params))
getEnActivityData(params) {
return api.fetchGet("/business/index/getIndexBaseActivity?" + Qs.stringify(params))
},
//获取英文下的报告
getEnIndustryData(params){
return api.fetchGet("/business/index/getIndexBaseReport?"+Qs.stringify(params))
getEnIndustryData(params) {
return api.fetchGet("/business/index/getIndexBaseReport?" + Qs.stringify(params))
},
//行业报告前端列表
getActivityDetails (params){
return api.fetchLoadingGet('/business/activityEnter/getActivityDetails?channelId=' +params);
getActivityDetails(params) {
return api.fetchLoadingGet('/business/activityEnter/getActivityDetails?channelId=' + params);
},
//报名获取基本信息
getBasicInfoAxios(params){
return api.fetchGet("/business/activityEnter/selectTemplateField?activityId="+params);
getBasicInfoAxios(params) {
return api.fetchGet("/business/activityEnter/selectTemplateField?activityId=" + params);
},
//报名第一步
applyForFirstStep(params){
return api.fetchLogin("/business/activityEnter/addRegisterInformation",params);
applyForFirstStep(params) {
return api.fetchLogin("/business/activityEnter/addRegisterInformation", params);
},
getActivityLinkList() {
return api.fetchGet("/base/website/getWebsitePartnerList");
},
}
......@@ -450,7 +450,7 @@
<!--</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="topUpdateTitle">
<h4>{{$t("bottomNav.friendlyLink")}}</h4>
......@@ -459,7 +459,7 @@
<div class="cooperationUl">
<ul>
<li v-for="item in friendlyLink" :key="item.id" @click="handleToLink(item,index)">
<img :src="item.imageUrl" alt="">
<img :src="item.partnerLogo" alt="">
</li>
</ul>
</div>
......@@ -832,7 +832,7 @@
</div>
</div>
<!-- 友情链接-->
<div class="content_top friendLinkWrapper">
<div class="content_top friendLinkWrapper" v-if="friendlyLink.length>0">
<div class="topUpdateTitle">
<h4>{{$t("bottomNav.friendlyLink")}}</h4>
<div class="borderBottom40px"></div>
......@@ -840,7 +840,7 @@
<div class="cooperationUl">
<ul>
<li v-for="item in friendlyLink" :key="item.id" @click="handleToLink(item,index)">
<img :src="item.imageUrl" alt="">
<img :src="item.partnerLogo" alt="">
</li>
</ul>
</div>
......@@ -987,51 +987,52 @@
matchedCount: 0
},
//友情链接
friendlyLink: [
{
id: 4,
imageUrl: require("../../../assets/img/index/webcar.jpg"),
href: "http://www.chinanev.net/"
},{
id: 5,
imageUrl: require("../../../assets/img/index/webggld.jpg"),
href: "https://www.gg-lb.com/"
},{
id: 1,
imageUrl: require("../../../assets/img/index/webgushu.png"),
href: "https://www.kapbook.com?site_from=taiku"
},{
id: 3,
imageUrl: require("../../../assets/img/index/webzhongfa.png"),
href: "http://www.zfa.cn/"
},{
id: 0,
imageUrl: require("../../../assets/img/index/investsh.png"),
href: "http://www.investsh.org.cn"
}, {
id: 2,
imageUrl: require("../../../assets/img/index/webhuaweiyun.png"),
href: "https://www.huaweicloud.com/"
}, {
id: 6,
imageUrl: require("../../../assets/img/index/websaiwen.jpg"),
href: "http://www.7its.com/"
}, {
id: 7,
imageUrl: require("../../../assets/img/index/webyiou.jpg"),
href: "https://www.iyiou.com/"
}, {
id: 8,
imageUrl: require("../../../assets/img/maikeji.png"),
href: "https://www.maikeji.cn/"
},],
// friendlyLink: [
// {
// id: 4,
// partnerLogo: require("../../../assets/img/index/webcar.jpg"),
// partnerUrl: "http://www.chinanev.net/"
//
// },{
// id: 5,
// partnerLogo: require("../../../assets/img/index/webggld.jpg"),
// partnerUrl: "https://www.gg-lb.com/"
//
// },{
// id: 1,
// partnerLogo: require("../../../assets/img/index/webgushu.png"),
// partnerUrl: "https://www.kapbook.com?site_from=taiku"
// },{
// id: 3,
// partnerLogo: require("../../../assets/img/index/webzhongfa.png"),
// partnerUrl: "http://www.zfa.cn/"
//
// },{
// id: 0,
// partnerLogo: require("../../../assets/img/index/investsh.png"),
// partnerUrl: "http://www.investsh.org.cn"
// }, {
// id: 2,
// partnerLogo: require("../../../assets/img/index/webhuaweiyun.png"),
// partnerUrl: "https://www.huaweicloud.com/"
//
// }, {
// id: 6,
// partnerLogo: require("../../../assets/img/index/websaiwen.jpg"),
// partnerUrl: "http://www.7its.com/"
//
// }, {
// id: 7,
// partnerLogo: require("../../../assets/img/index/webyiou.jpg"),
// partnerUrl: "https://www.iyiou.com/"
//
// }, {
// id: 8,
// partnerLogo: require("../../../assets/img/maikeji.png"),
// partnerUrl: "https://www.maikeji.cn/"
//
// }],
friendlyLink:[],
userInfo: this.publicFun.getUserInfoCookieType() ? JSON.parse(this.Base64.decode(this.publicFun.getUserInfoCookieType())) : null,
articleList: [],//资讯
datelist:[{value:'实时榜',type:1},{value:'近7日榜',type:2},{value:'近30日榜',type:3}],
......@@ -1142,7 +1143,7 @@
},
//友情链接
handleToLink(item) {
window.open(item.href);
window.open(item.partnerUrl);
},
//文章列表
classifyclk(row) {
......@@ -1612,6 +1613,23 @@
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() { // 在组件生命周期结束的时候销毁。
window.removeEventListener('scroll', this.menu);
......@@ -1638,6 +1656,7 @@
this.getselectBasicParams();//配置信息
this.getBusinessInfoData();//需求信息
this.getProjectInfoData();//项目信息
this.getWebsitePartnerList();//友情链接
if(this.$i18n.locale=='zh-CN'){
this.getIndexHotContentaxios();//热门信息
this.getIndexTopNArticle();//推荐文章
......@@ -2178,7 +2197,7 @@
}
.friendLinkWrapper {
height: 200px;
min-height: 150px;
/*background: #ECECF2;*/
.topUpdateTitle {
padding-bottom: 0;
......@@ -2190,11 +2209,11 @@
display: -moz-box; /*老版本语法:Firefox(buggy)*/
display: -ms-flexbox; /*混合版本语法:IE 10*/
display: flex; /*新版本语法:opera 12.1,Firefox 22+*/
justify-content: space-around;
/*justify-content: space-around;*/
& li {
cursor: pointer;
padding-bottom: 10px;
flex: 1;
width: calc(100% / 9);
margin: 0;
}
& li:first-of-type {
margin-left: 0;
......@@ -2203,8 +2222,12 @@
margin-right: 0;
}
& img {
width: auto;
width: 88px;
height: 45px;
object-fit: contain;
/*border: 1px solid #E8E8E8;*/
padding: 2px 5px;
margin: 10px 0;
}
& > ul {
width: 100%;
......@@ -2213,7 +2236,9 @@
display: -moz-box; /*老版本语法:Firefox(buggy)*/
display: -ms-flexbox; /*混合版本语法:IE 10*/
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