commission--yt-commit
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
import { baseUrl } from "../../../request"
|
||||
|
||||
// pages/personCenter/teamManage/teamManage.js
|
||||
Page({
|
||||
|
||||
@ -5,14 +7,67 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
items: [null, null, null, null, null],
|
||||
directAgentSize: 0, // 直接代理人数
|
||||
teamSize: null, // 团队人数
|
||||
teamEarnings: null, // 团队收益
|
||||
invitationCode: "", // 邀请码
|
||||
userMemberInfoVOList: [] // 成员列表
|
||||
},
|
||||
|
||||
// 获取团队成员信息
|
||||
getTeamMembersInfo() {
|
||||
wx.request({
|
||||
url: baseUrl + '/userMainInfo/query/team',
|
||||
method: 'POST',
|
||||
header: {
|
||||
Authorization: wx.getStorageSync('token')
|
||||
},
|
||||
success: res => {
|
||||
console.log('团队成员信息---->',res.data.data);
|
||||
this.setData({
|
||||
directAgentSize: res.data.data.directAgentSize,
|
||||
teamSize: res.data.data.teamSize,
|
||||
teamEarnings: res.data.data.teamEarnings,
|
||||
invitationCode: res.data.data.invitationCode,
|
||||
userMemberInfoVOList: res.data.data.userMemberInfoVOList
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 复制邀请码到剪贴板
|
||||
copyInvitationCode() {
|
||||
wx.setClipboardData({
|
||||
data: this.data.invitationCode,
|
||||
success() {
|
||||
wx.showToast({
|
||||
title: '复制成功',
|
||||
icon: 'success',
|
||||
duration: 1500
|
||||
});
|
||||
},
|
||||
fail() {
|
||||
wx.showToast({
|
||||
title: '复制失败',
|
||||
icon: 'error',
|
||||
duration: 1500
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 跳转抽佣界面
|
||||
gotoCommissionSetting() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/personCenter/commissionSetting/commissionSetting',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
this.getTeamMembersInfo()
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -3,18 +3,18 @@
|
||||
<view class="flex-row equal-division group">
|
||||
<view class="flex-col items-center group_2 group_1">
|
||||
<text class="font text">直接代理人数</text>
|
||||
<text class="font_2 text_13 mt-14">4</text>
|
||||
<text class="font_2 text_13 mt-14">{{directAgentSize}}</text>
|
||||
</view>
|
||||
<view class="flex-col items-center group_2 group_3">
|
||||
<text class="font text_2">团队总人数</text>
|
||||
<text class="font_2 text_4 mt-12">12</text>
|
||||
<text class="font_2 text_4 mt-12">{{teamSize}}</text>
|
||||
</view>
|
||||
<view class="flex-col items-start group_2 group_4">
|
||||
<text class="font text_3">团队总收益</text>
|
||||
<text class="font_2 text_1 mt-13">¥12.00</text>
|
||||
<text class="font_2 text_1 mt-13">{{teamEarnings ? '¥' + teamEarnings : '¥0'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row justify-between items-center self-stretch section_2">
|
||||
<view class="flex-row justify-between items-center self-stretch section_2" bind:tap="gotoCommissionSetting">
|
||||
<view class="flex-row items-center">
|
||||
<image
|
||||
class="shrink-0 image"
|
||||
@ -29,12 +29,12 @@
|
||||
mode="aspectFill"
|
||||
/>
|
||||
</view>
|
||||
<view class="flex-row justify-end items-center self-center section_3">
|
||||
<view class="flex-row justify-end items-center self-center section_3" bindtap="copyInvitationCode">
|
||||
<image
|
||||
class="shrink-0 image_3"
|
||||
src="./images/fuzhi.png"
|
||||
/>
|
||||
<text class="font text_6">我的邀请码:418037</text>
|
||||
<text class="font text_6">我的邀请码:{{invitationCode}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row justify-between items-center mt-13">
|
||||
@ -50,7 +50,7 @@
|
||||
<view class="flex-col list mt-13">
|
||||
<view
|
||||
class="flex-row items-center relative group_6"
|
||||
wx:for="{{items}}"
|
||||
wx:for="{{userMemberInfoVOList}}"
|
||||
wx:for-item="item"
|
||||
wx:for-index="index"
|
||||
wx:key="index"
|
||||
@ -58,19 +58,19 @@
|
||||
<view class="shrink-0 section_5"></view>
|
||||
<view class="shrink-0 section_6 pos_2" style="{{index === 0 ? 'top:0rpx;' : ''}}"></view>
|
||||
<view class="flex-col flex-1 relative section_1" style="{{index === 0 ? 'margin-top:0rpx;' : ''}}">
|
||||
<text class="self-start font_3 text_9">张新然</text>
|
||||
<text class="self-start font_3 text_9">{{item.nickName}}</text>
|
||||
<view class="flex-col self-stretch section_7">
|
||||
<text class="self-start font_4">手机号:15888610253</text>
|
||||
<text class="self-start font_4">手机号:{{item.phoneNumber}}</text>
|
||||
<view class="flex-row justify-between self-stretch mt-19">
|
||||
<text class="font_5">团队人数:0</text>
|
||||
<text class="font_6 text_15">给我创造的收益:¥0</text>
|
||||
<text class="font_5">团队人数:{{item.teamSize}}</text>
|
||||
<text class="font_6 text_15">给我创造的收益:¥{{item.parentEarnings}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row items-center self-end group_5">
|
||||
<text class="shrink-0 font_7">注册时间:</text>
|
||||
<text class="flex-1 font_8 ml-3">2025-10-31 16:10:05</text>
|
||||
<text class="flex-1 font_8 ml-3">{{item.registerTime}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
Reference in New Issue
Block a user