杂务:整理文档并收口 YumiNail 修复

This commit is contained in:
xiaowang
2026-05-21 18:43:59 +08:00
parent 3797938616
commit 9227ec6175
362 changed files with 8358 additions and 19928 deletions
@@ -15,7 +15,7 @@
<view class="surface-card">
<text class="section-title">账号密码登录</text>
<text class="section-desc">输入后台账号后,会自动预加载可登录店铺。管理员在系统尚无店铺时,也可无店铺登录并先进入店铺管理。</text>
<text class="section-desc">输入后台账号后,会自动识别登录范围。平台管理员可直接进入总览,也可选择本次登录店铺。</text>
<view class="field-group">
<text class="field-label">后台账号</text>
@@ -35,7 +35,7 @@
</picker>
</view>
<view wx:if="{{allowShoplessLogin || loginShopMessage}}" class="hint-card">{{loginShopMessage || '当前账号允许无店铺登录,可先进入店铺管理完成初始化。'}}</view>
<view wx:if="{{allowShoplessLogin || loginShopMessage}}" class="hint-card">{{loginShopMessage || '平台管理员可直接进入总览,也可选择本次登录店铺。'}}</view>
<view class="action-row">
<button class="primary-btn" loading="{{loading}}" disabled="{{loading}}" bindtap="handleSubmit">进入管理台</button>
@@ -8,7 +8,7 @@
<text class="hero-desc">这里不复刻网页后台的大表格首页,而是把可用模块拆成移动端更好点到的入口卡片。</text>
</view>
<view wx:if="{{!currentShop && userInfo && userInfo.type === 4}}" class="hint-card">当前是无店铺管理员登录状态。用户、作品、优惠券、标签、美甲师等强店铺模块会先置灰,避免误操作。</view>
<view wx:if="{{!currentShop && userInfo && userInfo.type === 4}}" class="hint-card">当前是平台总览模式。用户、作品、订单、优惠券、标签、美甲师等店铺业务可以查看,编辑操作由服务端关闭。</view>
<block wx:for="{{modules}}" wx:key="key">
<view class="list-card" data-module="{{item}}" bindtap="handleOpenModule">
@@ -17,7 +17,7 @@
<text class="list-title">{{item.title}}</text>
<text class="list-subtitle">{{item.description}}</text>
</view>
<text class="{{item.allowed ? 'badge' : 'soft-badge'}}">{{item.allowed ? '可进入' : '待解锁'}}</text>
<text class="{{item.allowed ? 'badge' : 'soft-badge'}}">{{item.readonly ? '仅查看' : (item.allowed ? '可进入' : '待解锁')}}</text>
</view>
<view wx:if="{{!item.allowed}}" class="hint-card">{{item.disabledReason}}</view>
</view>
@@ -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>
@@ -4,17 +4,17 @@
<view class="page-stack">
<view class="hero-panel">
<text class="hero-kicker">{{userInfo.nickname || userInfo.account || '后台账号'}}</text>
<text class="hero-title">{{currentShop ? currentShop.shopName : '无店铺登录工作台'}}</text>
<text class="hero-title">{{currentShop ? currentShop.shopName : '平台总览模式'}}</text>
<text class="hero-desc">当前身份:{{userInfo ? userInfo.type === 4 ? '平台管理员' : userInfo.type === 2 ? '店长' : '美甲师' : '--'}}。已同步 {{permissionCount}} 项后台权限。</text>
<view class="badge-row">
<text class="badge">{{currentShop ? '当前店铺已锁定' : '当前无店铺上下文'}}</text>
<text class="soft-badge">{{shoplessAdmin ? '先完成门店初始化' : '移动端工作流已就绪'}}</text>
<text class="badge">{{currentShop ? '当前店铺已锁定' : '平台总览'}}</text>
<text class="soft-badge">{{shoplessAdmin ? '店铺业务仅查看' : '移动端工作流已就绪'}}</text>
</view>
</view>
<view wx:if="{{shoplessAdmin}}" class="surface-card">
<text class="section-title">先创建第一家店铺</text>
<text class="section-desc">当前是无店铺管理员登录状态。为避免误进入强店铺范围页面,首版仅建议先完成店铺初始化,再继续订单、商品和用户管理。</text>
<text class="section-title">平台总览模式</text>
<text class="section-desc">当前管理员不绑定具体店铺,可查看全局数据和店铺业务列表;涉及新增、编辑、删除、发放等操作会被服务端拦截。</text>
<view class="action-row">
<button class="primary-btn" bindtap="handleOpenShops">进入店铺管理</button>
</view>