From a1b45f80bc72c57b1fd7cfef6b4f314629ed637d Mon Sep 17 00:00:00 2001 From: puhui999 Date: Sat, 3 Jun 2023 21:21:43 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=20spu=20=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E8=B7=AF=E7=94=B1=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/modules/remaining.ts | 6 +++--- src/views/mall/product/spu/index.vue | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index f7e56fd0..bfa4b15c 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -355,7 +355,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, children: [ { - path: 'productSpuAdd', // TODO @puhui999:最好拆成 add 和 edit 两个路由;添加商品;修改商品 fix + path: 'spu/add', // TODO @puhui999:最好拆成 add 和 edit 两个路由;添加商品;修改商品 fix component: () => import('@/views/mall/product/spu/addForm.vue'), name: 'ProductSpuAdd', meta: { @@ -368,7 +368,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ } }, { - path: 'productSpuEdit/:spuId(\\d+)', + path: 'spu/edit/:spuId(\\d+)', component: () => import('@/views/mall/product/spu/addForm.vue'), name: 'productSpuEdit', meta: { @@ -381,7 +381,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ } }, { - path: 'productSpuDetail/:spuId(\\d+)', + path: 'spu/detail/:spuId(\\d+)', component: () => import('@/views/mall/product/spu/addForm.vue'), name: 'productSpuDetail', meta: { diff --git a/src/views/mall/product/spu/index.vue b/src/views/mall/product/spu/index.vue index 47a9c8d5..4734f18c 100644 --- a/src/views/mall/product/spu/index.vue +++ b/src/views/mall/product/spu/index.vue @@ -397,18 +397,18 @@ const resetQuery = () => { const openForm = (id?: number) => { // 修改 if (typeof id === 'number') { - push('/product/productSpuEdit/' + id) + push('/product/spu/edit/' + id) return } // 新增 - push('/product/productSpuAdd') + push('/product/spu/add') } /** * 查看商品详情 */ const openDetail = (id?: number) => { - push('/product/productSpuDetail/' + id) + push('/product/spu/detail/' + id) } /** 导出按钮操作 */ From b89db1af55127fef5b558e2fdcd6f8401ccdc7df Mon Sep 17 00:00:00 2001 From: puhui999 Date: Tue, 6 Jun 2023 16:22:58 +0800 Subject: [PATCH 2/4] fix: review --- src/utils/dict.ts | 1 + src/views/mall/product/spu/components/BasicInfoForm.vue | 6 ++---- ...ductAttributesAddForm.vue => ProductPropertyAddForm.vue} | 2 +- src/views/mall/product/spu/components/SkuList.vue | 1 - src/views/mall/product/spu/components/index.ts | 4 ++-- src/views/mall/product/spu/components/spu.data.ts | 1 + 6 files changed, 7 insertions(+), 8 deletions(-) rename src/views/mall/product/spu/components/{ProductAttributesAddForm.vue => ProductPropertyAddForm.vue} (97%) diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 73913b91..7f3f95f9 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -147,6 +147,7 @@ export enum DICT_TYPE { MP_MESSAGE_TYPE = 'mp_message_type', // 消息类型 // ========== MALL - PROMOTION 模块 ========== + PRODUCT_UNIT = 'product_unit', // 商品单位 PROMOTION_DISCOUNT_TYPE = 'promotion_discount_type', // 优惠类型 PROMOTION_PRODUCT_SCOPE = 'promotion_product_scope', // 营销的商品范围 PROMOTION_COUPON_TEMPLATE_VALIDITY_TYPE = 'promotion_coupon_template_validity_type', // 优惠劵模板的有限期类型 diff --git a/src/views/mall/product/spu/components/BasicInfoForm.vue b/src/views/mall/product/spu/components/BasicInfoForm.vue index b8ae405c..c3ccf6b5 100644 --- a/src/views/mall/product/spu/components/BasicInfoForm.vue +++ b/src/views/mall/product/spu/components/BasicInfoForm.vue @@ -14,7 +14,6 @@ - - - +