Commit f00f63e0 authored by Facius's avatar Facius

超级用户

parent 859346a5
...@@ -17,12 +17,14 @@ ...@@ -17,12 +17,14 @@
<u-icon class="tel-arrow-icon" name="arrow-up-fill"></u-icon> <u-icon class="tel-arrow-icon" name="arrow-up-fill"></u-icon>
</view> </view>
</view> </view>
<view v-if="isSuperuser" class="super-button"><u-button@click="$u.throttle(handleSuperButton, 500)">切换用户</u-button></view>
</view> </view>
<view class="header-right-view" @click="$u.throttle(handleClickSetting, 500)"> <view class="header-right-view" @click="$u.throttle(handleClickSetting, 500)">
<view class="setting-view">
<image :src="shezhiImage" class="right-image-view"></image> <image :src="shezhiImage" class="right-image-view"></image>
<text>设置</text> <text>设置</text>
</view> </view>
<view v-if="isSuperuser" class="super-button"><u-button@click="handleSuperButton">切换用户</u-button></view>
</view>
</view> </view>
<view class="ware-house-view"> <view class="ware-house-view">
<view class="ware-house-title">仓配功能</view> <view class="ware-house-title">仓配功能</view>
...@@ -186,6 +188,13 @@ ...@@ -186,6 +188,13 @@
return this.vuex_superuser return this.vuex_superuser
} }
}, },
watch: {
vuex_token(val, oldVal) {
if (val && !this.isSuperuser) {
this.allowLogin()
}
},
},
onLoad() { onLoad() {
app.trackPage('我的首页') app.trackPage('我的首页')
if(this.vuex_token ) { if(this.vuex_token ) {
...@@ -327,11 +336,9 @@ ...@@ -327,11 +336,9 @@
} }
} }
} }
.super-button {
margin-left: 20rpx;
}
} }
.header-right-view { .header-right-view {
.setting-view {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
...@@ -345,6 +352,11 @@ ...@@ -345,6 +352,11 @@
margin-right: 10rpx; margin-right: 10rpx;
} }
} }
.super-button {
margin-top: 20rpx;
}
}
} }
.ware-house-view { .ware-house-view {
background-color: #FFFFFF; background-color: #FFFFFF;
......
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