flat: 国庆节暂存
This commit is contained in:
@@ -27,7 +27,9 @@
|
||||
import {
|
||||
mapGetters
|
||||
} from 'vuex'
|
||||
|
||||
import {
|
||||
GoLogin
|
||||
} from '@/untils/AxiosUtils.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -36,14 +38,21 @@
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {
|
||||
if (!this.$store.state.user.token) {
|
||||
uni.redirectTo({
|
||||
url: "/pages/login/login"
|
||||
if (/token/g.test(location.href)) {
|
||||
this.$api.sleep(2000).then(() => {
|
||||
if (!this.$api.haslogin()) {
|
||||
GoLogin()
|
||||
} else {
|
||||
uni.$emit('newsReadChange')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.$emit('newsReadChange')
|
||||
if (!this.$api.haslogin()) {
|
||||
GoLogin()
|
||||
} else {
|
||||
uni.$emit('newsReadChange')
|
||||
}
|
||||
}
|
||||
console.log(this.news)
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.loading = true
|
||||
|
||||
Reference in New Issue
Block a user