wangfukang 3 weeks ago
parent
commit
c9eb9527b5
  1. 11
      pages/index/index.vue

11
pages/index/index.vue

@ -1117,6 +1117,10 @@
}, },
getDelivery() { getDelivery() {
let that = this let that = this
that.waimaiCount = 0
that.kuaidiCount = 0
that.paotuiCount = 0
that.zhipaiCount = 0
this.tui.request("/mall/delivery/page", "POST", this.searchForm, false, false).then((res) => { this.tui.request("/mall/delivery/page", "POST", this.searchForm, false, false).then((res) => {
that.loadStatus = 'nomore'; that.loadStatus = 'nomore';
if (res.code == 200) { if (res.code == 200) {
@ -1142,7 +1146,7 @@
} else { } else {
that.deliveryItem = [...that.deliveryItem, ...res.result.records] that.deliveryItem = [...that.deliveryItem, ...res.result.records]
} }
if (res.result.orderCount != null) { if (res.result.orderCount != null && res.result.orderCount.length > 0) {
for (let i = 0; i < res.result.orderCount.length; i++) { for (let i = 0; i < res.result.orderCount.length; i++) {
if (res.result.orderCount[i].deliveryType == 1) { if (res.result.orderCount[i].deliveryType == 1) {
that.waimaiCount = res.result.orderCount[i].orderCount that.waimaiCount = res.result.orderCount[i].orderCount
@ -1152,7 +1156,12 @@
that.paotuiCount = res.result.orderCount[i].orderCount that.paotuiCount = res.result.orderCount[i].orderCount
} }
} }
}else{
that.waimaiCount = 0
that.kuaidiCount = 0
that.paotuiCount = 0
} }
if (res.result.zhipaiCount != undefined && res.result.zhipaiCount != null) { if (res.result.zhipaiCount != undefined && res.result.zhipaiCount != null) {
that.zhipaiCount = res.result.zhipaiCount that.zhipaiCount = res.result.zhipaiCount
} }

Loading…
Cancel
Save