Commit f00f63e0 authored by Facius's avatar Facius

超级用户

parent 859346a5
......@@ -17,11 +17,13 @@
<u-icon class="tel-arrow-icon" name="arrow-up-fill"></u-icon>
</view>
</view>
<view v-if="isSuperuser" class="super-button"><u-button@click="$u.throttle(handleSuperButton, 500)">切换用户</u-button></view>
</view>
<view class="header-right-view" @click="$u.throttle(handleClickSetting, 500)">
<image :src="shezhiImage" class="right-image-view"></image>
<text>设置</text>
<view class="setting-view">
<image :src="shezhiImage" class="right-image-view"></image>
<text>设置</text>
</view>
<view v-if="isSuperuser" class="super-button"><u-button@click="handleSuperButton">切换用户</u-button></view>
</view>
</view>
<view class="ware-house-view">
......@@ -185,6 +187,13 @@
isSuperuser() {
return this.vuex_superuser
}
},
watch: {
vuex_token(val, oldVal) {
if (val && !this.isSuperuser) {
this.allowLogin()
}
},
},
onLoad() {
app.trackPage('我的首页')
......@@ -327,22 +336,25 @@
}
}
}
.super-button {
margin-left: 20rpx;
}
}
.header-right-view {
display: flex;
justify-content: flex-end;
align-items: center;
color: #FFFFFF;
margin-right: 4rpx;
font-size: 26rpx;
margin-top: -24rpx;
.right-image-view {
width: 34rpx;
height: 32rpx;
margin-right: 10rpx;
.setting-view {
display: flex;
justify-content: flex-end;
align-items: center;
color: #FFFFFF;
margin-right: 4rpx;
font-size: 26rpx;
margin-top: -24rpx;
.right-image-view {
width: 34rpx;
height: 32rpx;
margin-right: 10rpx;
}
}
.super-button {
margin-top: 20rpx;
}
}
}
......
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