页面优化

This commit is contained in:
仲么了
2023-09-25 11:04:57 +08:00
parent c727be80c0
commit 012b5ff87c
3 changed files with 25 additions and 11 deletions

View File

@@ -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()
}
},
}