页面优化
This commit is contained in:
@@ -74,6 +74,9 @@ export default {
|
||||
timer: null,
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
console.log('onPullDownRefresh')
|
||||
},
|
||||
computed: {
|
||||
emptyEngineeringName() {
|
||||
if (this.userInfo.authorities === 'tourist') {
|
||||
@@ -141,6 +144,7 @@ export default {
|
||||
this.$refs.device && this.$refs.device.init()
|
||||
})
|
||||
}
|
||||
this.$refs.gongCheng?.init()
|
||||
},
|
||||
getDevCount() {
|
||||
if (!this.select.engineeringId) return
|
||||
@@ -196,7 +200,18 @@ export default {
|
||||
if (!uni.getStorageSync(this.$cacheKey.access_token)) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/user/login',
|
||||
success: () => {
|
||||
// #ifdef APP-PLUS
|
||||
plus.navigator.closeSplashscreen()
|
||||
// #endif
|
||||
},
|
||||
})
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
// #ifdef APP-PLUS
|
||||
plus.navigator.closeSplashscreen()
|
||||
// #endif
|
||||
}, 1000)
|
||||
}
|
||||
this.timer = setInterval(this.getDevCount, 3000) // 定时请求
|
||||
this.store = this.DataSource('/cs-device-boot/EquipmentDelivery/queryEquipmentByProject')
|
||||
@@ -216,14 +231,13 @@ export default {
|
||||
onShow() {
|
||||
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
|
||||
let access_token = uni.getStorageSync(this.$cacheKey.access_token)
|
||||
console.log(access_token)
|
||||
if (!access_token) {
|
||||
uni.reLaunch({
|
||||
url: `/pages/user/login`,
|
||||
})
|
||||
} else {
|
||||
this.init()
|
||||
console.log(this.$refs.gongCheng);
|
||||
this.$refs.gongCheng?.init()
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user