From 805832a5b4ee1807c99967a9fd429513268a8d05 Mon Sep 17 00:00:00 2001
From: wangfukang <15630117759@163.com>
Date: Tue, 28 Apr 2026 16:30:36 +0800
Subject: [PATCH] 1
---
components/tab-bar/delivery.vue | 21 +++++++-----
components/tab-bar/myCenter.vue | 57 +++++++++++++++++++++++++++++++--
components/tab-bar/tab-bar.vue | 30 +++++++++++++++--
3 files changed, 95 insertions(+), 13 deletions(-)
diff --git a/components/tab-bar/delivery.vue b/components/tab-bar/delivery.vue
index 2c27fad..fb1bb7b 100644
--- a/components/tab-bar/delivery.vue
+++ b/components/tab-bar/delivery.vue
@@ -184,12 +184,12 @@
+ alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(index,item,1)"/>
+ alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(index,item,2)"/>
+ alt="" style="width: 100%;height: 100rpx;background-size: 100%;" @tap="changeStatus(index,item,3)" />
@@ -623,7 +623,7 @@
checkArea() {
this.isArea = !this.isArea
},
- changeStatus(item,status){
+ changeStatus(index,item,status){
let url = ''
if(status == 2){
url = "/mall/delivery/pickup"
@@ -635,12 +635,17 @@
let that = this
that.tui.request(url, "POST", {deliveryId:item.id,workerId:item.workerId}, false, true).then((res) => {
if (res.code == 200) {
- that.tui.toast(res.message);
- that.searchForm.pageNum = 1
- that.getDelivery()
+ if(status == 2 || status == 3){
+ that.pageData.splice(index, 1)
+ }else{
+ that.pageData[index].arriveTime = "qq"
+ }
+ that.tui.toast(res.message,200);
+ /* that.searchForm.pageNum = 1
+ that.getDelivery() */
that.$forceUpdate();
} else {
- that.tui.toast(res.message);
+ that.tui.toast(res.message,200);
return;
}
uni.hideLoading();
diff --git a/components/tab-bar/myCenter.vue b/components/tab-bar/myCenter.vue
index 1a06e44..91b6ccc 100644
--- a/components/tab-bar/myCenter.vue
+++ b/components/tab-bar/myCenter.vue
@@ -2,9 +2,9 @@
22222222
商家入驻
- 商家中心
+ 商家中心-{{shopCounts}}
兼职注册
- 兼职主页
+ 兼职主页-{{workerCounts}}
@@ -33,6 +33,8 @@
data() {
return {
schoolShop:[],
+ workerCounts:0,
+ shopCounts:0,
worker:uni.getStorageSync('worker')
}
},
@@ -46,6 +48,55 @@
init(){
console.log("我的初始化")
this.schoolShop = uni.getStorageSync('schoolShop')
+ this.worker = uni.getStorageSync('worker')
+ let shopId = uni.getStorageSync('shopId')
+ let worker = uni.getStorageSync('worker')
+ this.workerCounts = 0
+ this.shopCounts = 0
+ if(worker){
+ this.tui.request("/mall/delivery/countOrderByStatus", "POST", {workerId:uni.getStorageSync('worker').workerId,regionId:JSON.parse(uni.getStorageSync('area')).id}, false, true).then((res) => {
+ if (res.code == 200) {
+ if(res.result != null){
+ for(let i = 0;i {});
+ }
+ if(shopId){
+ this.tui.request("/mall/order/countByShop/"+uni.getStorageSync('shopId'), "GET", {}, false, true).then((res) => {
+ if (res.code == 200) {
+ this.shopData = res.result
+ for(let i=0;i {})
+ }
},
clickShop(item){
uni.setStorageSync('shopId',item.id)
@@ -115,7 +166,7 @@
return
}
}else if(e=='jianzhizhuye'){
- url = '/package2/partTimeJob/partTimeJobCenter'
+ url = '/package2/partTimeJob/partTimeJobCenter?type=worker'
}
uni.navigateTo({
url: url
diff --git a/components/tab-bar/tab-bar.vue b/components/tab-bar/tab-bar.vue
index 6c3e1bf..2d1292a 100644
--- a/components/tab-bar/tab-bar.vue
+++ b/components/tab-bar/tab-bar.vue
@@ -122,7 +122,7 @@
let that = this
let shopId = uni.getStorageSync('shopId')
let worker = uni.getStorageSync('worker')
- if(shopId || worker){
+ if(worker){
this.tui.request("/mall/delivery/countOrderByStatus", "POST", {workerId:uni.getStorageSync('worker').workerId,regionId:JSON.parse(uni.getStorageSync('area')).id}, false, true).then((res) => {
if (res.code == 200) {
if(res.result != null){
@@ -132,7 +132,7 @@
}else if(res.result[i].status == 1 || res.result[i].status == 2){
this.indexWorkerCount += Number(res.result[i].orderCount)
}else{
- this.indexMyCount = Number(res.result[i].orderCount)
+ this.indexMyCount += Number(res.result[i].orderCount)
}
}
}
@@ -144,6 +144,32 @@
uni.hideLoading();
}).catch((res) => {});
}
+ if(shopId){
+ this.tui.request("/mall/order/countByShop/"+uni.getStorageSync('shopId'), "GET", {}, false, true).then((res) => {
+ if (res.code == 200) {
+ this.shopData = res.result
+ for(let i=0;i {})
+ }
}
}
}