Authored by Tao

modify news data

... ... @@ -26,8 +26,10 @@ export default {
},
methods: {
jump(item) {
const { type, description } = item;
console.log(item);
let { type, description } = item;
this.$router.push({name:'newsDetail',query: {type,description}})
this.$emit('clearStore',1);
}
}
};
... ...
... ... @@ -2,7 +2,7 @@ export default [
{
name: 'news',
path: '/xianyu/news',
component: () => import(/* webpackChunkName: "news" */ './news')
component: () => import(/* webpackChunkName: "news" */ './news'),
},
{
name: 'newsDetail',
... ...
... ... @@ -7,7 +7,9 @@
@pulling-up="onPullingUp"
:data="newsList.list">
<div class="news-content">
<Tab v-if="newsList.tabList.length > 0" :list="newsList.tabList"></Tab>
<Tab
v-if="newsList.tabList.length > 0" :list="newsList.tabList"
@clearStore="clearStoreData"></Tab>
<List v-if="newsList.list.length > 0" :list="newsList && newsList.list || []"></List>
<UfoNoItem v-else :tip="`暂无数据`"></UfoNoItem>
</div>
... ... @@ -30,9 +32,6 @@ export default {
data() {
return {
options: {
// bounce: {
// top: false
// },
pullUpLoad: true
},
msg: '消息',
... ... @@ -62,6 +61,10 @@ export default {
};
await this.fetchNewsList(params);
this.$refs.scroll.forceUpdate();
},
clearStoreData(index) {
console.log(index);
}
},
watch:{
... ...
... ... @@ -28,9 +28,6 @@ export default {
data() {
return {
options: {
// bounce: {
// top: false
// },
pullUpLoad: true
},
title: '',
... ... @@ -41,6 +38,7 @@ export default {
...mapState(['newsList','newsDeatilList']),
},
activated() {
console.log('111');
let params = {
type: this.type,
isPage: true
... ... @@ -51,9 +49,6 @@ export default {
this.title = this.$route.query.description;
this.type = this.$route.query.type;
},
activated() {
},
methods: {
...mapActions(['fetchNewsList']),
async onPullingUp() {
... ...