tianyi 1 month ago
parent
commit
025cf29133
  1. 10
      pages/index/index.vue

10
pages/index/index.vue

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

Loading…
Cancel
Save