問題: 優惠券添加有兩位小數時,移動端顯示異常
修復:
一、修改前端代碼, 移動端,修改后需要重新發布
文件路徑:components/priceFormat.vue
把之前的這里改成圈住的這樣
this.couponPrice = (tempStr.length==2&&tempStr == '00') ? '' : '.'+tempStr
二、修改后端代碼, 這里是修改商戶也能添加兩位小數
代碼路徑:
app\common\repositories\store\coupon\StoreCouponRepository.php
三、 修改sql, 這個是修改用戶領取優惠券后數據異常
ALTER TABLE `eb_store_coupon_user` CHANGE `coupon_price` `coupon_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '優惠券的面值';