From fb274145e152c82093497c2989d04cc49563c922 Mon Sep 17 00:00:00 2001
From: hly <2783385703@qq.com>
Date: Sat, 23 Aug 2025 16:40:19 +0800
Subject: [PATCH] =?UTF-8?q?feat(workbench):=20=E6=9B=B4=E6=96=B0=E5=90=88?=
=?UTF-8?q?=E4=BC=99=E4=BA=BA=E5=B7=A5=E4=BD=9C=E5=8F=B0=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=E5=8F=8A=E7=94=A8=E6=88=B7=E6=95=B0=E6=8D=AE=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修改环境变量从trial到develop
- 更新用户订单和报酬显示字段
- 优化用户数据统计显示逻辑
- 调整合伙人等级显示和条件计算
- 启用合伙人工作台功能入口
- 修复邀请码绑定显示问题
---
otherPages/workbenchManage/bindUser/index.vue | 13 +-
.../myLevel/commponents/levelInfo.vue | 146 ++++++++++++++++-----
.../workbenchManage/myLevel/commponents/myData.vue | 13 +-
otherPages/workbenchManage/myLevel/index.vue | 17 ++-
.../myUser/components/haveOrder.vue | 6 +-
otherPages/workbenchManage/myUser/index.vue | 16 +--
pages/workbenchManage/index.vue | 12 +-
utils/getUrl.js | 2 +-
8 files changed, 150 insertions(+), 75 deletions(-)
diff --git a/otherPages/workbenchManage/bindUser/index.vue b/otherPages/workbenchManage/bindUser/index.vue
index b57a332..8ea785d 100644
--- a/otherPages/workbenchManage/bindUser/index.vue
+++ b/otherPages/workbenchManage/bindUser/index.vue
@@ -5,7 +5,7 @@
-
-
+
+
+
+
@@ -20,7 +32,9 @@
import cardTitle from '../../components/cardTitle.vue'
import {
ref,
- reactive
+ reactive,
+ onMounted,
+ computed,
} from "vue"
@@ -32,50 +46,110 @@
}
})
+ let currentIndex = ref(0)
+
+ const level_list = computed(() => {
+ return props.dataInfo.level_list
+ })
const cardName = ref("距离下一等级要求")
const baseList = ref([
- {
- title: '仍需至少注册',
- num: "20人"
- },
+ // {
+ // title: '仍需至少注册',
+ // num: "20人"
+ // },
]);
const list3 = reactive([
'/static/images/levelImage/1.jpeg',
'/static/images/levelImage/2.jpg',
]);
+
+
+ onMounted(() => {
+ currentIndex.value = props.dataInfo.info.userHhRole
+ swiperChange({
+ current : props.dataInfo.info.userHhRole,
+ })
+ })
const swiperChange = (index) => {
- switch (index.current) {
- case 0:
- baseList.value = [{
- title: '仍需至少注册',
- num: "20人"
- }]
- break;
- case 1:
- baseList.value = [{
- title: '仍需至少注册',
- num: "20人"
- },
- {
- title: '或',
- num: " "
- },
- {
- title: '仍需至少下单',
- num: "5人"
- }
- ]
- break;
- case 2:
- break;
- case 3:
- break;
- case 4:
- break;
+ if(!props.dataInfo || !props.dataInfo.level_list) return
+
+ let current = index.current + 1
+
+ if(!props.dataInfo.level_list[current]){
+ // if(index.current == (props.dataInfo.level_list.length - 1)){
+ baseList.value = [{
+ title: '已达到最高等级',
+ num: ""
+ }]
+ return
+ }
+
+ let level = props.dataInfo.level_list[current]
+ let info = props.dataInfo.info
+ let register_users_sum = props.dataInfo.register_users_sum || 0
+ let order_users_sum = props.dataInfo.order_users_sum || 0
+
+ baseList.value = []
+
+ // if(index.current <= info.userHhRole){
+ // baseList.value.push({
+ // title: '已达成',
+ // num: ""
+ // })
+ // return
+ // }
+
+ if(level.paramCondition){
+ baseList.value.push({
+ title: '仍需至少注册',
+ num: (level.paramCondition - register_users_sum) + "人"
+ })
+ }
+ if(level.needOrderUserNum){
+ if(baseList.value.length > 0){
+ baseList.value.push({
+ title: '或',
+ num: ""
+ })
+ }
+ baseList.value.push({
+ title: '仍需至少下单',
+ num: (level.needOrderUserNum - order_users_sum) + "人"
+ })
}
+
+ // switch (index.current) {
+ // case 0:
+ // baseList.value = [{
+ // title: '仍需至少注册',
+ // num: "20人"
+ // }]
+ // break;
+ // case 1:
+ // baseList.value = [{
+ // title: '仍需至少注册',
+ // num: "20人"
+ // },
+ // {
+ // title: '或',
+ // num: " "
+ // },
+ // {
+ // title: '仍需至少下单',
+ // num: "5人"
+ // }
+ // ]
+ // break;
+ // case 2:
+ // break;
+ // case 3:
+ // break;
+ // case 4:
+ // break;
+ // }
}
diff --git a/otherPages/workbenchManage/myLevel/commponents/myData.vue b/otherPages/workbenchManage/myLevel/commponents/myData.vue
index 900c7a7..3c47f51 100644
--- a/otherPages/workbenchManage/myLevel/commponents/myData.vue
+++ b/otherPages/workbenchManage/myLevel/commponents/myData.vue
@@ -1,6 +1,5 @@
-
@@ -53,15 +52,15 @@
const nounthData = computed(() => {
return [{
title: '当月注册用户',
- num: props.dataInfo.register_users + "个",
+ num: (props.dataInfo.register_users || 0) + "个",
},
{
title: '当月下单用户',
- num: props.dataInfo.register_users + "个",
+ num: (props.dataInfo.order_users || 0) + "个",
},
{
title: '当月有效用户',
- num: props.dataInfo.register_users + "个",
+ num: (props.dataInfo.use_users || 0) + "个",
},
]
})
@@ -69,15 +68,15 @@
const totalData = computed(() => {
return [{
title: '累计注册用户',
- num: props.dataInfo.register_users + "个",
+ num: (props.dataInfo.register_users_sum || 0) + "个",
},
{
title: '累计下单用户',
- num: props.dataInfo.register_users + "个",
+ num: (props.dataInfo.order_users_sum || 0) + "个",
},
{
title: '累计有效用户',
- num: props.dataInfo.register_users + "个",
+ num: (props.dataInfo.use_users_sum || 0) + "个",
color:'red'
},
]
diff --git a/otherPages/workbenchManage/myLevel/index.vue b/otherPages/workbenchManage/myLevel/index.vue
index 2320fa9..4b4f7cb 100644
--- a/otherPages/workbenchManage/myLevel/index.vue
+++ b/otherPages/workbenchManage/myLevel/index.vue
@@ -10,11 +10,11 @@
{{state.baseInfo.info.userName}}
-
-
+
+
已加入合伙人:{{state.baseInfo.partner_day}}
@@ -39,9 +39,9 @@
-
-
-
+
+
+
- {{ item.createTime }}
+ {{ item.orderTime }}
@@ -39,10 +39,10 @@
- 累计消报酬
+ 累计报酬
- ¥ {{ item.accumulate_money || 0 }}
+ ¥ {{ item.userAmount || 0 }}
diff --git a/otherPages/workbenchManage/myUser/index.vue b/otherPages/workbenchManage/myUser/index.vue
index e53d6fb..dc6746f 100644
--- a/otherPages/workbenchManage/myUser/index.vue
+++ b/otherPages/workbenchManage/myUser/index.vue
@@ -5,10 +5,10 @@
diff --git a/pages/workbenchManage/index.vue b/pages/workbenchManage/index.vue
index 43a4f4d..f5026a5 100644
--- a/pages/workbenchManage/index.vue
+++ b/pages/workbenchManage/index.vue
@@ -13,27 +13,27 @@
合伙人工作台
-
+
{{ configList?.partner_work_statement?.paramValueText }}
- 暂未开放 >
-
+
+ 申请加入 >
-
+
伴宠师工作台
diff --git a/utils/getUrl.js b/utils/getUrl.js
index 58d19fd..986cc48 100644
--- a/utils/getUrl.js
+++ b/utils/getUrl.js
@@ -1,4 +1,4 @@
-let current = "trial";
+let current = "develop";
const accountInfo = wx.getAccountInfoSync();
// current = accountInfo.miniProgram.envVersion;