diff --git a/pages/index/index.vue b/pages/index/index.vue index 84a6358..1f62e3b 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -304,7 +304,8 @@ }).catch((res) => {}) }, onClickArea(item) { - + console.log('shopId',item.shop.id) + uni.setStorageSync('shopId', item.shop.id) uni.setStorageSync('area', JSON.stringify(item)) this.getBusinessStatus() this.getData() @@ -396,12 +397,19 @@ url: url }) }, + clearData(){ + this.daisongda = 0 + this.daiquhuo = 0 + this.daixiaofei = 0 + this.daichucan = 0 + }, getData() { let that = this; that.NB.sendRequest("/mall/order/countByShop/" + uni.getStorageSync('shopId'), {}, false, 'GET', 'application/x-www-form-urlencoded').then((res) => { if (res.code == 200) { this.shopData = res.result + this.clearData() for (let i = 0; i < this.shopData.orderStatusCount.length; i++) { if (this.shopData.orderStatusCount[i].counttype) { if (this.shopData.orderStatusCount[i].counttype == 'daisong') {