This commit is contained in:
xiaozhiyong
2024-09-23 08:48:47 +08:00
parent bd75b1f7ac
commit 5803d8a222
12 changed files with 337 additions and 356 deletions

View File

@@ -17,6 +17,7 @@
return {
showAdvertisement: false,
key: '',
isOnline:false,
option: null,
imgURL: this.global.imgURL + 'start/',
yellowURL: this.global.yellowURL + 'xq-ad/',
@@ -96,10 +97,10 @@
const token = uni.getStorageSync('Authorization')
const openid = uni.getStorageSync('openid')
// this.key = '';
let isOnline = false;
// this.isOnline = false;
if (token) {
await oilSiteApi.isLoginSuccess().then(res => {
if (res.code == 20000) isOnline = true
if (res.code == 20000) this.isOnline = true
}).catch(err => {})
}
// console.log(isOnline,'isOnline')
@@ -108,7 +109,7 @@
// } else {
// this.key = '离线'
// }
if (isOnline) {
if (this.isOnline) {
if (!uni.getStorageSync('filterData')) {
this.getFilterData()
} else if (uni.getStorageSync('filterData')[0].detailList.length < 2) {
@@ -124,21 +125,21 @@
}
},
goHome(type) {
if (type) {
uni.setStorageSync('isJump', {
page: 'Financial/pages/estimate/index',
disposable: true
if (this.isOnline) {
if (type) {
uni.setStorageSync('isJump', {
page: 'Financial/pages/estimate/index',
disposable: true
})
}
uni.switchTab({
url: `/pages/tabbar/home/home`
})
} else {
uni.redirectTo({
url: '/BagAuth/pages/login/login'
})
}
uni.switchTab({
url: `/pages/tabbar/home/home`
})
// if (this.key == '在线') {
// } else {
// uni.redirectTo({
// url: '/BagAuth/pages/login/login'
// })
// }
},
Interceptor(id) {
// let taht = this
@@ -167,9 +168,9 @@
...res.data,
qrCode: id
}),
fail(e) {
console.log(e, '跳转失败')
}
// fail(e) {
// console.log(e, '跳转失败')
// }
})
}
})