From b3639977a719ff103f98e165b14f6190a32ace47 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Fri, 8 Sep 2023 01:01:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=AE=A2=E5=8D=95=E8=AF=A6?= =?UTF-8?q?=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mall/trade/order/detail/index.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/views/mall/trade/order/detail/index.vue b/src/views/mall/trade/order/detail/index.vue index 23a82525..236c7f2e 100644 --- a/src/views/mall/trade/order/detail/index.vue +++ b/src/views/mall/trade/order/detail/index.vue @@ -195,6 +195,7 @@ import OrderDeliveryForm from '@/views/mall/trade/order/form/OrderDeliveryForm.v import OrderUpdateAddressForm from '@/views/mall/trade/order/form/OrderUpdateAddressForm.vue' import OrderUpdatePriceForm from '@/views/mall/trade/order/form/OrderUpdatePriceForm.vue' import * as DeliveryExpressApi from '@/api/mall/trade/delivery/express' +import { useTagsViewStore } from '@/store/modules/tagsView' defineOptions({ name: 'TradeOrderDetail' }) @@ -242,10 +243,20 @@ const getDetail = async () => { const id = params.orderId as unknown as number if (id) { const res = (await TradeOrderApi.getOrder(id)) as TradeOrderApi.OrderVO + // 没有表单信息则关闭页面返回 + if (res === null) { + close() + } formData.value = res } } - +const { delView } = useTagsViewStore() // 视图操作 +const { push, currentRoute } = useRouter() // 路由 +/** 关闭 tag */ +const close = () => { + delView(unref(currentRoute)) + push({ name: 'TradeAfterSale' }) +} /** 复制 */ const clipboardSuccess = () => { message.success('复制成功')