商品详情页:
结算页:
前端折扣价没有做保留两位小数处理,计算逻辑也和后端接口返回折扣的不同
修改如下:
view/uniapp/pages/goods_details/index.vue
大概1372行,找到
let discountPrice = that.$util.$h.Mul(discount, this.storeInfo.price)
替换成
let discountPrice = that.$util.$h.Mul(that.$util.$h.Sub(1,discount), this.storeInfo.price)
discountPrice = that.$util.$h.Sub(this.storeInfo.price,(Math.floor(discountPrice * 100) / 100))
效果如下: