Procházet zdrojové kódy

修复:优惠券折扣数字不正确

萤火科技 před 5 roky
rodič
revize
848075f71a

+ 1 - 1
src/views/market/coupon/Index.vue

@@ -47,7 +47,7 @@
         </template>
         <template v-if="item.coupon_type == 20">
           <span>打</span>
-          <span class="c-p mlr-2">{{ item.discount }}</span>
+          <span class="c-p mlr-2">{{ item.discount / 10 }}</span>
           <span>折</span>
         </template>
       </template>

+ 2 - 2
src/views/market/coupon/Receive.vue

@@ -42,12 +42,12 @@
       </template>
       <!-- 优惠方式 -->
       <template slot="discount" slot-scope="item">
-        <template v-if="item.coupon_type == 10">
+        <template v-if="item.coupon_type == CouponTypeEnum.FULL_DISCOUNT.value">
           <span>立减</span>
           <span class="c-p mlr-2">{{ item.reduce_price }}</span>
           <span>元</span>
         </template>
-        <template v-if="item.coupon_type == 20">
+        <template v-if="item.coupon_type == CouponTypeEnum.DISCOUNT.value">
           <span>打</span>
           <span class="c-p mlr-2">{{ item.discount }}</span>
           <span>折</span>

+ 2 - 2
src/views/market/coupon/Update.vue

@@ -18,7 +18,7 @@
           </a-radio-group>
         </a-form-item>
         <a-form-item
-          v-show="form.getFieldValue('coupon_type') == 10"
+          v-show="form.getFieldValue('coupon_type') == CouponTypeEnum.FULL_DISCOUNT.value"
           label="减免金额"
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"
@@ -31,7 +31,7 @@
           <span class="ml-5">元</span>
         </a-form-item>
         <a-form-item
-          v-show="form.getFieldValue('coupon_type') == 20"
+          v-show="form.getFieldValue('coupon_type') == CouponTypeEnum.DISCOUNT.value"
           label="折扣率"
           :labelCol="labelCol"
           :wrapperCol="wrapperCol"