From 29b8d06ff272f2bde5275a74d4d2b99362e19648 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 30 Aug 2023 21:18:46 +0800 Subject: [PATCH] =?UTF-8?q?code=20review=EF=BC=9A=E5=94=AE=E5=90=8E?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/trade/afterSale/index.ts | 6 +++ src/router/modules/remaining.ts | 4 +- .../components/UpdateAuditReasonForm.vue | 1 + .../mall/trade/afterSale/detail/index.vue | 12 ++++-- src/views/mall/trade/afterSale/index.vue | 42 ++++++++++++++----- 5 files changed, 50 insertions(+), 15 deletions(-) diff --git a/src/api/mall/trade/afterSale/index.ts b/src/api/mall/trade/afterSale/index.ts index ba94df0a..a109ee6b 100644 --- a/src/api/mall/trade/afterSale/index.ts +++ b/src/api/mall/trade/afterSale/index.ts @@ -43,26 +43,32 @@ export interface ProductPropertiesVO { export const getAfterSalePage = async (params) => { return await request.get({ url: `/trade/after-sale/page`, params }) } + // 获得交易售后详情 export const getAfterSale = async (id: any) => { return await request.get({ url: `/trade/after-sale/get-detail?id=${id}` }) } + // 同意售后 export const agree = async (id: any) => { return await request.put({ url: `/trade/after-sale/agree?id=${id}` }) } + // 拒绝售后 export const disagree = async (data: any) => { return await request.put({ url: `/trade/after-sale/disagree`, data }) } + // 确认收货 export const receive = async (id: any) => { return await request.put({ url: `/trade/after-sale/receive?id=${id}` }) } + // 拒绝收货 export const refuse = async (id: any) => { return await request.put({ url: `/trade/after-sale/refuse?id=${id}` }) } + // 确认退款 export const refund = async (id: any) => { return await request.put({ url: `/trade/after-sale/refund?id=${id}` }) diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 6aa9aad9..1a3e5b20 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -401,9 +401,9 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, children: [ { - path: 'orderDetail/:orderId(\\d+)', + path: 'orderDetail/:orderId(\\d+)', // TODO @puhui999:路径合理的是 trade/order/detail component: () => import('@/views/mall/trade/order/detail/index.vue'), - name: 'TradeOrderDetail', + name: 'TradeOrderDetail', // TODO @puhui999:路径合理的是 trade/after-sale/detail meta: { title: '订单详情', icon: '', activeMenu: '/trade/trade/order' } }, { diff --git a/src/views/mall/trade/afterSale/components/UpdateAuditReasonForm.vue b/src/views/mall/trade/afterSale/components/UpdateAuditReasonForm.vue index 266135e3..45f5d447 100644 --- a/src/views/mall/trade/afterSale/components/UpdateAuditReasonForm.vue +++ b/src/views/mall/trade/afterSale/components/UpdateAuditReasonForm.vue @@ -19,6 +19,7 @@