DESKTOP-00SUCB6\Administrator 4 years ago
parent
commit
bff6c16909
  1. 10
      public/template/001/styles/index.scss
  2. 26
      src/router/index.js
  3. 34
      src/views/home/index.vue

10
public/template/001/styles/index.scss

@ -170,7 +170,9 @@ a:hover {
.text-center { .text-center {
text-align: center; text-align: center;
} }
.text-right {
text-align: right;
}
.flex-1 { .flex-1 {
-webkit-box-flex: 1; -webkit-box-flex: 1;
-webkit-flex: 1; -webkit-flex: 1;
@ -330,3 +332,9 @@ input {
.cursor-pointer { .cursor-pointer {
cursor: pointer; cursor: pointer;
} }
.position-right-bottom {
position: absolute;
right: 0px;
bottom: 0px;
}

26
src/router/index.js

@ -21,6 +21,7 @@ const routes = [
{ {
path: 'union', path: 'union',
name: 'union', name: 'union',
component: mytemplate,
meta: { title: '关于联盟', icon: 'register', noCache: true }, meta: { title: '关于联盟', icon: 'register', noCache: true },
children: [ children: [
{ {
@ -47,6 +48,15 @@ const routes = [
path: 'us', path: 'us',
name: 'usUnion', name: 'usUnion',
meta: {title: '联系我们', icon: 'register', noCache: true,typeId:'LXWM'}, meta: {title: '联系我们', icon: 'register', noCache: true,typeId:'LXWM'},
},
{
path: 'trends',
name: 'trends',
components:{
banner: () => import('@/components/banner'),
default:() => import('@/views/industry/index.vue')
},
meta: { title: '联盟动态', icon: 'register', noCache: true, type: 'LMDTLX'},
} }
] ]
}, },
@ -160,7 +170,6 @@ const routes = [
}, },
meta: {title: '线上沙龙新闻', icon: 'register', noCache: true}, meta: {title: '线上沙龙新闻', icon: 'register', noCache: true},
}, },
{ {
path: 'signup', path: 'signup',
@ -168,13 +177,12 @@ const routes = [
components:{ components:{
banner: () => import('@/components/banner'), banner: () => import('@/components/banner'),
default:() => import('@/views/meeting/signup.vue') default:() => import('@/views/meeting/signup.vue')
}, },
meta: {title: '线上沙龙报名', icon: 'register', noCache: true}, meta: {title: '线上沙龙报名', icon: 'register', noCache: true},
} }
] ]
} },
] ]
}, },
@ -240,7 +248,15 @@ const routes = [
default:() => import('@/views/industry/index.vue') default:() => import('@/views/industry/index.vue')
}, },
meta: {title: '新零售', icon: 'register', noCache: true,type:'XLS'}, meta: {title: '新零售', icon: 'register', noCache: true,type:'XLS'},
},
{
path: 'news',
name: 'newsIndustry',
components:{
banner: () => import('@/components/banner'),
default:() => import('@/views/industry/index.vue')
},
meta: {title: '行业资讯', icon: 'register', noCache: true,type:'HYZXLX'},
}, },
] ]
}, },

34
src/views/home/index.vue

@ -56,13 +56,18 @@
<div class="title-box is-active" name="title-box" @click="changeTitleBox($event,'LMDTLX')"> <div class="title-box is-active" name="title-box" @click="changeTitleBox($event,'LMDTLX')">
<div class="dongtai"> <div class="dongtai">
<span class="color-white title-2">联盟动态 <br><span class="font-size-21" style="opacity: 0.8;">NEWS</span></span> <span class="color-white title-2">联盟动态 <br><span class="font-size-21" style="opacity: 0.8;">NEWS</span></span>
<div :class="{'position-right-bottom': true, 'un-display': !isDisplay}">
<a class="color-white mybutton-1" @click="showMoreNewsOrInformation">查看更多 >></a>
</div>
</div> </div>
</div> </div>
<div class="title-box " name="title-box" @click="changeTitleBox($event,'HYZXLX')"> <div class="title-box " name="title-box" @click="changeTitleBox($event,'HYZXLX')">
<div class="zixun"> <div class="zixun">
<span class="color-white title-2">行业资讯 <br><span class="font-size-21" style="opacity: 0.8;">INFORMATION</span></span> <span class="color-white title-2">行业资讯 <br><span class="font-size-21" style="opacity: 0.8;">INFORMATION</span></span>
<div :class="{'position-right-bottom': true, 'un-display': isDisplay}">
<a class="color-white mybutton-1" @click="showMoreNewsOrInformation">查看更多 >></a>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="center-box"> <div class="center-box">
@ -239,7 +244,9 @@ export default {
noticeList:[], noticeList:[],
IntroduceDescription:'', IntroduceDescription:'',
industrialNews:'SPZB', industrialNews:'SPZB',
industrialNewsList:[] industrialNewsList:[],
category: 'LMDTLX',
isDisplay: true
} }
}, },
mounted(){ mounted(){
@ -250,6 +257,20 @@ export default {
this.initIndustrialNews() this.initIndustrialNews()
}, },
methods:{ methods:{
showMoreNewsOrInformation(){
// console.log('123');
// let routeUrl = this.$router.resolve({name:'noticeShow',query:{'id':item.id,'title':item.topicTypeText}});
// window.open(routeUrl.href, '_blank');
if(this.category === 'LMDTLX'){
this.$router.push({
name: 'trends'
})
} else{
this.$router.push({
name: 'newsIndustry'
})
}
},
alertMesg(mes) { alertMesg(mes) {
this.$alert(mes,'提示', { confirmButtonText: '确定',}); this.$alert(mes,'提示', { confirmButtonText: '确定',});
}, },
@ -314,6 +335,7 @@ export default {
getNoticeList(newsParams).then(res => { getNoticeList(newsParams).then(res => {
if(res.data && res.data.list.length > 0) if(res.data && res.data.list.length > 0)
this.noticeList = res.data.list this.noticeList = res.data.list
this.category = type
}) })
}, },
initNoticeByMoreType(){ initNoticeByMoreType(){
@ -342,6 +364,11 @@ export default {
} }
e.currentTarget.className = "title-box is-active" e.currentTarget.className = "title-box is-active"
// e.target.className = "title-box is-active" // e.target.className = "title-box is-active"
if(type === 'LMDTLX'){
this.isDisplay = true
} else{
this.isDisplay = false
}
this.initNewsOrInformation(type) this.initNewsOrInformation(type)
} }
} }
@ -909,6 +936,9 @@ export default {
} }
} }
} }
.un-display{
display: none;
}
</style> </style>
<style lang="scss"> <style lang="scss">
.industrial-news-tab { .industrial-news-tab {

Loading…
Cancel
Save