修复我的页身份和规划日周视图

This commit is contained in:
2026-06-27 01:46:44 +08:00
parent 223cd755a2
commit 28219e5fc2
7 changed files with 107 additions and 16 deletions
+12 -1
View File
@@ -1,9 +1,18 @@
const { BRAND_CONFIG } = require('../../utils/config')
function resolveRoleText(type) {
const role = Number(type)
if (role === 2) return '店长'
if (role === 3) return '美甲师'
if (role === 4) return '管理员'
return '管理端'
}
Page({
data: {
shopName: BRAND_CONFIG.defaultShopName,
phone: '店长端',
roleText: '管理端',
menus: [
{ title: '店铺设置', url: '/pages/shop-settings/index' },
{ title: '数据导出', url: '/pages/export/index' },
@@ -14,9 +23,11 @@ Page({
onShow() {
const app = getApp()
const userInfo = app.globalData.userInfo || {}
this.setData({
shopName: app.globalData.shopName || BRAND_CONFIG.appName,
phone: (app.globalData.userInfo && (app.globalData.userInfo.phone || app.globalData.userInfo.account)) || '店长端'
phone: userInfo.phone || userInfo.account || '店长端',
roleText: resolveRoleText(userInfo.type)
})
},