commission--yt-commit

This commit is contained in:
yuanteng0011 2025-06-04 10:41:47 +08:00
parent 80923c3d66
commit d58e024f23
10 changed files with 143 additions and 29 deletions

View File

@ -1,7 +1,7 @@
{
"pages": [
"pages/loginModule/pwdLogin/pwdLogin",
"pages/personCenter/mine/mine",
"pages/loginModule/pwdLogin/pwdLogin",
"pages/personCenter/subCommissionSetting/subCommissionSetting",
"pages/test/testVideo/testVideo",
"pages/personCenter/withdrawal/withdrawal",

View File

@ -47,7 +47,7 @@ Page({
icon: 'success',
});
// 这里可以跳转到其他页面
wx.reLaunch({
wx.navigateTo({
url: '/pages/personCenter/withdrawalAccount/withdrawalAccount',
});
},
@ -205,7 +205,7 @@ Page({
icon: 'success',
});
// 这里可以跳转到其他页面
wx.reLaunch({
wx.navigateTo({
url: '/pages/personCenter/withdrawal/withdrawal',
});
},

View File

@ -14,6 +14,7 @@ Page({
showCommissionRatePop: false,
},
// 获取项目列表
getProjectList() {
wx.request({
url: baseUrl + '/projectCommission/query/commission',
@ -90,11 +91,16 @@ Page({
console.log('设置数据:', agentPrice, commissionRate, pricingMethod);
this.closeCommissionRatePop();
},
gotoSubCommission() {
// 跳转下级单价页面
gotoSubCommission(e) {
// console.log('e---->',e.currentTarget.dataset.id);
const id = e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/personCenter/subCommissionSetting/subCommissionSetting',
url: `/pages/personCenter/subCommissionSetting/subCommissionSetting?id=${ id }`,
})
},
/**
* 生命周期函数--监听页面加载
*/

View File

@ -30,7 +30,7 @@
</view>
</view>
</view>
<view class="flex-row shrink-0 self-start section_2 ml-21" bind:tap="gotoSubCommission">
<view class="flex-row shrink-0 self-start section_2 ml-21" bind:tap="gotoSubCommission" data-id="{{ item.projectId }}">
<image
class="image_4 image_5"
src="./images/yjt2.png"

View File

@ -7,6 +7,18 @@ Component({
type: Boolean,
value: false
},
pgencyPrice: 0, // 代理价
commissionRate: 0, // 抽成比例
},
/**
* 处理输入框的变化
*/
handleInputChange(e) {
const { field } = e.target.dataset; // 获取字段名
this.setData({
[field]: e.detail.value, // 动态更新输入框数据
});
},
/**

View File

@ -1,3 +1,5 @@
import { baseUrl } from "../../../request";
// pages/personCenter/fundingDetails/fundingDetails.js
Page({
@ -5,14 +7,78 @@ Page({
* 页面的初始数据
*/
data: {
items: [null, null, null],
currentBalance: 0, // 当前余额
withdrawalAmount: 0, // 提现中的余额
withdrawnAmount: 0, // 已提现的金额
fundsChangeVOList: [] // 资金变动明细记录
},
// 跳转绑定银行卡页面
gotoBindCard() {
wx.navigateTo({
url: `/pages/personCenter/bindBankCard/bindBankCard?isUpdate=${true}`,
})
},
// 跳转去提现
gotoFundingDetails() {
wx.navigateTo({
url: '/pages/personCenter/withdrawal/withdrawal',
})
},
// 获取资金变动记录
getFundChangeList() {
wx.request({
url: baseUrl + '/withdrawalApply/query/change',
method: 'POST',
header: {
Authorization: wx.getStorageSync('token')
},
success: res => {
console.log('后端返回---->',res);
if (res.data.data === null) {
wx.showModal({
title: '账户为空',
content: '请新建账户',
complete: (res) => {
if (res.cancel) { // 点击取消时
wx.navigateTo({
url: '/pages/personCenter/mine/mine',
})
}
if (res.confirm) { // 点击确定时
wx.navigateTo({
url: '/pages/personCenter/bindBankCard/bindBankCard',
})
}
}
})
}
if (res.data.code === 1) {
this.setData({
currentBalance: res.data.data.currentBalance,
withdrawalAmount: res.data.data.withdrawalAmount,
withdrawnAmount: res.data.data.withdrawnAmount,
fundsChangeVOList: res.data.data.fundsChangeVOList
});
}
}
})
},
gotoBillingDetails() {
wx.navigateTo({
url: '/pages/personCenter/billingDetails/billingDetails',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getFundChangeList()
},
/**
@ -26,7 +92,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
this.getFundChangeList()
},
/**

View File

@ -3,22 +3,22 @@
<view class="flex-col self-stretch section_2">
<text class="self-start font text">钱包余额</text>
<view class="flex-row justify-between items-center self-stretch group">
<text class="text_2">10.00</text>
<view class="flex-col justify-start items-center text-wrapper"><text class="font text_3">去提现</text></view>
<text class="text_2">{{currentBalance}}</text> <!-- 当前余额 -->
<view class="flex-col justify-start items-center text-wrapper" bind:tap="gotoFundingDetails"><text class="font text_3">去提现</text></view>
</view>
<view class="flex-row self-stretch group_2">
<view class="flex-row items-baseline">
<text class="font text_4">提现中</text>
<text class="ml-8 font_2">¥0</text>
<text class="ml-8 font_2">{{withdrawalAmount}}¥</text> <!-- 提现中的余额 -->
</view>
<view class="flex-row items-baseline ml-33">
<text class="font text_5">已提现</text>
<text class="font_2 ml-7">¥0</text>
<text class="font_2 ml-7">{{withdrawnAmount}}¥</text> <!-- 已提现金额 -->
</view>
</view>
</view>
<view class="flex-row justify-between equal-division group_3">
<view class="flex-row items-center">
<view class="flex-row items-center" bind:tap="gotoBindCard">
<image
class="shrink-0 image"
src="./images/ggzh.png"
@ -27,7 +27,7 @@
<text class="ml-4 font text_6">更改账户</text>
</view>
<view class="horiz-divider section_3"></view>
<view class="flex-row items-center">
<view class="flex-row items-center" bind:tap="gotoBillingDetails">
<image
class="shrink-0 image"
src="./images/txjl.png"
@ -39,15 +39,15 @@
</view>
<text class="mt-24 self-start font_3 text_8">资金变动记录</text>
<view class="mt-24 flex-col self-stretch list">
<view class="flex-col list-item mt-13" wx:for="{{items}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="flex-col list-item mt-13" wx:for="{{fundsChangeVOList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="flex-row">
<text class="flex-1 font_4">美团省钱包-春季活动(2.9元购买30元券包(5月1日-5.5日))</text>
<text class="shrink-0 self-start font_5 text_9 ml-21">+1.20</text>
<text class="flex-1 font_4">{{item.projectName}}</text> <!-- 项目名称 -->
<text class="shrink-0 self-start font_5 text_9 ml-21">{{item.changeAmount}} ¥</text> <!-- 变动金额 -->
</view>
<view class="mt-12 flex-row justify-between items-center">
<text class="font_6 text_10">2025-02-10 12:10:29</text>
<text class="font_3">11.20</text>
<text class="font_6 text_10">{{item.createTime}}</text> <!-- 创建时间 -->
<text class="font_3">{{item.currentAmount}} ¥</text> <!-- 当前金额 -->
</view>
</view>
</view>
</view>
</view>

View File

@ -1,3 +1,5 @@
import { baseUrl } from "../../../request";
// pages/personCenter/subCommissionSetting/subCommissionSetting.js
Page({
@ -8,6 +10,9 @@ Page({
items_1: [null, null, null],
items: [null, null],
showCommissionRatePop: false,
id: 0, // 项目id
subCommissionList: [], // 下级抽佣列表
},
// 点击“设价”按钮,显示弹窗
@ -27,11 +32,36 @@ Page({
this.closeCommissionRatePop();
},
// 查询下级抽佣情况
getSubCommissionList() {
const id = this.data.id
wx.request({
url: baseUrl + '/projectCommission/query/sub/commission',
method: 'POST',
header: {
Authorization: wx.getStorageSync('token'),
},
data: { id: id },
success: res => {
console.log('下级抽佣列表----->',res.data.data);
if (res.data.code === 1) {
this.setData({
subCommissionList: res.data.data
})
}
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log('----->',options);
this.setData({
id: options.id
})
this.getSubCommissionList()
},
/**

View File

@ -10,8 +10,8 @@
</view>
</view>
<view class="flex-col mt-16">
<view class="flex-col list-item_1 mt-23" wx:for="{{items}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<text class="self-start font_2 text_3">结算标准:张新然</text>
<view class="flex-col list-item_1 mt-23" wx:for="{{ subCommissionList }}" wx:for-item="item" wx:for-index="index" wx:key="index">
<text class="self-start font_2 text_3">结算标准:{{ item.subUserNickName }}</text>
<view class="flex-col self-stretch section_3 mt-17">
<view class="flex-row justify-between items-center">
<text class="font_3 text_4">结算标准</text>
@ -21,13 +21,13 @@
<view class="flex-col mt-19">
<view
class="flex-row items-center list-item mt-13"
wx:for="{{items_1}}"
wx:for-item="item"
wx:for="{{ item.subUserProjectDetailCommissionVOList }}"
wx:for-item="DetailCommission"
wx:for-index="index"
wx:key="index"
>
<text class="font_5 text_5">3.6元购买30元</text>
<text class="shrink-0 font_2 text_8">0.30/0.00%</text>
<text class="font_5 text_5">{{ DetailCommission.projectDetailName }}</text>
<text class="shrink-0 font_2 text_8">{{ DetailCommission.agentUnitPrice }}/{{ DetailCommission.currentCommissionRate }}%</text>
<view class="flex-row shrink-0 group_2" bindtap="showCommissionRatePop">
<image
class="image_2"

View File

@ -1,3 +1,3 @@
export const local='http://localhost:3456';
export const ip = 'http://1.94.237.210:3457';
export const baseUrl = local;
export const baseUrl = ip;