Files
biz-mobile-cloud-zax/src/sheep/api/order.ts
T
2026-08-04 17:10:59 +08:00

193 lines
4.4 KiB
TypeScript
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.
import request from "@/sheep/utils/request"
export default {
// 核销线上预订
rserveCancelOrder: (orderId: string) =>
request({
url: `/hard/hard-order/app/rserve-cancel-order/${orderId}`,
method: "PUT",
}),
// 查询食堂订餐订单列表
caneenRservePageJoin: (params: any) =>
request({
url: `/hard/hard-order/app/caneen-rserve-page-join`,
method: "GET",
params,
}),
// 查询食堂订餐的所有商户统计
caneenRserveMchTotal: (params: any) =>
request({
url: `/hard/hard-order/app/caneen-rserve-mch-total`,
method: "GET",
params,
}),
// 食堂订单
page: (params: any) =>
request({
url: `/hard/hard-order/app/page-join`,
method: "GET",
params,
}),
// 食堂订单
caneenPage: (params: any) =>
request({
url: `/hard/hard-order/app/caneen-page-join`,
method: "GET",
params,
}),
supPage: (params: any) =>
request({
url: `/hard/hard-order/app/sup-page-join`,
method: "GET",
params,
}),
// 共富商城订单
farmerSpuPage: (params: any) =>
request({
url: `/hard/hard-order/app/farmer-page-join`,
method: "GET",
params,
}),
detail: (params: any) =>
request({
url: `/hard/hard-order/app/detail`,
method: "GET",
params,
}),
// 设备扫码待支付订单尚未绑定用户,使用只返回支付必要字段的受限接口
scanPayDetail: (params: { id: string; merchantId: string }) =>
request({
url: `/hard/hard-order/app/scan-pay-detail`,
method: "GET",
params,
}),
// 商户核销确认详情,后端按商户数据范围鉴权且不返回用户核销码
mchReserveDetail: (params: { id: string }) =>
request({
url: `/hard/hard-order/app/mch-reserve-detail`,
method: "GET",
params,
}),
shopCarList: (params: any) =>
request({
url: `/hard/hard-car/app/order-id`,
method: "GET",
params,
}),
// 查询父亲购物车
getParentCar: (params: any) =>
request({
url: `/hard/hard-car/app/parent-car`,
method: "GET",
params,
}),
getShopCar: (params: any) =>
request({
url: `/hard/hard-car/app/mch-detail`,
method: "GET",
params,
}),
updateShopCar: (data: any) =>
request({
url: `/hard/hard-car/app/save-or-upload`,
method: "POST",
data,
}),
/**
* 一次上传按日期餐段拆分的多组购物车,并按请求分组顺序返回父购物车 ID。
*/
batchSaveShopCar: (data: any) =>
request({
url: `/hard/hard-car/app/batch-save-or-upload`,
method: "POST",
data,
}),
/**
* 批量上传每日菜谱购物车,商品 ID 由服务端按 canteen_spu.id 解析。
*/
batchSaveDailyMenuCart: (data: any) =>
request({
url: `/hard/hard-car/app/daily-menu/batch-save-or-upload`,
method: "POST",
data,
}),
/**
* 预约时间列表
*/
apptList: (params: any) =>
request({
url: "/hard/hard-appt/app/list",
method: "GET",
params,
}),
apptV2List: (params: any) =>
request({
url: "/hard/hard-appt/app/v2/list",
method: "GET",
params,
}),
apptV3List: (params: any) =>
request({
url: "/hard/hard-appt/app/v3/list",
method: "GET",
params,
}),
/**
* 查询当前用户的预约订单
*/
userApptList: (params?: { dinerUserIds?: string[] }) =>
request({
url: "/hard/hard-order/app/user-appt-list",
method: "GET",
params,
}),
/**
* 外卖预约配送可选时段(与下单校验同源,见 take-out-scheduled-delivery 业务说明 §6.3)
* GET /app/hard-order/app/take-out/delivery-time-slots
*/
takeOutDeliveryTimeSlots: (params: {
merchantId: string | number
/** yyyy-MM-dd,起始配送日;不传默认今天 */
expectDate?: string
/** 连续天数,默认 1,最大 14 */
days?: number
slotMinutes?: number
leadMinutes?: number
}) =>
request({
url: "/hard/hard-order/app/take-out/delivery-time-slots",
method: "GET",
params,
}),
/**
* 用户确认设备二维码扫一扫订单
* @param orderId 订单id
* @param walletTypeId 钱包类型ID
*/
doneHardQrCodeScanOrder: (data: any) =>
request({
url: "/hard/hard-api/ad/done-hard-qr-code-order",
method: "POST",
data,
}),
/**
* 创建商城预约订单
*/
appCreateShopReserveOrder: (data: any) =>
request({
url: "/hard/hard-order/app/create-shop-order",
method: "POST",
data,
}),
/**
* 确认收货
* @param orderId 订单id
*/
confirmReceipt: (orderId: string) =>
request({
url: `/hard/hard-order/app/confirm-receipt/${orderId}`,
method: "PUT",
}),
}