From 72d734d909699d4a0a4b4b9ecb83217d20ed4ff4 Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Sat, 21 Mar 2026 15:32:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E9=85=8D=E9=80=81?= =?UTF-8?q?=E5=91=98=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package1/group/groupBuyList.vue | 64 ++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 5 deletions(-) diff --git a/package1/group/groupBuyList.vue b/package1/group/groupBuyList.vue index a94ef4b..fc6e0ff 100644 --- a/package1/group/groupBuyList.vue +++ b/package1/group/groupBuyList.vue @@ -118,7 +118,17 @@ - 当前2000名配送员在线 + 当前{{onlineWorkerTotal}}名配送员在线 + + + + 暂无在线区域数据 + + + {{item.areaName}} {{item.onlineWorkerCount}}人在线 + + @@ -207,7 +217,11 @@ url:'https://jewel-shop.oss-cn-beijing.aliyuncs.com/14b93d4bce134b3db4b42b13b6993e6c.png', index:10 }], - menuButtonInfo:{} + menuButtonInfo:{}, + onlineWorkerTotal:0, + onlineWorkerAreaList:[], + onlineWorkerInterval:2500, + onlineWorkerDuration:500 } }, components: { @@ -248,6 +262,7 @@ this.getEatType(); this.getShopArea(); this.getShopList(); + this.getOnlineWorkerCountByCanteenArea(); }, onShow() { this.menuButtonInfo = uni.getMenuButtonBoundingClientRect() @@ -327,6 +342,19 @@ } }).catch((res) => {}) }, + getOnlineWorkerCountByCanteenArea(){ + let that = this + that.tui.request("/worker/getOnlineWorkerByArea", "GET", {parentId:JSON.parse(uni.getStorageSync('area')).id}, false, true).then((res) => { + if (res.code == 200) { + const list = Array.isArray(res.result) ? res.result : [] + that.onlineWorkerAreaList = list + that.onlineWorkerTotal = list.reduce((sum, item) => { + const count = Number(item.onlineWorkerCount || 0) + return sum + (isNaN(count) ? 0 : count) + }, 0) + } + }).catch(() => {}) + }, getShopList(){ this.loadStatus = 'loading' if(this.searchSale){ @@ -637,9 +665,35 @@ height: 76rpx; background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1)); border-radius: 76rpx; - font-size: 32rpx; + font-weight: bold; + display: flex; + align-items: center; + padding: 0 24rpx; + box-sizing: border-box; text-align: center; + line-height: normal; + } + .zaixian-total{ + font-size: 26rpx; line-height: 76rpx; - font-weight: bold; + white-space: nowrap; + } + .zaixian-divider{ + width: 2rpx; + height: 36rpx; + background: rgba(0, 35, 28, 0.2); + margin: 0 18rpx; + } + .zaixian-swiper{ + flex: 1; + height: 76rpx; + } + .zaixian-item{ + height: 76rpx; + line-height: 76rpx; + font-size: 24rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } - \ No newline at end of file +