| .. | .. |
|---|
| 37 | 37 | <view class='title acea-row row-between-wrapper'> |
|---|
| 38 | 38 | <view class="acea-row row-middle"> |
|---|
| 39 | 39 | <text class="sign cart-color acea-row row-center-wrapper" |
|---|
| 40 | | - v-if="item.activityType !== '普通' && item.activityType !== '核销'">{{ item.activityType |
|---|
| 41 | | - }}</text> |
|---|
| 40 | + v-if="item.activityType && item.activityType !== '普通' && item.activityType !== '核销'">{{ |
|---|
| 41 | + item.activityType }}</text> |
|---|
| 42 | 42 | <!-- <text class="sign cart-color acea-row row-center-wrapper" v-if="item.bargainId != 0">砍价</text> |
|---|
| 43 | 43 | <text class="sign cart-color acea-row row-center-wrapper" v-else-if="item.storeOrder.combinationId != 0">拼团</text> |
|---|
| 44 | 44 | <text class="sign cart-color acea-row row-center-wrapper" v-else-if="item.storeOrder.seckillId != 0">秒杀</text> --> |
|---|
| 45 | 45 | <view>{{ item.createTime }}</view> |
|---|
| 46 | 46 | </view> |
|---|
| 47 | | - <view class='font-color'>{{ item.orderStatus }}</view> |
|---|
| 47 | + <view class='font-color'>{{ item.orderStatus || '' }}</view> |
|---|
| 48 | 48 | <!-- <view v-if="item.status?item.status.type == 0:0" class='font-color'>待付款</view> |
|---|
| 49 | 49 | <view v-else-if="item.status?item.status.type == 1:0 && item.storeOrder.shippingType==1" class='font-color'>待发货</view> |
|---|
| 50 | 50 | <view v-else-if="item.status?item.status.type == 2:0 && item.storeOrder.shippingType==1" class='font-color'>待收货</view> |
|---|
| .. | .. |
|---|
| 54 | 54 | </view> |
|---|
| 55 | 55 | <orderListGoods :orderInfoList="item.orderInfoList" |
|---|
| 56 | 56 | :zonePromotionList="item.zonePromotionList || []"></orderListGoods> |
|---|
| 57 | | - <view class='totalPrice'>共{{ item.totalNum + getGiftCount(item.zonePromotionList || []) |
|---|
| 58 | | - }}件商品,总金额 |
|---|
| 57 | + <view class='totalPrice'>共{{ getTotalNum(item) }}件商品,总金额 |
|---|
| 59 | 58 | <text class='money font-color' v-if="getPayWay(item.payPrice, item.payCareBean) == 1"> |
|---|
| 60 | 59 | <text class="color-blue">¥{{ toNumber(item.payPrice) }}</text> |
|---|
| 61 | 60 | <text class="color-blue">+{{ toThousands(toNumber(item.payCareBean)) }}悦养豆</text> |
|---|
| .. | .. |
|---|
| 254 | 253 | }); |
|---|
| 255 | 254 | return count; |
|---|
| 256 | 255 | }, |
|---|
| 256 | + getTotalNum(item) { |
|---|
| 257 | + return (Number(item.totalNum) || 0) + this.getGiftCount(item.zonePromotionList || []); |
|---|
| 258 | + }, |
|---|
| 257 | 259 | getPayWay(price, payCareBean) { |
|---|
| 258 | 260 | console.log('阿斯顿发送到发送地方', Number(price) > 0 && Number(payCareBean) > 0); |
|---|
| 259 | 261 | if (Number(price) > 0 && Number(payCareBean) > 0) { |
|---|
| .. | .. |
|---|
| 312 | 314 | getOrderData: function () { |
|---|
| 313 | 315 | let that = this; |
|---|
| 314 | 316 | orderData().then(res => { |
|---|
| 315 | | - that.$set(that, 'orderData', res.data); |
|---|
| 317 | + that.$set(that, 'orderData', (res && res.data) || {}); |
|---|
| 318 | + }).catch(() => { |
|---|
| 319 | + that.$set(that, 'orderData', {}); |
|---|
| 316 | 320 | }) |
|---|
| 317 | 321 | }, |
|---|
| 318 | 322 | /** |
|---|
| .. | .. |
|---|
| 447 | 451 | page: that.page, |
|---|
| 448 | 452 | limit: that.limit, |
|---|
| 449 | 453 | }).then(res => { |
|---|
| 450 | | - let list = res.data.list || []; |
|---|
| 454 | + let list = (res && res.data && res.data.list) || []; |
|---|
| 451 | 455 | let loadend = list.length < that.limit; |
|---|
| 452 | 456 | that.orderList = that.$util.SplitArray(list, that.orderList); |
|---|
| 453 | 457 | that.$set(that, 'orderList', that.orderList); |
|---|