小程序页面视觉对齐二期:预约图片轮播、订单数据预览、微信用户关联与请假管理
新增预约详情作品图片轮播字段与组装;新增订单预览与未关联微信用户候选接口;补齐请假记录查询接口;订单数据预览改为四列;请假管理接入真实排班例外并支持新增;日程、我的、美甲师详情与改派选择器按设计稿微调;注册结果页与申请提交时间对齐设计稿。
This commit is contained in:
@@ -21,10 +21,21 @@ function resolveIdentityRole(type) {
|
||||
return ''
|
||||
}
|
||||
|
||||
const MANAGER_MENUS = [
|
||||
{ title: '个人信息', url: '/pages/profile-edit/index' },
|
||||
{ title: '店铺信息', url: '/pages/shop-settings/index' },
|
||||
{ title: '账号安全', url: '/pages/account-settings/index' },
|
||||
{ title: '订单数据', url: '/pages/export/index' },
|
||||
{ title: '关于系统', url: '/pages/about/index' }
|
||||
]
|
||||
|
||||
const ARTIST_MENUS = MANAGER_MENUS.filter(item => item.title !== '店铺信息')
|
||||
|
||||
Page({
|
||||
data: {
|
||||
roleText: '管理端',
|
||||
identityRole: '',
|
||||
activeRole: '',
|
||||
profileCard: buildProfileCard({}, BRAND_CONFIG.defaultShopName),
|
||||
overviewLoading: false,
|
||||
overview: {
|
||||
@@ -37,13 +48,7 @@ Page({
|
||||
shopOpen: true,
|
||||
shopStatus: '营业中'
|
||||
},
|
||||
menus: [
|
||||
{ title: '个人信息', url: '/pages/profile-edit/index' },
|
||||
{ title: '店铺信息', url: '/pages/shop-settings/index' },
|
||||
{ title: '账号安全', url: '/pages/account-settings/index' },
|
||||
{ title: '订单数据', url: '/pages/export/index' },
|
||||
{ title: '关于系统', url: '/pages/about/index' }
|
||||
]
|
||||
menus: MANAGER_MENUS
|
||||
},
|
||||
|
||||
onShow() {
|
||||
@@ -88,13 +93,26 @@ Page({
|
||||
const app = getApp()
|
||||
const userInfo = app.globalData.userInfo || {}
|
||||
const fallbackShopName = app.globalData.shopName || BRAND_CONFIG.defaultShopName
|
||||
const identityRole = resolveIdentityRole(userInfo.type)
|
||||
const activeRole = this.data.activeRole || identityRole
|
||||
this.setData({
|
||||
roleText: resolveRoleText(userInfo.type),
|
||||
identityRole: resolveIdentityRole(userInfo.type),
|
||||
identityRole,
|
||||
activeRole,
|
||||
menus: activeRole === 'artist' ? ARTIST_MENUS : MANAGER_MENUS,
|
||||
profileCard: buildProfileCard(userInfo, fallbackShopName)
|
||||
})
|
||||
},
|
||||
|
||||
switchRole(event) {
|
||||
const role = event.currentTarget.dataset.role
|
||||
if (!role || role === this.data.activeRole) return
|
||||
this.setData({
|
||||
activeRole: role,
|
||||
menus: role === 'artist' ? ARTIST_MENUS : MANAGER_MENUS
|
||||
})
|
||||
},
|
||||
|
||||
go(event) {
|
||||
wx.navigateTo({ url: event.currentTarget.dataset.url })
|
||||
},
|
||||
@@ -150,9 +168,13 @@ Page({
|
||||
shopName: nextUserInfo.shopName || session.shopName,
|
||||
userInfo: nextUserInfo
|
||||
})
|
||||
const identityRole = resolveIdentityRole(nextUserInfo.type)
|
||||
const activeRole = this.data.activeRole || identityRole
|
||||
this.setData({
|
||||
roleText: resolveRoleText(nextUserInfo.type),
|
||||
identityRole: resolveIdentityRole(nextUserInfo.type),
|
||||
identityRole,
|
||||
activeRole,
|
||||
menus: activeRole === 'artist' ? ARTIST_MENUS : MANAGER_MENUS,
|
||||
profileCard: buildProfileCard(nextUserInfo, BRAND_CONFIG.defaultShopName)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user