feat: 订单列表
This commit is contained in:
23
mock/login.ts
Normal file
23
mock/login.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import type { Request, Response } from "express";
|
||||
const logout = (_req: Request, res: Response) => {
|
||||
res.json({
|
||||
code: 0,
|
||||
data: true,
|
||||
msg: "",
|
||||
});
|
||||
};
|
||||
|
||||
export default {
|
||||
"POST /system/auth/logout": logout,
|
||||
"GET /system/tenant/get-id-by-name": {
|
||||
data: 1,
|
||||
},
|
||||
"POST /system/auth/login": {
|
||||
data: {
|
||||
accessToken: "e0a58d5267d246d3a478e8c4c96051d9",
|
||||
expiresTime: 1760583658965,
|
||||
refreshToken: "9667e5f1a1c24c02814284aa116ea769",
|
||||
userId: 1,
|
||||
},
|
||||
},
|
||||
};
|
||||
142
mock/order.ts
Normal file
142
mock/order.ts
Normal file
@@ -0,0 +1,142 @@
|
||||
import type { Request, Response } from "express";
|
||||
const getOrderPage = (_req: Request, res: Response) => {
|
||||
res.json({
|
||||
data: {
|
||||
list: [
|
||||
{
|
||||
id: 1,
|
||||
orderNum: "BZ000548787",
|
||||
createTime: "2025-10-1 14:00:00",
|
||||
orderCategoryName: "宠物殡葬", // 订单类目
|
||||
orderTerminal: 0, // 订单来源
|
||||
userId: 0, // 用户编号
|
||||
userName: "", // 用户姓名
|
||||
userNickName: "张宁清", // 用户昵称
|
||||
userAvatar: "", // 用户头像
|
||||
userMobile: "18634556151", // 用户手机号
|
||||
orderStatus: 2, // 订单状态
|
||||
picUrl: "", // 商品图片
|
||||
spuName:
|
||||
"商品主标题商品主标题商品主标题商品主标题商品主题商品主标题商品主标题商品主", // 商品名称
|
||||
skuName: "标准,单独火化,基础清洁", // 商品规格
|
||||
count: 1, // 购买商品数量
|
||||
price: 100, // 单价
|
||||
handedPrice: 80, // 到手价
|
||||
payPrice: "500", // 应付金额
|
||||
unit: "", // 单位
|
||||
subTime: "", // 预约时间
|
||||
serveAddress: "张宁清,18659156151,福州 台江区 鳌峰路 万达中心甲",
|
||||
userRemark: "你好呀你好元", // 用户备注
|
||||
payType: "wx", // 微信
|
||||
financeStatus: "1", // 财务状态
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
orderNum: "3214421412",
|
||||
createTime: "",
|
||||
orderCategoryName: "",
|
||||
orderTerminal: 0,
|
||||
userId: 0,
|
||||
userName: "",
|
||||
userNickName: "",
|
||||
userAvatar: "",
|
||||
userMobile: "",
|
||||
orderStatus: 0,
|
||||
picUrl: "",
|
||||
spuName: "",
|
||||
skuName: "",
|
||||
count: 0,
|
||||
price: 0,
|
||||
handedPrice: 0,
|
||||
payPrice: 0,
|
||||
unit: "",
|
||||
orderTime: "",
|
||||
serveAddress: "",
|
||||
userRemark: "",
|
||||
payType: "",
|
||||
financeStatus: "",
|
||||
},
|
||||
],
|
||||
total: 0,
|
||||
},
|
||||
code: 0,
|
||||
});
|
||||
};
|
||||
|
||||
const getOrderDetail = (_req: Request, res: Response) => {
|
||||
res.json({
|
||||
data: {
|
||||
code: 0,
|
||||
data: {
|
||||
tradeOrderInfoBase: {
|
||||
id: "",
|
||||
orderNo: "",
|
||||
orderStatus: "",
|
||||
orderType: "",
|
||||
orderCategoryNameAndId: "",
|
||||
orderTerminal: "",
|
||||
userInfo: "",
|
||||
cancelTime: "",
|
||||
cancelReason: "",
|
||||
merchantRemark: "",
|
||||
refundTime: "",
|
||||
propertyTime: "",
|
||||
propertyStatus: "",
|
||||
price: "",
|
||||
discountPrice: "",
|
||||
payPrice: 0,
|
||||
refundPrice: "",
|
||||
livePrice: "",
|
||||
payType: "",
|
||||
payChannelCode: "",
|
||||
payOrderId: "",
|
||||
payTime: "",
|
||||
createTime: "",
|
||||
finishTime: "",
|
||||
},
|
||||
tradeProductInfo: {
|
||||
shopLogoUrl: "",
|
||||
shopName: "",
|
||||
spuId: 0,
|
||||
skuId: 0,
|
||||
skuPicUrl: "",
|
||||
spuName: "",
|
||||
skuName: "",
|
||||
count: 0,
|
||||
price: 0,
|
||||
unit: "",
|
||||
handedPrice: 0,
|
||||
expensePrice: 0,
|
||||
properties: [""],
|
||||
serveContent: "",
|
||||
totalPrice: 0,
|
||||
discountPrice: 0,
|
||||
payPrice: 0,
|
||||
refundPrice: 0,
|
||||
refundCount: 0,
|
||||
},
|
||||
tradeServeInfo: {
|
||||
properties: {
|
||||
"": {},
|
||||
},
|
||||
},
|
||||
tradeExtendServeInfo: {
|
||||
properties: {
|
||||
"": {},
|
||||
},
|
||||
},
|
||||
tradeExtendCostInfo: {
|
||||
properties: {
|
||||
"": {},
|
||||
},
|
||||
},
|
||||
},
|
||||
msg: "",
|
||||
},
|
||||
code: 0,
|
||||
});
|
||||
};
|
||||
export default {
|
||||
"GET /admin-api/trade/order/page": getOrderPage,
|
||||
"GET /admin-api/trade/order/get-detail": getOrderDetail,
|
||||
};
|
||||
Reference in New Issue
Block a user