杂务:整理文档并收口 YumiNail 修复
This commit is contained in:
@@ -32,7 +32,7 @@ Page({
|
||||
permissionCodes: app.globalData.permissionCodes || [],
|
||||
roleLabel: userInfo ? permission.getRoleLabel(userInfo.type) : '--',
|
||||
shopScopeText,
|
||||
currentShopText: currentShop ? `当前店铺:${currentShop.shopName}` : '当前为无店铺登录'
|
||||
currentShopText: currentShop ? `当前店铺:${currentShop.shopName}` : '当前为平台总览模式'
|
||||
})
|
||||
},
|
||||
|
||||
@@ -54,18 +54,18 @@ Page({
|
||||
const result = await authApi.getLoginShops(userInfo.account)
|
||||
const shops = Array.isArray(result && result.shops) ? result.shops : []
|
||||
const allowShoplessLogin = Boolean(result && result.allowShoplessLogin)
|
||||
if (allowShoplessLogin && permission.isPlatformAdmin(userInfo)) {
|
||||
wx.showToast({
|
||||
title: '平台管理员固定为总览模式',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
const items = shops.map(shop => ({
|
||||
label: shop.shopName,
|
||||
value: shop.id
|
||||
}))
|
||||
|
||||
if (allowShoplessLogin && permission.isPlatformAdmin(userInfo)) {
|
||||
items.unshift({
|
||||
label: '无店铺登录',
|
||||
value: ''
|
||||
})
|
||||
}
|
||||
|
||||
if (!items.length) {
|
||||
wx.showToast({
|
||||
title: '当前账号没有可切换的店铺',
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
</view>
|
||||
<view class="meta-item">
|
||||
<text class="meta-label">店铺状态</text>
|
||||
<text class="meta-value">{{currentShop ? currentShop.shopName : '无店铺登录'}}</text>
|
||||
<text class="meta-value">{{currentShop ? currentShop.shopName : '平台总览模式'}}</text>
|
||||
</view>
|
||||
<view class="meta-item">
|
||||
<text class="meta-label">可登录店铺</text>
|
||||
<text class="meta-value">{{shopScopeText}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="action-row">
|
||||
<view wx:if="{{currentShop}}" class="action-row">
|
||||
<button class="secondary-btn" bindtap="handleSwitchShop">切换店铺</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user