tianyi 1 week ago
parent
commit
63b7fee64b
  1. 30
      pages/index/index.vue

30
pages/index/index.vue

@ -358,7 +358,7 @@
</view>
</uni-popup>
<tab-bar :width="width" @tab-index="changeIndex" :currentIndex="currentIndex"></tab-bar>
<tab-bar ref="tabBar" :width="width" @tab-index="changeIndex" :currentIndex="currentIndex"></tab-bar>
</view>
</template>
<script>
@ -508,8 +508,6 @@
lastScrollTop: 0,
worker:null,
isSwitching: true,
indexZhipaiCount:0,
indexWorkerCount:0,
getAreaData:{},
putAreaData:{},
yongjin:false,
@ -617,7 +615,7 @@
}
this.getDelivery();
this.getShopArea();
this.getWorkerCounts();
this.$refs.tabBar.getWorkerCounts()
}
// sticky offsetstatusBarHeight + 40px
const info = uni.getSystemInfoSync();
@ -710,30 +708,6 @@
uni.hideLoading();
}).catch((res) => {});
},
getWorkerCounts(){
if(!uni.getStorageSync('worker')){
return;
}
let that = this
this.tui.request("/mall/delivery/countOrderByStatus", "POST", {workerId:uni.getStorageSync('worker').workerId}, false, true).then((res) => {
if (res.code == 200) {
if(res.result != null){
for(let i = 0;i<res.result.length;i++){
if(res.result[i].status == 0){
this.indexZhipaiCount = Number(res.result[i].orderCount)
}else{
this.indexWorkerCount += Number(res.result[i].orderCount)
}
}
}
that.$forceUpdate();
} else {
that.tui.toast(res.message);
return;
}
uni.hideLoading();
}).catch((res) => {});
},
checkTab(index) {
for (let i = 0; i < this.menuList.length; i++) {
this.menuList[i].checked = (i === index);

Loading…
Cancel
Save