页面切图
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
<template>
|
||||
<Cn-page :loading='loading'>
|
||||
<view slot='body'>
|
||||
<view class='index'>
|
||||
<uni-card title="网关信息" sub-title="副标题" v-for="item in 3" :key="item" @click="jump"
|
||||
thumbnail="/static/gateway.png">
|
||||
<view class="footer">
|
||||
<text>设备基础信息 </text>
|
||||
<view class="footer-btn" @click="newDevice">注册设备</view>
|
||||
<view class='index' :class="{ 'device': userInfo.role == '5' }">
|
||||
<uni-card title="监测网关" sub-title="监测" @click="look" thumbnail="/static/gateway.png"
|
||||
:padding="userInfo.role == '5' ? 0 : '10px'">
|
||||
<view class="footer" v-if="userInfo.role != 5">
|
||||
<text style="flex:1"> </text>
|
||||
<view class="footer-btn" @click.stop="newDevice">注册设备</view>
|
||||
<view class="footer-btn ml20">查看</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
<uni-card title="用能网关" sub-title="用能" @click="look" thumbnail="/static/gateway.png"
|
||||
:padding="userInfo.role == '5' ? 0 : '10px'">
|
||||
<view class="footer" v-if="userInfo.role != 5">
|
||||
<text style="flex:1"> </text>
|
||||
<view class="footer-btn" @click.stop="newDevice">注册设备</view>
|
||||
<view class="footer-btn ml20">查看</view>
|
||||
</view>
|
||||
</uni-card>
|
||||
<uni-load-more status="nomore"></uni-load-more>
|
||||
@@ -18,9 +27,13 @@
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
loading: false
|
||||
loading: false,
|
||||
userInfo: {}
|
||||
}
|
||||
},
|
||||
onLoad (options) {
|
||||
this.userInfo = uni.getStorageSync('userInfo')
|
||||
},
|
||||
methods: {
|
||||
newDevice () {
|
||||
// uni.scanCode({
|
||||
@@ -34,11 +47,17 @@ export default {
|
||||
url: '/pages/gateway/newDevice'
|
||||
})
|
||||
},
|
||||
look () {
|
||||
uni.navigateTo({
|
||||
url: '/pages/gateway/detail'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
.index {
|
||||
padding-top: 20rpx;
|
||||
.footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
Reference in New Issue
Block a user