页面优化

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

@@ -2,8 +2,8 @@
"name" : "灿能物联",
"appid" : "__UNI__88BC25B",
"description" : "",
"versionName" : "1.2.8",
"versionCode" : 127,
"versionName" : "1.2.9",
"versionCode" : 129,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@@ -16,9 +16,10 @@
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"useOriginalMsgbox" : true,
"alwaysShowBeforeRender" : false,
"waiting" : true,
"autoclose" : true,
"autoclose" : false,
"delay" : 0
},
/* */
@@ -107,9 +108,6 @@
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
},
"splashscreen" : {
"useOriginalMsgbox" : true
}
}
},

View File

@@ -4,7 +4,8 @@
{
"path": "pages/index/index",
"style": {
"navigationStyle": "custom"
"navigationStyle": "custom",
"enablePullDownRefresh": true
}
},
{
@@ -480,8 +481,9 @@
"navigationBarTextStyle": "black",
"navigationBarTitleText": "灿能电力",
"navigationBarBackgroundColor": "#ffffff",
"backgroundColor": "#f3f4f5",
"backgroundColor": "#f3f4f5"
// #ifdef H5
,
"navigationStyle": "custom"
// #endif
},

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