From b55b9966d6e3fd545724474c650635ebfa39f374 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 26 Aug 2023 11:41:43 +0800 Subject: [PATCH] =?UTF-8?q?code=20review=EF=BC=9A=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit b8ca5800c6adb7225857b7b8756484d04f5ca8eb) --- src/router/modules/remaining.ts | 29 ++++++++---------- src/utils/dict.ts | 2 +- .../order/components/OrderDeliveryForm.vue | 1 + src/views/mall/trade/order/index.vue | 30 +++++++++++-------- 4 files changed, 33 insertions(+), 29 deletions(-) diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 4993fc0c..8c8ae8f3 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -346,22 +346,6 @@ const remainingRouter: AppRouteRecordRaw[] = [ } ] }, - { - path: '/product/property', - component: Layout, - name: 'Property', - meta: { - hidden: true - }, - children: [ - { - path: 'value/:propertyId(\\d+)', - component: () => import('@/views/mall/product/property/value/index.vue'), - name: 'ProductPropertyValue', - meta: { title: '商品属性值', icon: '', activeMenu: '/product/property' } - } - ] - }, { path: '/product', component: Layout, @@ -408,6 +392,19 @@ const remainingRouter: AppRouteRecordRaw[] = [ title: '商品详情', activeMenu: '/product/product-spu' } + }, + { + path: 'property/value/:propertyId(\\d+)', + component: () => import('@/views/mall/product/property/value/index.vue'), + name: 'ProductPropertyValue', + meta: { + noCache: true, + hidden: true, + canTo: true, + icon: 'ep:view', + title: '商品属性值', + activeMenu: '/product/property' + } } ] }, diff --git a/src/utils/dict.ts b/src/utils/dict.ts index f850af42..1faf663f 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -157,7 +157,7 @@ export enum DICT_TYPE { TRADE_ORDER_TYPE = 'trade_order_type', // 订单 - 类型 TRADE_ORDER_STATUS = 'trade_order_status', // 订单 - 状态 TRADE_ORDER_ITEM_AFTER_SALE_STATUS = 'trade_order_item_after_sale_status', // 订单项 - 售后状态 - TRADE_DELIVERY_TYPE = 'delivery_type', // 配送方式 + TRADE_DELIVERY_TYPE = 'trade_delivery_type', // 配送方式 // ========== MALL - 营销模块 ========== PROMOTION_DISCOUNT_TYPE = 'promotion_discount_type', // 优惠类型 diff --git a/src/views/mall/trade/order/components/OrderDeliveryForm.vue b/src/views/mall/trade/order/components/OrderDeliveryForm.vue index 14f9411d..6d4a07c4 100644 --- a/src/views/mall/trade/order/components/OrderDeliveryForm.vue +++ b/src/views/mall/trade/order/components/OrderDeliveryForm.vue @@ -34,6 +34,7 @@ import * as DeliveryExpressApi from '@/api/mall/trade/delivery/express' import * as TradeOrderApi from '@/api/mall/trade/order' import { copyValueToTarget } from '@/utils' +// TODO @puhui999:要不 Form 保持和别的模块一样,和 index.vue 放在一个目录下,不作为 components;components 更多要支持给多个模块使用哈。 defineOptions({ name: 'OrderDeliveryForm' }) const { t } = useI18n() // 国际化 diff --git a/src/views/mall/trade/order/index.vue b/src/views/mall/trade/order/index.vue index cf6fc584..89200465 100644 --- a/src/views/mall/trade/order/index.vue +++ b/src/views/mall/trade/order/index.vue @@ -64,6 +64,9 @@ /> + - + + +