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

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

@ -170,7 +170,9 @@ a:hover {
.text-center {
text-align: center;
}
.text-right {
text-align: right;
}
.flex-1 {
-webkit-box-flex: 1;
-webkit-flex: 1;
@ -329,4 +331,10 @@ input {
}
.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',
name: 'union',
component: mytemplate,
meta: { title: '关于联盟', icon: 'register', noCache: true },
children: [
{
@ -47,6 +48,15 @@ const routes = [
path: 'us',
name: 'usUnion',
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},
},
{
path: 'signup',
@ -168,13 +177,12 @@ const routes = [
components:{
banner: () => import('@/components/banner'),
default:() => import('@/views/meeting/signup.vue')
},
meta: {title: '线上沙龙报名', icon: 'register', noCache: true},
}
]
}
},
]
},
@ -240,7 +248,15 @@ const routes = [
default:() => import('@/views/industry/index.vue')
},
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="dongtai">
<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 class="title-box " name="title-box" @click="changeTitleBox($event,'HYZXLX')">
<div class="zixun">
<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 class="center-box">
@ -239,7 +244,9 @@ export default {
noticeList:[],
IntroduceDescription:'',
industrialNews:'SPZB',
industrialNewsList:[]
industrialNewsList:[],
category: 'LMDTLX',
isDisplay: true
}
},
mounted(){
@ -250,6 +257,20 @@ export default {
this.initIndustrialNews()
},
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) {
this.$alert(mes,'提示', { confirmButtonText: '确定',});
},
@ -314,6 +335,7 @@ export default {
getNoticeList(newsParams).then(res => {
if(res.data && res.data.list.length > 0)
this.noticeList = res.data.list
this.category = type
})
},
initNoticeByMoreType(){
@ -342,6 +364,11 @@ export default {
}
e.currentTarget.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)
}
}
@ -909,6 +936,9 @@ export default {
}
}
}
.un-display{
display: none;
}
</style>
<style lang="scss">
.industrial-news-tab {

Loading…
Cancel
Save