Browse Source

fix mall num

account
刘嘉炜 4 years ago
parent
commit
658bf7a16b
  1. 13
      src/components/order_list/mall/mall.vue

13
src/components/order_list/mall/mall.vue

@ -19,7 +19,7 @@
</block>
</view>
<view class="rgi-total"><text>{{ orderInfo.goods_nums || 0 }}</text><image class="rt-img" mode="aspectFit" src="/static/images/icon/arrow_b2.png"></image></view>
<view class="rgi-total"><text>{{ totalGoodsNum || 0 }}</text><image class="rt-img" mode="aspectFit" src="/static/images/icon/arrow_b2.png"></image></view>
</view>
<view class="mo-total"><text class="mt-txt">商品金额合计</text>¥{{ orderInfo.pay_amount || 0 }}</view>
<view class="mo-bot">
@ -37,7 +37,16 @@ export default {
isShowSendMethods(){
let { orderInfo } = this;
return orderInfo.status == 2 || orderInfo.status == 3 || orderInfo.status == 5 || orderInfo.status == 6
},
},
totalGoodsNum(){
let { orderInfo } = this;
if(!orderInfo)return 0;
let _ls = orderInfo.goods || [];
return _ls.reduce((total, item)=>{
total += +item.product_nums || 0;
return total
}, 0)
}
},
props: {

Loading…
Cancel
Save