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