mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-09-21 20:32:01 +08:00
feat: 补齐预约下单售后链路,并接入礼品卡结算
立即购买先选时段再结算,免物流地址,售后按数量退款;同步接入礼品卡入口。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
52
api/appointment.js
Normal file
52
api/appointment.js
Normal 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 || {},
|
||||
})
|
||||
}
|
||||
@@ -202,4 +202,40 @@ export function getMineBargainLog(params) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询当前客户礼品卡
|
||||
*/
|
||||
export function getGiftCardCashMemberCardPage(params) {
|
||||
return http.request({
|
||||
url: '/promotion/giftCardCash/memberCard',
|
||||
method: Method.GET,
|
||||
needToken: true,
|
||||
params,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定礼品卡(卡号 + 兑换码/卡密)
|
||||
*/
|
||||
export function bindGiftCardCashMemberCard(data) {
|
||||
return http.request({
|
||||
url: '/promotion/giftCardCash/memberCard/bind',
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
header: { 'content-type': 'application/json' },
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 激活礼品卡
|
||||
*/
|
||||
export function activateGiftCardCashMemberCard(memberCardId) {
|
||||
return http.request({
|
||||
url: `/promotion/giftCardCash/memberCard/${memberCardId}/activate`,
|
||||
method: Method.POST,
|
||||
needToken: true,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user