diff --git a/src/api/mall/trade/order/index.ts b/src/api/mall/trade/order/index.ts index 6f55b573..80669c57 100644 --- a/src/api/mall/trade/order/index.ts +++ b/src/api/mall/trade/order/index.ts @@ -51,11 +51,10 @@ export interface OrderVO { avatar?: string } // 订单操作日志 - logs?: logs[] + logs?: OrderLogRespVO[] } -// TODO @puhui999:OrderLogRespVO 会不会更好哈。 -export interface logs { +export interface OrderLogRespVO { content?: string createTime?: Date userType?: number diff --git a/src/config/axios/service.ts b/src/config/axios/service.ts index bc6dbe73..1a4741b6 100644 --- a/src/config/axios/service.ts +++ b/src/config/axios/service.ts @@ -191,11 +191,6 @@ service.interceptors.response.use( } return Promise.reject('error') } else { - // TODO @puhui999:这个先不用支持哈; - // 前端处理 data 为 null 的情况,进行提示 - if (data.msg !== '') { - ElNotification.error({ title: msg }) - } return data } }, diff --git a/src/views/mall/trade/afterSale/detail/index.vue b/src/views/mall/trade/afterSale/detail/index.vue index d539dbe5..a7bdf5ec 100644 --- a/src/views/mall/trade/afterSale/detail/index.vue +++ b/src/views/mall/trade/afterSale/detail/index.vue @@ -195,7 +195,8 @@ const getDetail = async () => { if (id) { const res = await AfterSaleApi.getAfterSale(id) // 没有表单信息则关闭页面返回 - if (res === null) { + if (res == null) { + message.notifyError('售后订单不存在') close() } formData.value = res diff --git a/src/views/mall/trade/order/detail/index.vue b/src/views/mall/trade/order/detail/index.vue index d329b810..40f2a664 100644 --- a/src/views/mall/trade/order/detail/index.vue +++ b/src/views/mall/trade/order/detail/index.vue @@ -245,9 +245,10 @@ const { params } = useRoute() // 查询参数 const getDetail = async () => { const id = params.orderId as unknown as number if (id) { - const res = (await TradeOrderApi.getOrder(id)) as TradeOrderApi.OrderVO + const res = (await TradeOrderApi.getOrder(66666)) as TradeOrderApi.OrderVO // 没有表单信息则关闭页面返回 - if (res === null) { + if (res == null) { + message.error('交易订单不存在') close() } formData.value = res @@ -259,7 +260,7 @@ const { delView } = useTagsViewStore() // 视图操作 const { push, currentRoute } = useRouter() // 路由 const close = () => { delView(unref(currentRoute)) - push({ name: 'TradeAfterSale' }) + push({ name: 'TradeOrder' }) } /** 复制 */