Browse Source

feat(workbench): 更新合伙人工作台功能及用户数据显示

- 修改环境变量从trial到develop
- 更新用户订单和报酬显示字段
- 优化用户数据统计显示逻辑
- 调整合伙人等级显示和条件计算
- 启用合伙人工作台功能入口
- 修复邀请码绑定显示问题
master
前端-胡立永 2 weeks ago
parent
commit
fb274145e1
8 changed files with 150 additions and 75 deletions
  1. +8
    -5
      otherPages/workbenchManage/bindUser/index.vue
  2. +110
    -36
      otherPages/workbenchManage/myLevel/commponents/levelInfo.vue
  3. +6
    -7
      otherPages/workbenchManage/myLevel/commponents/myData.vue
  4. +8
    -9
      otherPages/workbenchManage/myLevel/index.vue
  5. +3
    -3
      otherPages/workbenchManage/myUser/components/haveOrder.vue
  6. +8
    -8
      otherPages/workbenchManage/myUser/index.vue
  7. +6
    -6
      pages/workbenchManage/index.vue
  8. +1
    -1
      utils/getUrl.js

+ 8
- 5
otherPages/workbenchManage/bindUser/index.vue View File

@ -5,7 +5,7 @@
<up-image width="139rpx" height="139rpx" :src="userInfo?.userImage" shape="circle"></up-image>
<view class="header-name">
<view class="font32 mb20" :style="{color:'#000'}">{{ userInfo?.userName}}</view>
<view class="label1" v-if="userInfo.userHhRole == 1">
<!-- <view class="label1" v-if="userInfo.userHhRole == 1">
初级伴宠师
</view>
<view class="label1" v-if="userInfo.userHhRole == 2">
@ -13,12 +13,15 @@
</view>
<view class="label1"v-if="userInfo.userHhRole == 3">
高级伴宠师
</view> -->
<view class="label1" v-if="baseInfo.partner_level">
{{ baseInfo.partner_level }}
</view>
<view class="flex font24">
<view :style="{color:'#A55822'}">当前分成比例
<view :style="{color:'#A55822'}" v-if="baseInfo.partner_new_num">当前分成比例
<text :style="{color:'#C12525'}">{{baseInfo.partner_new_num}}</text>
</view>
<view :style="{color:'#A55822'}">晋级后分成比例
<view :style="{color:'#A55822'}" v-if="baseInfo.partner_upgrade_num">晋级后分成比例
<text :style="{color:'#C12525'}">{{baseInfo.partner_upgrade_num}}</text>
</view>
</view>
@ -60,9 +63,9 @@
:style="{'background-image' : `url('${configList.background_popularize_one.paramValueImage}')`}">
<view class="mb20 font32">邀请码邀请</view>
<view class="mb20">用户输入邀请码直接完成绑定</view>
<up-input disabled v-model="dataF.code">
<up-input disabled v-model="baseInfo.user_code">
<template #suffix>
<up-button @click="copyMessage(dataF.code)" text="复制" type="success" size="small" shape="circle"></up-button>
<up-button @click="copyMessage(baseInfo.user_code)" text="复制" type="success" size="small" shape="circle"></up-button>
</template>
</up-input>
</view>


+ 110
- 36
otherPages/workbenchManage/myLevel/commponents/levelInfo.vue View File

@ -10,9 +10,21 @@
</view>
</view>
</view>
<view >
<up-swiper :list="list3" previousMargin="30" nextMargin="30" circular :autoplay="false" radius="10" height="300rpx"
@change="swiperChange"></up-swiper>
<view>
<up-swiper
:list="level_list"
previousMargin="10"
nextMargin="10"
circular
:autoplay="false"
radius="10"
height="440rpx"
keyName="paramValueImage"
img-mode="aspectFit"
:current="currentIndex"
@change="swiperChange"></up-swiper>
<!-- <image src="" mode="aspectFit"></image> -->
</view>
</template>
@ -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;
// }
}
</script>


+ 6
- 7
otherPages/workbenchManage/myLevel/commponents/myData.vue View File

@ -1,6 +1,5 @@
<template>
<view>
<view class="my-data">
<view class="my-data-mounth">
<cardTitle :cardTitle="nounthName"></cardTitle>
@ -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'
},
]


+ 8
- 9
otherPages/workbenchManage/myLevel/index.vue View File

@ -10,11 +10,11 @@
{{state.baseInfo.info.userName}}
</view>
<view class="flex-rowl">
<!-- <view class="label1 mr20">
<view class="label1 mr20" v-if="state.baseInfo.partner_level">
{{ state.baseInfo.partner_level }}
</view>
-->
<view class="label1" v-if="state.baseInfo.info.userHhRole == 1">
<!-- <view class="label1" v-if="state.baseInfo.info.userHhRole == 1">
初级伴宠师
</view>
<view class="label1" v-if="state.baseInfo.info.userHhRole == 2">
@ -22,7 +22,7 @@
</view>
<view class="label1"v-if="state.baseInfo.info.userHhRole == 3">
高级伴宠师
</view>
</view> -->
<view class="size-22" style="color: #B97132;">
已加入合伙人:{{state.baseInfo.partner_day}}
</view>
@ -39,9 +39,9 @@
</view>
</view>
<view class="bind-main">
<myData v-show="showFlag === 'data'" :dataInfo="state.baseInfo"></myData>
<levelInfo v-show="showFlag === 'level'" :dataInfo="state.baseInfo"></levelInfo>
<view class="bind-main" v-if="state.baseInfo && state.baseInfo.level_list">
<myData v-if="showFlag == 'data'" :dataInfo="state.baseInfo"></myData>
<levelInfo v-if="showFlag == 'level'" :dataInfo="state.baseInfo"></levelInfo>
</view>
<view class="bind-user-foot flex-around">
@ -112,14 +112,13 @@
state.baseInfo.info = state.info
getBaseInfo()
})
// ...cardData,
const getBaseInfo = () => {
binBaseInfo(state.info.userId).then(res => {
state.baseInfo = res.data
})
bindCode(state.info.userId).then(res => {
state.code = {
...cardData,
code: res.data.code
}
state.posterUrl = res.data.url


+ 3
- 3
otherPages/workbenchManage/myUser/components/haveOrder.vue View File

@ -26,7 +26,7 @@
最近一次下单
</view>
<view >
{{ item.createTime }}
{{ item.orderTime }}
</view>
</view>
<view class="have-order-time flex-b size-26 color-999" v-show="item.isShow">
@ -39,10 +39,10 @@
</view>
<view class="have-order-time flex-b size-26 color-999" v-show="item.isShow">
<view >
累计报酬
累计报酬
</view>
<view >
{{ item.accumulate_money || 0 }}
{{ item.userAmount || 0 }}
</view>
</view>
</view>


+ 8
- 8
otherPages/workbenchManage/myUser/index.vue View File

@ -5,10 +5,10 @@
<up-image width="120rpx" height="120rpx" :src="state.baseInfo.info.userImage" shape="circle"></up-image>
<view class="header-name">
<view class="font32 mb20 color-040">{{ state.baseInfo.info.userName }}</view>
<!-- <view class="label1">
<view class="label1" v-if="state.baseInfo.partner_level">
{{ state.baseInfo.partner_level }}
</view> -->
<view class="label1" v-if="state.baseInfo.info.userHhRole == 1">
</view>
<!-- <view class="label1" v-if="state.baseInfo.info.userHhRole == 1">
初级伴宠师
</view>
<view class="label1" v-if="state.baseInfo.info.userHhRole == 2">
@ -16,17 +16,17 @@
</view>
<view class="label1"v-if="state.baseInfo.info.userHhRole == 3">
高级伴宠师
</view>
</view> -->
<view class="flex font24">
<view :style="{color:'#A55822'}">当前分成比例
<view :style="{color:'#A55822'}" v-if="state.baseInfo.partner_new_num">当前分成比例
<text :style="{color:'#C12525'}">{{state.baseInfo.partner_new_num}}</text>
</view>
<view :style="{color:'#A55822'}">晋级后分成比例
<view :style="{color:'#A55822'}" v-if="state.baseInfo.partner_upgrade_num">晋级后分成比例
<text :style="{color:'#C12525'}">{{state.baseInfo.partner_upgrade_num}}</text>
</view>
</view>
<view class="color-a55 size-24 mt16" v-html="state.baseInfo.level_details">
</view>
<!-- <view class="color-a55 size-24 mt16" v-html="state.baseInfo.level_details">
</view> -->
</view>
</view>
</view>


+ 6
- 6
pages/workbenchManage/index.vue View File

@ -13,27 +13,27 @@
<view class="container-list">
<view class="mb28 col3 font32">合伙人工作台</view>
<!-- 申请加入 v-if="userInfo.userHh != 1" -->
<view class="container-list-but font28">
<view class="container-list-but font28" v-if="userInfo.userHh != 1">
<view class="explain">
<view class="explain-text">
<text>{{ configList?.partner_work_statement?.paramValueText }}</text>
<view class="font24 add-but col-white join" style="background-color: #999;color: #fff;"
@click="">暂未开放 ></view>
<!-- <view class="font24 add-but col-white join" @click="handleJoin(1)">申请加入 ></view> -->
<!-- <view class="font24 add-but col-white join" style="background-color: #999;color: #fff;"
@click="">暂未开放 ></view> -->
<view class="font24 add-but col-white join" @click="handleJoin(1)">申请加入 ></view>
</view>
<image class="explain-img" :src="configList?.partner_work_statement?.paramValueImage"
mode="aspectFit"></image>
</view>
</view>
<!-- 申请加入后 -->
<!-- <view class="flex flex-between font24 flex-wrap" v-if="userInfo.userHh==1">
<view class="flex flex-between font24 flex-wrap" v-if="userInfo.userHh==1">
<view class="icon-list" @click="handleGoto(item)" v-for="item in iconState.list1" :key="item.id">
<up-image class="mb20" :show-loading="true" :src="item.image" width="68rpx"
height="68rpx"></up-image>
<view>{{item.name}}</view>
</view>
<view class="icon-list"></view>
</view> -->
</view>
</view>
<view class="container-list">
<view class="mb28 col3 font32">伴宠师工作台</view>


+ 1
- 1
utils/getUrl.js View File

@ -1,4 +1,4 @@
let current = "trial";
let current = "develop";
const accountInfo = wx.getAccountInfoSync();
// current = accountInfo.miniProgram.envVersion;


Loading…
Cancel
Save