From a105006e0f614ed334b32865f344662e8d07100b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=B2=E4=B9=88=E4=BA=86?= Date: Thu, 31 Aug 2023 09:29:40 +0800 Subject: [PATCH] 1.2.4 --- androidPrivacy.json | 3 +++ manifest.json | 4 ++-- pages/device/APF/detail.vue | 17 ++++++++++++++++- pages/index/index.vue | 32 ++++++++++++++++++++------------ 4 files changed, 41 insertions(+), 15 deletions(-) create mode 100644 androidPrivacy.json diff --git a/androidPrivacy.json b/androidPrivacy.json new file mode 100644 index 0000000..a78485c --- /dev/null +++ b/androidPrivacy.json @@ -0,0 +1,3 @@ +{ + "prompt" : "none" +} diff --git a/manifest.json b/manifest.json index 63af642..0c90d78 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "灿能物联", "appid" : "__UNI__88BC25B", "description" : "", - "versionName" : "1.2.2", - "versionCode" : 122, + "versionName" : "1.2.4", + "versionCode" : 124, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/pages/device/APF/detail.vue b/pages/device/APF/detail.vue index 6d4b4f8..b4b2cef 100644 --- a/pages/device/APF/detail.vue +++ b/pages/device/APF/detail.vue @@ -6,7 +6,7 @@ { + console.log(res) + pathToBase64(res.tempFilePath).then((res) => { + console.log(res) + this.topoImg = res + }) + }, + }) + + }, init() { console.log('init') @@ -255,6 +269,7 @@ export default { queryTopologyDiagram(this.devId).then((res) => { res.data.filePath = this.$config.static + res.data.filePath this.deviceInfo = res.data + this.downloadImg() uni.setNavigationBarTitle({title: this.deviceInfo.devName || '设备详情'}) this.topolodyData.filter((item) => { let index = this.deviceInfo.appsLineTopologyDiagramPO.findIndex((element) => { diff --git a/pages/index/index.vue b/pages/index/index.vue index 2a8c72d..a074137 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -92,12 +92,12 @@ export default { url: '/pages/home/selectEngineering', }) } else { - if(this.userInfo.authorities === 'tourist'){ + if (this.userInfo.authorities === 'tourist') { return uni.showToast({ title: '此功能仅对VIP用户开放', icon: 'none', }) - }else if(this.userInfo.authorities === 'market_user'){ + } else if (this.userInfo.authorities === 'market_user') { return uni.showToast({ title: '请联系管理员配置工程', icon: 'none', @@ -171,17 +171,25 @@ export default { }, onShow() { this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo) - if ( - this.userInfo.authorities === 'app_vip_user' || - this.userInfo.authorities == 5 || - this.userInfo.authorities === 'tourist' - ) { - // uni.setTabBarBadge({ - // index: 1, - // text: '6', - // }) + let access_token = uni.getStorageSync(this.$cacheKey.access_token) + if (!access_token) { + uni.reLaunch({ + url: `/pages/user/login` + }) + } else { + if ( + this.userInfo.authorities === 'app_vip_user' || + this.userInfo.authorities == 5 || + this.userInfo.authorities === 'tourist' + ) { + // uni.setTabBarBadge({ + // index: 1, + // text: '6', + // }) + } + this.init() } - this.init() + }, }