提交 f0d4856e authored 作者: lihuihui's avatar lihuihui

修改问题

上级 850c8235
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<div class="home-head"> <div class="home-head">
<swiper ref="mySwiper" :options="swiperOptions" class="item-swiper"> <swiper ref="mySwiper" :options="swiperOptions" class="item-swiper">
<swiper-slide v-for="(item, index) in swiperList" :key="index"> <swiper-slide v-for="(item, index) in swiperList" :key="index">
<router-link :to="`/news/detail?id=${item.id}&type=home`"> <!-- <router-link :to="`/news/detail?id=${item.id}&type=home`"> -->
<img :src="item" alt="" /> <img :src="item" alt="" />
</router-link> <!-- </router-link> -->
</swiper-slide> </swiper-slide>
</swiper> </swiper>
</div> </div>
......
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
itemChi: [ itemChi: [
{ {
title: '通知公告', title: '通知公告',
path: '/news' path: '/news?type=0'
}, },
{ {
title: '工作动态', title: '工作动态',
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<div class="home-head"> <div class="home-head">
<swiper ref="mySwiper" :options="swiperOptions" class="item-swiper"> <swiper ref="mySwiper" :options="swiperOptions" class="item-swiper">
<swiper-slide v-for="(item, index) in swiperList" :key="index"> <swiper-slide v-for="(item, index) in swiperList" :key="index">
<router-link :to="`/news/detail?id=${item.id}&type=home`"> <!-- <router-link :to="`/news/detail?id=${item.id}&type=home`"> -->
<img :src="item" alt="" /> <img :src="item" alt="" />
</router-link> <!-- </router-link> -->
</swiper-slide> </swiper-slide>
</swiper> </swiper>
</div> </div>
......
...@@ -30,6 +30,16 @@ export default { ...@@ -30,6 +30,16 @@ export default {
this.tabsIndex = n this.tabsIndex = n
this.$emit('tabsChange', n) this.$emit('tabsChange', n)
} }
},
watch: {
$route: {
handler: function(val, oldVal){
if (this.$route.query.type !== undefined || this.$route.query.type !== 'undefined') {
this.tabsIndex = parseInt(this.$route.query.type)
}
},
deep: true
}
} }
} }
</script> </script>
......
...@@ -202,7 +202,7 @@ export default { ...@@ -202,7 +202,7 @@ export default {
{ {
icon: 'https://zws-imgs-pub.ezijing.com/static/public/cc4885f2f4b6f566954cdb15381916f8.png', icon: 'https://zws-imgs-pub.ezijing.com/static/public/cc4885f2f4b6f566954cdb15381916f8.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/901044f1465a5497fef8135f9e2ce4ff.png', iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/901044f1465a5497fef8135f9e2ce4ff.png',
text: '组织开授课', text: '组织开授课',
path: '/hall?role=2&point=s1&home=1', path: '/hall?role=2&point=s1&home=1',
textActive: '发通知组织统一上课' textActive: '发通知组织统一上课'
}, },
......
...@@ -303,7 +303,7 @@ export default { ...@@ -303,7 +303,7 @@ export default {
{ {
icon: 'https://zws-imgs-pub.ezijing.com/static/public/cc4885f2f4b6f566954cdb15381916f8.png', icon: 'https://zws-imgs-pub.ezijing.com/static/public/cc4885f2f4b6f566954cdb15381916f8.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/901044f1465a5497fef8135f9e2ce4ff.png', iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/901044f1465a5497fef8135f9e2ce4ff.png',
text: '组织开授课', text: '组织开授课',
path: '/hall?role=2&point=s1', path: '/hall?role=2&point=s1',
textActive: '发通知组织统一上课' textActive: '发通知组织统一上课'
}, },
......
...@@ -87,6 +87,9 @@ export default { ...@@ -87,6 +87,9 @@ export default {
action.articleAction.getArticle({ category_id: findId.id }).then(res => { action.articleAction.getArticle({ category_id: findId.id }).then(res => {
this.list = res.data.list this.list = res.data.list
this.pages = res.data.pages this.pages = res.data.pages
this.$nextTick(() => {
this.$forceUpdate()
})
loading.close() loading.close()
}) })
} }
...@@ -95,11 +98,11 @@ export default { ...@@ -95,11 +98,11 @@ export default {
watch: { watch: {
$route: { $route: {
handler: function(val, oldVal){ handler: function(val, oldVal){
if (this.$route.query.type) { if (this.$route.query.type !== undefined || this.$route.query.type !== 'undefined') {
this.tabsData.index = this.$route.query.type this.tabsData.index = parseInt(this.$route.query.type)
this.tabsDataIndex = this.$route.query.type this.tabsDataIndex = parseInt(this.$route.query.type)
this.newsList()
} }
this.newsList()
}, },
deep: true deep: true
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论