|
|
@ -148,7 +148,7 @@ export default { |
|
|
|
return { |
|
|
|
notice: '', |
|
|
|
mixinsListApi: 'getNews', |
|
|
|
authApi : true, |
|
|
|
authApi : false, |
|
|
|
isLoggedIn : uni.getStorageSync('token'), |
|
|
|
} |
|
|
|
}, |
|
|
@ -159,12 +159,13 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
this.isLoggedIn = uni.getStorageSync('token') |
|
|
|
if(this.isLoggedIn){ |
|
|
|
this.$store.commit('getUserInfo') |
|
|
|
this.$store.commit('getUserInfoVip') |
|
|
|
this.fetchNotice() |
|
|
|
} |
|
|
|
this.fetchNotice() |
|
|
|
|
|
|
|
this.isLoggedIn = uni.getStorageSync('token') |
|
|
|
if(this.isLoggedIn){ |
|
|
|
this.$store.commit('getUserInfo') |
|
|
|
this.$store.commit('getUserInfoVip') |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async fetchNotice() { |
|
|
@ -190,10 +191,6 @@ export default { |
|
|
|
return str.replace(/<.*?>/g, '') |
|
|
|
}, |
|
|
|
goToNewsDetail(id) { |
|
|
|
if (!this.isLoggedIn) { |
|
|
|
this.goToLogin() |
|
|
|
return |
|
|
|
} |
|
|
|
uni.navigateTo({ |
|
|
|
url: `/pages_order/mine/news?id=${id}` |
|
|
|
}) |
|
|
|