Browse Source

[优化] 确认下单页商品数量输入框报错问题

master
邓平艺 4 years ago
parent
commit
cc3483b4f9
  1. 6
      pages/order/confirm-order.vue
  2. 1
      pages/order/index.vue

6
pages/order/confirm-order.vue

@ -105,8 +105,12 @@
computed: { computed: {
total(){ total(){
return function(num, price){ return function(num, price){
let new_num = Number(num);
if(Object.is(new_num, NaN)){
return 0;
};
let big_price = new bigc(Number(price)); let big_price = new bigc(Number(price));
big_price = big_price.times(Number(num));
big_price = big_price.times(new_num);
return big_price.round(2, 0).toString(); return big_price.round(2, 0).toString();
} }
}, },

1
pages/order/index.vue

@ -337,6 +337,7 @@
color: #FFFFFF; color: #FFFFFF;
margin: 0rpx 20rpx 0rpx 20rpx; margin: 0rpx 20rpx 0rpx 20rpx;
border: none; border: none;
line-height: 60rpx;
} }
} }
} }

Loading…
Cancel
Save