From 222bae69d9119174893a5904105a6d6023b71034 Mon Sep 17 00:00:00 2001 From: Waiting Date: Wed, 10 Apr 2024 14:46:29 +0800 Subject: [PATCH] ... --- src/api/goods/index.ts | 17 +- src/api/goods/types.ts | 75 +------ src/api/groupbuy/index.ts | 1 + src/api/order/index.ts | 21 ++ src/api/order/types.ts | 74 +++++++ src/manifest.json | 2 +- src/pages/common/groupbuy/order-confirm.vue | 5 +- src/pages/mall/subs/order/order-confirm.vue | 59 ++++-- .../mine/subs/order/components/order-item.vue | 16 +- src/pages/mine/subs/order/detail.vue | 186 ++++++++++-------- src/pages/mine/subs/order/index.vue | 43 +++- src/project.private.config.json | 4 +- src/store/modules/user/index.ts | 4 +- src/utils/request/interceptors.ts | 10 +- 14 files changed, 304 insertions(+), 213 deletions(-) create mode 100644 src/api/order/index.ts create mode 100644 src/api/order/types.ts diff --git a/src/api/goods/index.ts b/src/api/goods/index.ts index 58e330c..7d23d9d 100644 --- a/src/api/goods/index.ts +++ b/src/api/goods/index.ts @@ -1,12 +1,10 @@ -import { get, post } from '@/utils'; +import { get } from '@/utils'; import { CategoryBean, GoodsBean } from '@/api/goods/types'; enum URL { categoryList = '/ext/goods/category_list', goodsList = '/ext/goods/query', - goodsDetail = '/ext/goods/info', - orderCreate = '/sales/wx_order_create', - orderList = '/sales/wx_query', + goodsDetail = '/ext/goods/info' } export const getCategoryList = () => get({ url: URL.categoryList }); @@ -14,14 +12,3 @@ export const getCategoryList = () => get({ url: URL.categoryList export const getGoodsList = (params: any) => get({ url: URL.goodsList, data: params }); export const getGoodsDetail = (goodsId: string) => get({ url: URL.goodsDetail + `?goodsId=${goodsId}` }); - -export const orderCreate = (data: any) => post({ url: URL.orderCreate, data }); - -export const getOrderList = (data: { - pageNum: number, - pageSize: number, - obj: { - payStatus: number - } -}) => post({ url: URL.orderList, data }); - diff --git a/src/api/goods/types.ts b/src/api/goods/types.ts index 98c8f72..5efda7f 100644 --- a/src/api/goods/types.ts +++ b/src/api/goods/types.ts @@ -7,6 +7,7 @@ export interface GoodsBean { id: string; goodsId: string; goodsName: string; + goodsCode: string, allow_integral: number; available: number; back_factory: number; @@ -63,78 +64,6 @@ export interface StockBean { sizeId: string; sizeName: string; stockId: string; + images: string, count: number; } - -export interface OrderBean { - allowIntegral: boolean; - bizId: string; - classify: number; - companyId: string; - consignTime: string; - consumerId: string; - consumerName: string; - coupon: string; - couponIds: string; - couponsStatus: number; - createTime: string; - creatorId: number; - creatorName: string; - device: string; - discount: number; - discountPrice: number; - finishTime: string; - freePrice: number; - goodsNum: number; - id: string; - integral: number; - itemNum: number; - marketingPrice: number; - marketingText: string; - modifierIds: string; - needPaid: number; - ogList: any[]; - orderGoods: GoodsBean[]; - changeStockNum: number; - consumePrice: number; - discountOriginPrice: number; - goodsCode: string; - goodsId: string; - goodsName: string; - goodsPriceModify: string; - goodsTypeName: string; - images: string; - offset: string; - orderId: string; - orderNo: string; - originPrice: number; - originStockNum: number; - priceModify: []; - produceIntegral: number; - salePrice: number; - stockId: string; - stockStock: StockBean[]; - payStatus: number; - payTypeIds: string; - printed: string; - produceIntegralNumber: number; - profit: string; - reducePrice: number; - relatedId: string; - remark: string; - replacementOrder: string; - saleNum: number; - salers: []; - status: number; - storeId: string; - storeName: string; - storeOrder: string; - totalPrice: number; - transactionPrice: number; - type: number; - typeName: string; - updateTime: string; - updated: boolean; - useGold: number; - wholePrice: number; -} diff --git a/src/api/groupbuy/index.ts b/src/api/groupbuy/index.ts index c7274ad..48b817d 100644 --- a/src/api/groupbuy/index.ts +++ b/src/api/groupbuy/index.ts @@ -20,5 +20,6 @@ export const getGroupBuyRecordList = (groupId: string, pageNum: number, pageSize export const preOrder = (data: any) => post({ url: 'wechat/coupons/group/pre_v2', data }); export const progress = (data: any) => post({ url: 'wechat/coupons/group/pay/progress', data }); + export const pay = (data: any) => post({ url: 'wechat/coupons/group/pay', data }); diff --git a/src/api/order/index.ts b/src/api/order/index.ts new file mode 100644 index 0000000..0a193c1 --- /dev/null +++ b/src/api/order/index.ts @@ -0,0 +1,21 @@ +import { get, post } from '@/utils'; + +enum URL { + orderCreate = '/sales/wx_order_create', + orderList = '/sales/wx_query', + orderDetail = '/order/wx_get/' +} + + +export const orderCreate = (data: any) => post({ url: URL.orderCreate, data }); + +export const getOrderList = (data: { + pageNum: number, + pageSize: number, + obj: { + payStatus: number + } +}) => post({ url: URL.orderList, data }); + +export const getOrderDetail = (orderId: string) => get({ url: URL.orderDetail + `${orderId}` }); + diff --git a/src/api/order/types.ts b/src/api/order/types.ts new file mode 100644 index 0000000..2b54e60 --- /dev/null +++ b/src/api/order/types.ts @@ -0,0 +1,74 @@ +import { GoodsBean, StockBean } from '@/api/goods/types'; + +export interface OrderBean { + allowIntegral: boolean; + bizId: string; + classify: number; + companyId: string; + consignTime: string; + consumerId: string; + consumerName: string; + coupon: string; + couponIds: string; + couponsStatus: number; + createTime: string; + creatorId: number; + creatorName: string; + device: string; + discount: number; + discountPrice: number; + finishTime: string; + freePrice: number; + goodsNum: number; + id: string; + integral: number; + itemNum: number; + marketingPrice: number; + marketingText: string; + modifierIds: string; + needPaid: number; + ogList: any[]; + orderGoods: GoodsBean[]; + changeStockNum: number; + consumePrice: number; + discountOriginPrice: number; + goodsCode: string; + goodsId: string; + goodsName: string; + goodsPriceModify: string; + goodsTypeName: string; + images: string; + offset: string; + orderId: string; + orderNo: string; + originPrice: number; + originStockNum: number; + priceModify: []; + produceIntegral: number; + salePrice: number; + stockId: string; + stockStock: StockBean[]; + payStatus: number; + payTypeIds: string; + printed: string; + produceIntegralNumber: number; + profit: string; + reducePrice: number; + relatedId: string; + remark: string; + replacementOrder: string; + saleNum: number; + salers: []; + status: number; + storeId: string; + storeName: string; + storeOrder: string; + totalPrice: number; + transactionPrice: number; + type: number; + typeName: string; + updateTime: string; + updated: boolean; + useGold: number; + wholePrice: number; +} diff --git a/src/manifest.json b/src/manifest.json index 1f3a621..84013ce 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,5 +1,5 @@ { - "name": "SURE-MP", + "name": "SUKE-MP", "appid": "", "description": "", "versionName": "1.0.0", diff --git a/src/pages/common/groupbuy/order-confirm.vue b/src/pages/common/groupbuy/order-confirm.vue index 49c1eb1..ba2bb0e 100644 --- a/src/pages/common/groupbuy/order-confirm.vue +++ b/src/pages/common/groupbuy/order-confirm.vue @@ -5,7 +5,7 @@