修复管理师端预约与登录体验

This commit is contained in:
2026-06-26 11:07:54 +08:00
parent f1fdf6e5d3
commit 078a2b32cd
48 changed files with 1044 additions and 276 deletions
+18 -9
View File
@@ -7,14 +7,6 @@ function canCreateAppointment() {
return Number(userInfo.type) !== 3
}
function buildEmptyCalendar() {
return {
artists: [],
appointments: [],
daySummaries: []
}
}
function resolveCalendarErrorMessage(error) {
return error && error.message ? error.message : '规划数据加载失败'
}
@@ -153,7 +145,7 @@ Page({
this.applyCalendar(data)
this.setData({ calendarError: '' })
} catch (error) {
this.applyCalendar(buildEmptyCalendar())
this.clearCalendarView()
this.setData({
calendarError: resolveCalendarErrorMessage(error),
selectedArtistId: '',
@@ -168,6 +160,23 @@ Page({
}
},
clearCalendarView() {
this.setData({
businessStartTime: '10:00',
businessEndTime: '22:00',
artists: [],
appointments: [],
daySummaries: [],
monthDays: [],
weekDays: [],
dayLanes: [],
hours: [],
dayTotal: 0,
freeArtistCount: 0,
pendingCount: 0
})
},
resolveRange() {
const current = this.data.currentDateText
if (this.data.viewMode === 'week') {