improve: 下单金额展示nan问题

This commit is contained in:
From-wh 2023-03-22 12:13:54 +08:00
parent f7aa22af36
commit 015dd1566d

View File

@ -172,7 +172,7 @@
<view class='item acea-row row-between-wrapper'>
<view>{{$t(`商品总价`)}}:</view>
<view class='money'>
{{$t(`¥`)}}{{(parseFloat(priceGroup.totalPrice)+parseFloat(priceGroup.vipPrice)).toFixed(2)}}
{{$t(`¥`)}}{{totalPriceAll || ''}}
</view>
</view>
<view class='item acea-row row-between-wrapper'
@ -387,7 +387,8 @@
cartInfo: [],
priceGroup: {},
animated: false,
totalPrice: 0,
totalPrice: 0,
totalPriceAll: 0,
integralRatio: "0",
pagesUrl: "",
orderKey: "",
@ -809,7 +810,7 @@
that.$set(that, 'orderKey', res.data.orderKey);
that.$set(that, 'valid_count', res.data.valid_count);
that.$set(that, 'discount_id', res.data.discount_id)
that.$set(that, 'priceGroup', res.data.priceGroup);
that.$set(that, 'priceGroup', res.data.priceGroup);
that.$set(that, 'totalPrice', that.$util.$h.Add(parseFloat(res.data.priceGroup.totalPrice),
parseFloat(res.data
.priceGroup.storePostage)));
@ -818,7 +819,8 @@
that.$set(that, 'special_invoice', res.data.special_invoice);
that.$set(that, 'store_self_mention', res.data.store_self_mention);
that.$set(that, 'virtual_type', res.data.virtual_type || 0);
that.$set(that, 'integral_open', res.data.integral_open);
that.$set(that, 'integral_open', res.data.integral_open);
this.totalPriceAll= (parseFloat(res.data.priceGroup.totalPrice) + parseFloat(res.data.priceGroup.vipPrice)).toFixed(2)
uni.hideLoading()
//微信支付是否开启
that.cartArr[0].payStatus = res.data.pay_weixin_open || 0