用户协议优化
This commit is contained in:
@@ -15,26 +15,25 @@
|
||||
<text style="font-size: 32rpx; font-weight: 500">灿能物联</text>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<text class="hide-txt mr5" style="font-size: 28rpx">{{
|
||||
select.engineeringName || emptyEngineeringName
|
||||
}}
|
||||
<text class="hide-txt mr5" style="font-size: 28rpx"
|
||||
>{{ select.engineeringName || emptyEngineeringName }}
|
||||
</text>
|
||||
<uni-icons type="bottom" size="16" color="#111" v-if="select.engineeringName"></uni-icons>
|
||||
</template>
|
||||
</uni-nav-bar>
|
||||
<view class="index">
|
||||
<!-- 运维 -->
|
||||
<YunWei :devCount="devCount" v-if="userInfo.authorities === 'operation_manager'"/>
|
||||
<YunWei :devCount="devCount" v-if="userInfo.authorities === 'operation_manager'" />
|
||||
<!-- 专职 -->
|
||||
<ZhuanZhi :devCount="devCount" v-if="userInfo.authorities === 'market_user'"/>
|
||||
<ZhuanZhi :devCount="devCount" v-if="userInfo.authorities === 'market_user'" />
|
||||
<!-- 工程 -->
|
||||
<GongCheng :devCount="devCount" v-if="userInfo.authorities === 'engineering_user'"/>
|
||||
<GongCheng :devCount="devCount" v-if="userInfo.authorities === 'engineering_user'" />
|
||||
<!-- 主用户 -->
|
||||
<ZhuYongHu :devCount="devCount" v-if="userInfo.authorities === 'app_vip_user'"/>
|
||||
<ZhuYongHu :devCount="devCount" v-if="userInfo.authorities === 'app_vip_user'" />
|
||||
<YouKe :devCount="devCount" v-if="userInfo.authorities === 'tourist'"></YouKe>
|
||||
<template v-if="engineeringList.length">
|
||||
<view class="canneng-index-title mt20">设备列表</view>
|
||||
<Device ref="device" :store="store"/>
|
||||
<Device ref="device" :store="store" />
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
@@ -48,8 +47,8 @@ import ZhuanZhi from './comp/indexZhuanZhi.vue'
|
||||
import YouKe from './comp/indexYouKe.vue'
|
||||
import Device from './comp/device.vue'
|
||||
import list from '../../common/js/list'
|
||||
import {getDevCount} from '../../common/api/device.js'
|
||||
import {queryEngineering} from '@/common/api/engineering.js'
|
||||
import { getDevCount } from '../../common/api/device.js'
|
||||
import { queryEngineering } from '@/common/api/engineering.js'
|
||||
|
||||
export default {
|
||||
mixins: [list],
|
||||
@@ -71,7 +70,7 @@ export default {
|
||||
engineeringId: '',
|
||||
},
|
||||
engineeringList: [],
|
||||
navTabHeight: 0
|
||||
navTabHeight: 0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -83,7 +82,7 @@ export default {
|
||||
} else {
|
||||
return '创建工程'
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
selectEngineering() {
|
||||
@@ -153,19 +152,27 @@ export default {
|
||||
item.runStatus = 1
|
||||
})
|
||||
this.devCount.engineeringListLength = this.engineeringList.length
|
||||
console.log(this.devCount);
|
||||
console.log(this.devCount)
|
||||
})
|
||||
},
|
||||
},
|
||||
onLoad() {
|
||||
if (!uni.getStorageSync(this.$cacheKey.access_token)) {
|
||||
uni.reLaunch({
|
||||
url: '/pages/user/login',
|
||||
})
|
||||
}
|
||||
this.store = this.DataSource('/cs-device-boot/EquipmentDelivery/queryEquipmentByProject')
|
||||
// #ifdef APP-PLUS
|
||||
setTimeout(() => {
|
||||
// 获取nav高度
|
||||
uni.createSelectorQuery().select('.uni-navbar').boundingClientRect((rect) => {
|
||||
this.navTabHeight = rect.height
|
||||
console.log('calc(100vh - ' + this.navTabHeight + ')')
|
||||
}).exec()
|
||||
uni.createSelectorQuery()
|
||||
.select('.uni-navbar')
|
||||
.boundingClientRect((rect) => {
|
||||
this.navTabHeight = rect.height
|
||||
console.log('calc(100vh - ' + this.navTabHeight + ')')
|
||||
})
|
||||
.exec()
|
||||
}, 1000)
|
||||
// #endif
|
||||
},
|
||||
@@ -174,7 +181,7 @@ export default {
|
||||
let access_token = uni.getStorageSync(this.$cacheKey.access_token)
|
||||
if (!access_token) {
|
||||
uni.reLaunch({
|
||||
url: `/pages/user/login`
|
||||
url: `/pages/user/login`,
|
||||
})
|
||||
} else {
|
||||
if (
|
||||
@@ -189,7 +196,6 @@ export default {
|
||||
}
|
||||
this.init()
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user