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
+5
View File
@@ -37,6 +37,10 @@ const {
parseAppointmentParts
} = require('../../utils/format')
function buildClientRequestId(prefix) {
return `${prefix}-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`
}
/**
* Purpose: getCouponKey supports index.js by holding or executing the get coupon key page or API role.
* Usage: import, call, read, or update this function from the owning page/module while preserving the surrounding loading and permission flow.
@@ -774,6 +778,7 @@ Page({
await runWithLoading(() => orderApi.createOrder({
couponId: selectedCoupon ? selectedCoupon.id : undefined,
couponSourceType: selectedCoupon ? selectedCoupon.sourceType : (this.data.selectedCouponKey === NO_COUPON_KEY ? NO_COUPON_KEY : undefined),
clientRequestId: buildClientRequestId('mini-order'),
items: selectedItems.map(item => ({
productId: item.productId,
quantity: item.quantity,