From cfb0838170d62c4e71323335a5b807adf1cb631a Mon Sep 17 00:00:00 2001 From: jzp <783183164@qq.com> Date: Thu, 13 Nov 2025 16:37:37 +0800 Subject: [PATCH] =?UTF-8?q?style:=E4=BC=98=E5=8C=96=20=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 3 + src/api/types/shop.ts | 176 ++- .../components/address-form.vue | 17 +- .../components/shopping-cart.vue | 13 + src/views/order/index.vue | 1027 ++++++++++++++--- temp.txt | 899 +++++++++++++++ 6 files changed, 1983 insertions(+), 152 deletions(-) create mode 100644 temp.txt diff --git a/components.d.ts b/components.d.ts index 36c3437..0a95b59 100644 --- a/components.d.ts +++ b/components.d.ts @@ -17,6 +17,7 @@ declare module 'vue' { VanButton: typeof import('vant/es')['Button'] VanCell: typeof import('vant/es')['Cell'] VanCellGroup: typeof import('vant/es')['CellGroup'] + VanEmpty: typeof import('vant/es')['Empty'] VanField: typeof import('vant/es')['Field'] VanForm: typeof import('vant/es')['Form'] VanIcon: typeof import('vant/es')['Icon'] @@ -25,12 +26,14 @@ declare module 'vue' { VanPopup: typeof import('vant/es')['Popup'] VanRate: typeof import('vant/es')['Rate'] VanSearch: typeof import('vant/es')['Search'] + VanSkeleton: typeof import('vant/es')['Skeleton'] VanStepper: typeof import('vant/es')['Stepper'] VanSwipe: typeof import('vant/es')['Swipe'] VanSwipeItem: typeof import('vant/es')['SwipeItem'] VanSwitch: typeof import('vant/es')['Switch'] VanTab: typeof import('vant/es')['Tab'] VanTabs: typeof import('vant/es')['Tabs'] + VanTag: typeof import('vant/es')['Tag'] VanUploader: typeof import('vant/es')['Uploader'] } } diff --git a/src/api/types/shop.ts b/src/api/types/shop.ts index d46fbc6..db2ab9d 100644 --- a/src/api/types/shop.ts +++ b/src/api/types/shop.ts @@ -67,6 +67,178 @@ export type ProudictProductPropertyType = { modifyTime: number productId: number productPropertyName: string - vvProductPropertyList?: ProudictProductPropertyType[] // 如需树状结构可用此字段 - vvProductPropertyValueList: ProudictProductPropertyType[] // 按你原写法保持不变 + vvProductPropertyList?: ProudictProductPropertyType[] + vvProductPropertyValueList?: ProudictProductPropertyType[] } + +/** ----------------------------- Orders ------------------------------ */ + +export type OrderStatus = + | 'wait_pay' + | 'wait_shipping' + | 'shipping' + | 'delivered' + | 'all_refund' + | 'part_refund' + | 'close' + | 'unknown' + +export type ReverseStatus = 'all_refund' | 'part_refund' | 'close' | 'cancel' | string + +export type OrderSkuInfoItem = { + propertyName: string + propertyValue: string +} + +export type PackageLogisticsData = { + areaCode?: string + areaName?: string + context?: string + status?: string + time?: string + ftime?: string +} + +export type PackageLogisticsInfo = { + com?: string + nu?: string + state?: string + status?: string + condition?: string + ischeck?: string + data?: PackageLogisticsData[] + routeInfo?: Record + message?: string +} + +export type OrderPackageEntity = { + id: number + logisticsCompany?: string + trackNumber?: string + packageImageUrl?: string + packageLogisticsInfo?: string | PackageLogisticsInfo + shippingAmount?: number + shippingFrom?: string + shippingTo?: string + com?: string + status?: string + state?: string + shippingType?: string +} + +export type TradeOrderLineEntity = { + id: number + isDelete?: number + tradeOrderId?: number + orderNo?: string + productId?: number + productName?: string + productMainImageUrl?: string + skuId?: number + skuImageUrl?: string + skuInfo?: string | OrderSkuInfoItem[] + singlePrice?: number + num?: number + allPrice?: number + trackNumber?: string + logisticsCompany?: string + logisticsDesc?: string + status?: string + payAmount?: number + shippingFrom?: string + shippingTo?: string + createTime?: number + modifyTime?: number + [key: string]: any +} + +export type TradeOrderEntity = { + id: number + buyerId?: number + buyerDetailAddress?: string + province?: string + city?: string + district?: string + contry?: string + gmtDownOrder?: number + transactionId?: string + tradeInfo?: string + allPrice?: number + num?: number + createTime?: number + modifyTime?: number +} + +export type OrderListItem = { + id: number + tradeOrderId?: number + orderNo?: string + tradeOrderEntity?: TradeOrderEntity + vvPackageEntity?: OrderPackageEntity + vvTradeOrderLineEntityList?: TradeOrderLineEntity[] + productId: number + productName: string + productMainImageUrl?: string + skuId?: number + skuInfo?: string | OrderSkuInfoItem[] + num: number + status: OrderStatus | string + reverseStatus?: ReverseStatus + promotionPrice?: number + originPrice?: number + discountAmount?: number + shippingAmount?: number + freightFee?: number + payAmount?: number + profitAmount?: number + activityAwardCount?: number + batchNum?: number + buyerId?: number + buyerDetailAddress?: string + city?: string + province?: string + district?: string + createTime?: number + createTimestamp?: number + modifyTime?: number + modifyTimestamp?: number + gmtPay?: number + gmtPrePay?: number + gmtShipped?: number + gmtDelivered?: number + gmtCancel?: number + gmtClose?: number + gmtToShipping?: number + payType?: string + prepayId?: string + transactionId?: string + trackNumber?: string + shippingFrom?: string + shippingTo?: string + skuDesc?: string + [key: string]: any +} + +export type OrderListQuery = { + keyword?: string + status?: string | number + pageNum?: number + pageSize?: number + [key: string]: any +} + +export type OrderListResponseMeta = { + code?: string | number + msg?: string + traceId?: string +} + +export type OrderListResponsePayload = { + rows?: OrderListItem[] + list?: OrderListItem[] + [key: string]: any +} + +export type OrderListResponseData = OrderListItem[] | OrderListResponsePayload | null | undefined + +export type OrderListResponse = OrderListResponseMeta & { data?: OrderListResponseData } diff --git a/src/views/commodity-detail/components/address-form.vue b/src/views/commodity-detail/components/address-form.vue index e63322e..6f145d5 100644 --- a/src/views/commodity-detail/components/address-form.vue +++ b/src/views/commodity-detail/components/address-form.vue @@ -1,5 +1,5 @@