解决体验版弹出登录框

This commit is contained in:
dengjie
2023-01-28 22:33:37 +08:00
parent 5678815237
commit 1f6d21a1a0
14 changed files with 213 additions and 83 deletions

View File

@@ -41,8 +41,7 @@
onLoad(option) {
this.id = option.id
this.getNewsDetail()
if (!uni.getStorageSync('token') || uni.getStorageSync('token').length === 0) {
console.log(uni.getStorageSync('token'))
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
this.isLoad = false
// uni.navigateTo({
// url: '../../pages/my/login/login'
@@ -66,8 +65,7 @@
}).finally(_ => {})
},
reOnLoad() {
console.log('----------------true')
if (!uni.getStorageSync('token') || uni.getStorageSync('token').length === 0) {
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
this.$toast.warn('登录失败请重试')
this.isLoad = false
// uni.navigateTo({
@@ -76,9 +74,9 @@
return
}
this.isLoad = true
this.getNewsDetail()
},
failToLoad() {
console.log('----------------false')
this.$toast.warn('登录失败请重试')
}
}