feat: 补齐预约下单售后链路,并接入礼品卡结算

立即购买先选时段再结算,免物流地址,售后按数量退款;同步接入礼品卡入口。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
pikachu1995@126.com
2026-09-20 17:07:27 +08:00
parent 2ad8a7f5a6
commit 2107e3f03a
15 changed files with 2186 additions and 71 deletions

52
api/appointment.js Normal file
View File

@@ -0,0 +1,52 @@
/**
* 预约服务买家端 API
*/
import { http, Method } from '@/utils/request.js'
/** 查询可预约时段 */
export function listSlots(skuId, slotDate) {
return http.request({
url: '/buyer/appointment/slots',
method: Method.GET,
needToken: true,
params: { skuId, slotDate },
})
}
/** 绑定预约结算上下文addToCart 后、createTrade 前) */
export function bindCheckout(data) {
return http.request({
url: '/buyer/appointment/checkout/bind',
method: Method.POST,
needToken: true,
data,
})
}
/** 预约商品扩展配置 */
export function getGoodsExt(goodsId) {
return http.request({
url: `/buyer/appointment/goods/${goodsId}/ext`,
method: Method.GET,
needToken: false,
})
}
/** 买家预约订单详情(时段、核销码) */
export function getAppointmentOrderDetail(orderSn) {
return http.request({
url: `/buyer/appointment/order/${orderSn}`,
method: Method.GET,
needToken: true,
})
}
/** 改期申请 */
export function requestReschedule(orderSn, payload) {
return http.request({
url: `/buyer/appointment/orders/${orderSn}/reschedule`,
method: Method.POST,
needToken: true,
data: payload || {},
})
}