This commit is contained in:
仲么了
2023-08-31 09:29:40 +08:00
parent 05b28a17e7
commit a105006e0f
4 changed files with 41 additions and 15 deletions

3
androidPrivacy.json Normal file
View File

@@ -0,0 +1,3 @@
{
"prompt" : "none"
}

View File

@@ -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" : {

View File

@@ -6,7 +6,7 @@
<Cn-htmlToImg domId="header" @renderFinish="renderFinish">
<view class="header" id="header" ref="header" @click="previewImg">
<img
:src="deviceInfo.filePath"
:src="topoImg"
style="width: 375px; display: block"
mode="widthFix"
@load="domLoading = false"
@@ -119,6 +119,7 @@ export default {
navMenuActive: 0,
navHeight: 0,
img: '',
topoImg:'',
navMenuList: [
{
text: '基本',
@@ -247,6 +248,19 @@ export default {
this.navMenuActive = idx
uni.pageScrollTo({scrollTop: 0, duration: 0})
},
downloadImg() {
uni.downloadFile({
url: this.deviceInfo.filePath,
success: (res) => {
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) => {

View File

@@ -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,6 +171,12 @@ export default {
},
onShow() {
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo)
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 ||
@@ -182,6 +188,8 @@ export default {
// })
}
this.init()
}
},
}
</script>