Commit 3158e4e5 by zhangzhen

细节优化

parent 760bfb9b
......@@ -31,3 +31,8 @@ export const deviceRun=(data)=>{
let url=`/device/openOrClose`
return http.post(url,data)
}
export const deviceCtrlAuth=()=>{
let url=`/store/storeListByConsumer`
return http.get(url)
}
......@@ -82,7 +82,7 @@
<text class="text-title">联系我们</text>
</view>
</view>
<view v-if="userInfo.roleType >= 2" class="cu-item arrow" @tap="onHandle(5)">
<view v-if="deviceRole" class="cu-item arrow" @tap="onHandle(5)">
<view class="content">
<image :src="assetsPath+'/my_list_4.png'" class="png" mode="aspectFit"></image>
<text class="text-title">设备控制</text>
......@@ -129,6 +129,7 @@
import {getUserInfo,loginOut,systemConfig} from "@/api/index.js"
import config from "@/config/index.config"
import LoginPop from "@/components/login/login"
import {deviceCtrlAuth} from '@/api/store.js'
export default {
components: {
......@@ -180,7 +181,8 @@
password:''
},
servicePhone:'',
userName:''
userName:'',
deviceRole:false
}
},
onShow() {
......@@ -240,6 +242,11 @@
this.userName = this.userInfo.phone.slice(-4);
uni.setStorageSync('userInfo',this.userInfo)
this.loginStatus = true;
deviceCtrlAuth().then(result => {
if(result.data.code == 200 && result.data.data.length){
this.deviceRole = true
}
})
}
})
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment