feat: harden appointment flow and refresh handoff docs

This commit is contained in:
xiaowang
2026-06-10 00:19:49 +08:00
parent 784bb0a965
commit 8093e07190
64 changed files with 4537 additions and 77 deletions
@@ -3,6 +3,10 @@ const productsApi = require('../../api/products')
const mock = require('../../utils/mock')
const dateUtil = require('../../utils/date')
function buildClientRequestId(prefix) {
return `${prefix}-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`
}
Page({
data: {
form: {
@@ -154,7 +158,8 @@ Page({
...form,
productId: Number(form.productId),
artistId: Number(form.artistId),
durationMinutes: Number(form.durationMinutes || 0) || undefined
durationMinutes: Number(form.durationMinutes || 0) || undefined,
clientRequestId: buildClientRequestId('manager-appointment')
})
wx.redirectTo({ url: `/pages/appointment-detail/index?id=${result.orderItemId}` })
} catch (error) {
@@ -1,6 +1,6 @@
Page({
data: {
shopName: 'Yumi Nail',
shopName: 'Fingertip Designer',
phone: '店长端',
menus: [
{ title: '店铺设置', url: '/pages/shop-settings/index' },
@@ -21,7 +21,7 @@
</view>
<view class="field">
<text class="field-label">店铺名称</text>
<input value="{{form.shopName}}" data-field="shopName" bindinput="onInput" placeholder="例如:Yumi Nail" />
<input value="{{form.shopName}}" data-field="shopName" bindinput="onInput" placeholder="例如:Fingertip Designer" />
</view>
</view>
@@ -1,6 +1,6 @@
Page({
data: {
form: { shopName: 'Yumi Nail', startTime: '10:00', endTime: '22:00', defaultDuration: 60, rule: '必须选择已有作品作为项目来源' }
form: { shopName: 'Fingertip Designer', startTime: '10:00', endTime: '22:00', defaultDuration: 60, rule: '必须选择已有作品作为项目来源' }
},
onInput(event) { this.setData({ [`form.${event.currentTarget.dataset.field}`]: event.detail.value }) },
onStartChange(event) { this.setData({ 'form.startTime': event.detail.value }) },