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

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
+12
View File
@@ -2,6 +2,12 @@ const planningApi = require('../../api/planning')
const dateUtil = require('../../utils/date')
const mock = require('../../utils/mock')
function canCreateAppointment() {
const app = getApp()
const userInfo = app.globalData.userInfo || {}
return Number(userInfo.type) !== 3
}
Page({
data: {
viewMode: 'month',
@@ -40,10 +46,12 @@ Page({
dayTotal: 0,
freeArtistCount: 0,
pendingCount: 0,
canCreateAppointment: true,
loading: false
},
onLoad() {
this.setData({ canCreateAppointment: canCreateAppointment() })
this.loadCalendar()
},
@@ -327,6 +335,10 @@ Page({
},
createAppointment() {
if (!this.data.canCreateAppointment) {
wx.showToast({ title: '美甲师账号只能查看预约', icon: 'none' })
return
}
wx.navigateTo({
url: `/pages/appointment-form/index?date=${this.data.currentDateText}&artistId=${this.data.selectedArtistId || ''}`
})
+1 -1
View File
@@ -139,5 +139,5 @@
</view>
</view>
<button class="fab" bindtap="createAppointment">+</button>
<button wx:if="{{canCreateAppointment}}" class="fab" bindtap="createAppointment">+</button>
</view>