wangfukang 7 days ago
parent
commit
04124f1b76
  1. 11
      components/tab-bar/delivery.vue

11
components/tab-bar/delivery.vue

@ -642,6 +642,16 @@
} }
uni.setStorageSync('deliveryStatusCounts', this.deliveryStatusCounts) uni.setStorageSync('deliveryStatusCounts', this.deliveryStatusCounts)
}, },
syncDeliveryStatusCountFromPage(total) {
const count = Number(total) || 0
if (this.searchForm.status == 1) {
this.deliveryStatusCounts.daiqu = count
} else if (this.searchForm.status == 2) {
this.deliveryStatusCounts.daisong = count
}
uni.setStorageSync('deliveryStatusCounts', this.deliveryStatusCounts)
uni.$emit('deliveryStatusCountsChange', this.deliveryStatusCounts)
},
decreaseDeliveryStatusCount(status) { decreaseDeliveryStatusCount(status) {
if (status == 2) { if (status == 2) {
this.deliveryStatusCounts.daiqu = Math.max(0, Number(this.deliveryStatusCounts.daiqu) - 1) this.deliveryStatusCounts.daiqu = Math.max(0, Number(this.deliveryStatusCounts.daiqu) - 1)
@ -892,6 +902,7 @@
that.isLoadingPage = false; that.isLoadingPage = false;
that.loadStatus = 'nomore'; that.loadStatus = 'nomore';
if (res.code == 200) { if (res.code == 200) {
that.syncDeliveryStatusCountFromPage(res.result && res.result.total)
if (this.searchForm.status == 1) { if (this.searchForm.status == 1) {
if (that.searchForm.pageNum == 1) { if (that.searchForm.pageNum == 1) {
that.deliveryItem1 = res.result.records; that.deliveryItem1 = res.result.records;

Loading…
Cancel
Save