完善管理师预约项目与美甲师创建

This commit is contained in:
2026-06-24 20:54:41 +08:00
parent 03c972d90c
commit eda109cb62
28 changed files with 911 additions and 32 deletions
@@ -1,6 +1,13 @@
function canCreateAppointment() {
const app = getApp()
const userInfo = app.globalData.userInfo || {}
return Number(userInfo.type) !== 3
}
Page({
data: {
id: '',
canCreateAppointment: true,
avatarText: '客',
customer: { name: '王女士', phone: '138****1201' },
stats: { orderCount: 12, amount: 2860, lastTime: '06-01' },
@@ -12,10 +19,17 @@ Page({
},
onLoad(options) {
this.setData({ id: options.id || '' })
this.setData({
id: options.id || '',
canCreateAppointment: canCreateAppointment()
})
},
createAppointment() {
if (!this.data.canCreateAppointment) {
wx.showToast({ title: '美甲师账号只能查看预约', icon: 'none' })
return
}
wx.navigateTo({ url: '/pages/appointment-form/index' })
},