商品詳情頁(yè):
結(jié)算頁(yè):
前端折扣價(jià)沒(méi)有做保留兩位小數(shù)處理,計(jì)算邏輯也和后端接口返回折扣的不同
修改如下:
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))
效果如下: