feat: harden appointment flow and refresh handoff docs
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user