Files
lilishop-uniapp/api/appointment.js
pikachu1995@126.com 2107e3f03a feat: 补齐预约下单售后链路,并接入礼品卡结算
立即购买先选时段再结算,免物流地址,售后按数量退款;同步接入礼品卡入口。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-20 17:07:27 +08:00

53 lines
1.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 预约服务买家端 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 || {},
})
}