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
+