From 2a280e82671e716c734b8cd13a26c7b8b8b776ab Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 2 Sep 2023 00:12:21 +0800 Subject: [PATCH] =?UTF-8?q?code=20review=EF=BC=9A=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E5=8A=B5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 4f7d6793fd09296d15c0c20e057619c477450ac2) --- src/utils/constants.ts | 6 +- .../components/ProductCategorySelect.vue | 4 +- .../{CouponSend.vue => CouponSendForm.vue} | 13 ++-- src/views/mall/promotion/coupon/formatter.ts | 2 +- .../coupon/template/CouponTemplateForm.vue | 70 ++++++++++--------- src/views/member/user/index.vue | 9 ++- 6 files changed, 55 insertions(+), 49 deletions(-) rename src/views/mall/promotion/coupon/components/{CouponSend.vue => CouponSendForm.vue} (93%) diff --git a/src/utils/constants.ts b/src/utils/constants.ts index e5d8d647..47257f4f 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -233,15 +233,15 @@ export const CouponTemplateTakeTypeEnum = { export const PromotionProductScopeEnum = { ALL: { scope: 1, - name: '全部商品参与' + name: '通用劵' }, SPU: { scope: 2, - name: '指定商品参与' + name: '商品劵' }, CATEGORY: { scope: 3, - name: '指定品类参与' + name: '品类劵' } } diff --git a/src/views/mall/product/category/components/ProductCategorySelect.vue b/src/views/mall/product/category/components/ProductCategorySelect.vue index b8011290..b257769a 100644 --- a/src/views/mall/product/category/components/ProductCategorySelect.vue +++ b/src/views/mall/product/category/components/ProductCategorySelect.vue @@ -24,7 +24,7 @@ const props = defineProps({ multiple: propTypes.bool.def(false) // 是否多选 }) -/** 选中的分类ID */ +/** 选中的分类 ID */ const selectCategoryId = computed({ get: () => { return props.value @@ -37,8 +37,8 @@ const selectCategoryId = computed({ /** 分类选择 */ const emit = defineEmits(['update:modelValue']) +/** 初始化 **/ const categoryList = ref([]) // 分类树 - onMounted(async () => { // 获得分类树 const data = await ProductCategoryApi.getCategoryList({}) diff --git a/src/views/mall/promotion/coupon/components/CouponSend.vue b/src/views/mall/promotion/coupon/components/CouponSendForm.vue similarity index 93% rename from src/views/mall/promotion/coupon/components/CouponSend.vue rename to src/views/mall/promotion/coupon/components/CouponSendForm.vue index 44e6b13e..a4a90f43 100644 --- a/src/views/mall/promotion/coupon/components/CouponSend.vue +++ b/src/views/mall/promotion/coupon/components/CouponSendForm.vue @@ -1,5 +1,6 @@ -