Compare commits
55 Commits
Author | SHA1 | Date | |
---|---|---|---|
175c052e97 | |||
d58e024f23 | |||
80923c3d66 | |||
1067eb8c72 | |||
e485cae219 | |||
a5d060633a | |||
361f6a89d3 | |||
eaf4b6c5e5 | |||
41e1570687 | |||
414f9428ec | |||
ee098e31e3 | |||
c6f93fe965 | |||
f825e45ff8 | |||
af053a80f2 | |||
b7807ade7a | |||
8b3cbfe521 | |||
ea4cc63ba2 | |||
e9308f881a | |||
87f760e991 | |||
3bbc68fd3b | |||
9fb8be3859 | |||
30eeaddb74 | |||
58a56f42b8 | |||
21c43db54e | |||
7a943e0f2a | |||
e04275130a | |||
509beeed4e | |||
96f7207401 | |||
e6fd08328a | |||
f5fbb6f87d | |||
d0722ca09a | |||
b00e10761b | |||
65c2dba89b | |||
441f8d89ea | |||
a9bd8212b9 | |||
8dea94a7fd | |||
3a4ddd2cf7 | |||
95bede1c28 | |||
f7f43d8686 | |||
76140ab79e | |||
1fbbd52cb7 | |||
50b454adcf | |||
b9f5543d78 | |||
d021c035d4 | |||
0f2bd0a945 | |||
1a171a735d | |||
007265c4bd | |||
73412c167d | |||
343893e629 | |||
31a253227f | |||
ab4508bd51 | |||
ebcb4f2cac | |||
92aab2ab7b | |||
6323bfc11b | |||
024b796d0a |
3
app.json
3
app.json
|
@ -20,7 +20,8 @@
|
|||
"pages/loginModule/forgetPwd/forgetPwd",
|
||||
"pages/personCenter/commissionSetting/commissionSetting",
|
||||
"pages/personCenter/resetPwd/resetPwd",
|
||||
"pages/personCenter/bindBankCard/bindBankCard"
|
||||
"pages/personCenter/bindBankCard/bindBankCard",
|
||||
"pages/projectModule/settlement/settlement"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTextStyle": "black",
|
||||
|
|
|
@ -103,19 +103,21 @@ Page({
|
|||
// 3. 格式校验手机号
|
||||
if (!/^1\d{10}$/.test(phone)) {
|
||||
return wx.showToast({ title: '手机号格式不正确', icon: 'none' });
|
||||
}
|
||||
}
|
||||
// 2. 密码一致
|
||||
if (newPwd !== confirmPwd) {
|
||||
return wx.showToast({ title: '两次密码不一致', icon: 'none' });
|
||||
}
|
||||
// 4. 发起重置请求
|
||||
wx.request({
|
||||
url: baseUrl + '/userInfo/mini/forgetPwd',
|
||||
url: baseUrl + '/userInfo/mini/out/reset/pwd',
|
||||
method: 'POST',
|
||||
data: {
|
||||
phoneNumber: phone,
|
||||
verificationCode: code,
|
||||
newPassword: newPwd
|
||||
userPassword: newPwd,
|
||||
userConfirmPassword: confirmPwd,
|
||||
sourceToken: null
|
||||
},
|
||||
success: res => {
|
||||
if (res.data.code === 1) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { baseUrl } from "../../../request"
|
||||
|
||||
// pages/personCenter/billingDetails/billingDetails.js
|
||||
Page({
|
||||
|
||||
|
@ -5,14 +7,33 @@ Page({
|
|||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
items: [null, null, null, null]
|
||||
withdrawalList: [],
|
||||
withdrawalStatus: ['审核中', '提现成功', '提现失败']
|
||||
},
|
||||
|
||||
getWithdrawalList() {
|
||||
wx.request({
|
||||
url: baseUrl + '/withdrawalApply/query',
|
||||
method: 'POST',
|
||||
header: {
|
||||
Authorization: wx.getStorageSync('token')
|
||||
},
|
||||
success: res => {
|
||||
console.log('账单明细---->',res.data);
|
||||
console.log('登录token---->',wx.getStorageSync('token'));
|
||||
if (res.data.code === 1) {
|
||||
this.setData({
|
||||
withdrawalList: res.data.data
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
this.getWithdrawalList()
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,66 +1,268 @@
|
|||
import { baseUrl } from "../../../request"
|
||||
|
||||
// pages/personCenter/bindBankCard/bindBankCard.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
id: 0, // 账户ID
|
||||
cardHolder: '', // 持卡人
|
||||
idCardNumber: '', // 身份证号
|
||||
phoneNumber: '', // 手机号
|
||||
bankCardNumber: '', // 银行卡号
|
||||
bankName: '', // 开户银行
|
||||
isUpdate: false, // 是否更新
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 更新按钮点击事件
|
||||
*/
|
||||
updateInfo() {
|
||||
if (this.validateForm()) {
|
||||
// 构建请求体
|
||||
const requestData = {
|
||||
id: this.data.id,
|
||||
cardHolder: this.data.cardHolder,
|
||||
idCardNumber: this.data.idCardNumber,
|
||||
phoneNumber: this.data.phoneNumber,
|
||||
bankCardNumber: this.data.bankCardNumber,
|
||||
openBank: this.data.bankName, // 添加开户银行字段
|
||||
};
|
||||
|
||||
// 发送请求到后台接口
|
||||
wx.request({
|
||||
url: baseUrl + '/userAccount/update', // 替换成实际接口地址
|
||||
method: 'POST',
|
||||
header: {
|
||||
Authorization: wx.getStorageSync('token')
|
||||
},
|
||||
data: requestData,
|
||||
success(res) {
|
||||
// console.log('后端返回---->',res.data);
|
||||
// 成功的回调
|
||||
wx.showToast({
|
||||
title: '更新成功',
|
||||
icon: 'success',
|
||||
});
|
||||
// 这里可以跳转到其他页面
|
||||
wx.navigateTo({
|
||||
url: '/pages/personCenter/withdrawalAccount/withdrawalAccount',
|
||||
});
|
||||
},
|
||||
fail(err) {
|
||||
// 失败的回调
|
||||
wx.showToast({
|
||||
title: '绑定失败,请重试',
|
||||
icon: 'none',
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 获取当前账户信息
|
||||
getAccountInfo() {
|
||||
wx.request({
|
||||
url: baseUrl + '/userAccount/queryById', // 替换为你的后端接口
|
||||
method: 'POST',
|
||||
header: {
|
||||
Authorization: wx.getStorageSync('token'),
|
||||
},
|
||||
success: (res) => {
|
||||
// console.log('当前账户是---->',res.data.data);
|
||||
if (res.data.code === 1) {
|
||||
this.setData({
|
||||
id: res.data.data.id,
|
||||
cardHolder: res.data.data.cardHolder,
|
||||
idCardNumber: res.data.data.idCardNumber,
|
||||
phoneNumber: res.data.data.phoneNumber,
|
||||
bankCardNumber: res.data.data.bankCardNumber,
|
||||
bankName: res.data.data.openBank
|
||||
});
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: '获取数据失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
wx.showToast({
|
||||
title: '请求失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 处理输入框的变化
|
||||
*/
|
||||
handleInputChange(e) {
|
||||
const { field } = e.target.dataset; // 获取字段名
|
||||
this.setData({
|
||||
[field]: e.detail.value, // 动态更新输入框数据
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 验证表单
|
||||
*/
|
||||
validateForm() {
|
||||
const { cardHolder, idCardNumber, phoneNumber, bankCardNumber, bankName } = this.data;
|
||||
|
||||
// 检查必填字段是否为空
|
||||
if (!cardHolder || !idCardNumber || !phoneNumber || !bankCardNumber || !bankName) {
|
||||
wx.showToast({
|
||||
title: '用户信息不全',
|
||||
icon: 'none',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
// 检查手机号是否为 11 位且只包含数字
|
||||
const phonePattern = /^[0-9]{11}$/;
|
||||
if (!phonePattern.test(phoneNumber)) {
|
||||
wx.showToast({
|
||||
title: '手机号必须是 11 位数字',
|
||||
icon: 'none',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
// 检查身份证号是否为 18 位且只包含数字
|
||||
const idCardPattern = /^[0-9]{18}$/;
|
||||
if (!idCardPattern.test(idCardNumber)) {
|
||||
wx.showToast({
|
||||
title: '身份证号必须是 18 位数字',
|
||||
icon: 'none',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
// 检查银行卡号是否为 16 位且只包含数字
|
||||
const bankCardPattern = /^[0-9]{16}$/;
|
||||
if (!bankCardPattern.test(bankCardNumber)) {
|
||||
wx.showToast({
|
||||
title: '银行卡号必须是 16 位数字',
|
||||
icon: 'none',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
// 检查持卡人不能是纯数字
|
||||
const cardHolderPattern = /^\d+$/;
|
||||
if (cardHolderPattern.test(cardHolder)) {
|
||||
wx.showToast({
|
||||
title: '持卡人姓名不能是数字',
|
||||
icon: 'none',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
// 检查开户银行不能包含字母或数字,只能是中文
|
||||
const bankNamePattern = /^[\u4e00-\u9fa5]+$/; // 只允许中文字符
|
||||
if (!bankNamePattern.test(bankName)) {
|
||||
wx.showToast({
|
||||
title: '开户银行只能包含中文字符',
|
||||
icon: 'none',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* 保存按钮点击事件
|
||||
*/
|
||||
saveInfo() {
|
||||
if (this.validateForm()) {
|
||||
// 构建请求体
|
||||
const requestData = {
|
||||
cardHolder: this.data.cardHolder,
|
||||
idCardNumber: this.data.idCardNumber,
|
||||
phoneNumber: this.data.phoneNumber,
|
||||
bankCardNumber: this.data.bankCardNumber,
|
||||
openBank: this.data.bankName, // 添加开户银行字段
|
||||
};
|
||||
|
||||
// 发送请求到后台接口
|
||||
wx.request({
|
||||
url: baseUrl + '/userAccount/add', // 替换成实际接口地址
|
||||
method: 'POST',
|
||||
header: {
|
||||
Authorization: wx.getStorageSync('token')
|
||||
},
|
||||
data: requestData,
|
||||
success(res) {
|
||||
console.log('后端返回---->',res.data);
|
||||
// 成功的回调
|
||||
wx.showToast({
|
||||
title: '绑定成功',
|
||||
icon: 'success',
|
||||
});
|
||||
// 这里可以跳转到其他页面
|
||||
wx.navigateTo({
|
||||
url: '/pages/personCenter/withdrawal/withdrawal',
|
||||
});
|
||||
},
|
||||
fail(err) {
|
||||
// 失败的回调
|
||||
wx.showToast({
|
||||
title: '绑定失败,请重试',
|
||||
icon: 'none',
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
// console.log('---->',options.isUpdate);
|
||||
this.getAccountInfo()
|
||||
this.setData({
|
||||
isUpdate: options.isUpdate
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
onReady() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
onShow() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
onHide() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
onUnload() {},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
onPullDownRefresh() {},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
onReachBottom() {},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
onShareAppMessage() {},
|
||||
});
|
|
@ -1,44 +1,88 @@
|
|||
<view class="flex-col page">
|
||||
<text class="self-center font text">绑定银行卡</text>
|
||||
<text wx:if="{{ isUpdate }}" class="self-center font text">更改银行卡信息</text>
|
||||
<text wx:else="{{ isUpdate }}" class="self-center font text">绑定银行卡信息</text>
|
||||
<text class="self-center font_2 text_2">请绑定持卡人本人的银行卡</text>
|
||||
|
||||
<view class="flex-col self-stretch group">
|
||||
<!-- 持卡人 -->
|
||||
<view class="self-start group_2">
|
||||
<text class="font_2">持卡人</text>
|
||||
<text class="font_3">*</text>
|
||||
</view>
|
||||
<view class="flex-col justify-start items-start self-stretch text-wrapper mt-11">
|
||||
<input class="text_3 font" placeholder="请输入持卡人" />
|
||||
<input
|
||||
class="text_3 font"
|
||||
placeholder="请输入持卡人"
|
||||
data-field="cardHolder"
|
||||
bindinput="handleInputChange"
|
||||
value="{{ cardHolder }}"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 身份证号 -->
|
||||
<view class="self-start group_3 mt-11">
|
||||
<text class="font_2 text_4">身份证号</text>
|
||||
<text class="font_3">*</text>
|
||||
</view>
|
||||
<view class="flex-col justify-start items-start self-stretch text-wrapper_2 mt-11">
|
||||
<input class="text_12 font_4" placeholder="请输入持卡人身份证号" />
|
||||
<input
|
||||
class="text_12 font_4"
|
||||
placeholder="请输入持卡人身份证号"
|
||||
data-field="idCardNumber"
|
||||
bindinput="handleInputChange"
|
||||
value="{{ idCardNumber }}"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 手机号 -->
|
||||
<view class="self-start group_4 mt-11">
|
||||
<text class="font_2">手机号</text>
|
||||
<text class="font_3">*</text>
|
||||
</view>
|
||||
<view class="flex-col justify-start items-start self-stretch text-wrapper_2 mt-11">
|
||||
<input class="text_1 font_4" placeholder="请输入持卡人绑定的手机号" />
|
||||
<input
|
||||
class="text_1 font_4"
|
||||
placeholder="请输入持卡人绑定的手机号"
|
||||
data-field="phoneNumber"
|
||||
bindinput="handleInputChange"
|
||||
value="{{ phoneNumber }}"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<!-- 银行卡号 -->
|
||||
<view class="self-start group_5 mt-11">
|
||||
<text class="font_2 text_6">银行卡号</text>
|
||||
<text class="font_3">*</text>
|
||||
</view>
|
||||
<view class="flex-col justify-start items-start self-stretch text-wrapper_2 mt-11">
|
||||
<input class="text_5 font_4" placeholder="请输入持卡人银行卡号" />
|
||||
<input
|
||||
class="text_5 font_4"
|
||||
placeholder="请输入持卡人银行卡号"
|
||||
data-field="bankCardNumber"
|
||||
bindinput="handleInputChange"
|
||||
value="{{ bankCardNumber }}"
|
||||
/>
|
||||
</view>
|
||||
<view class="self-start group_6 mt-11">
|
||||
<text class="font_2 text_7">开户银行</text>
|
||||
<text class="font_3">*</text>
|
||||
</view>
|
||||
<view class="flex-col justify-start items-start self-stretch text-wrapper_2 mt-11">
|
||||
<input class="text_1 font_4" placeholder="请输入开户银行" />
|
||||
<input
|
||||
class="text_1 font_4"
|
||||
placeholder="请输入开户银行"
|
||||
data-field="bankName"
|
||||
bindinput="handleInputChange"
|
||||
value="{{ bankName }}"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-col justify-start items-center self-center text-wrapper_3">
|
||||
<text class="font_2 text_8">保存</text>
|
||||
|
||||
<!-- 保存按钮 -->
|
||||
<view wx:if="{{ isUpdate }}" class="flex-col justify-start items-center self-center text-wrapper_3">
|
||||
<text class="font_2 text_8" bindtap="updateInfo" >更新</text>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:else="{{ isUpdate }}" class="flex-col justify-start items-center self-center text-wrapper_3">
|
||||
<text class="font_2 text_8" bindtap="saveInfo" >保存</text>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { baseUrl } from "../../../request";
|
||||
|
||||
// pages/personCenter/commissionSetting/commissionSetting.js
|
||||
Page({
|
||||
|
||||
|
@ -5,32 +7,91 @@ Page({
|
|||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
items_1: [null, null, null],
|
||||
items: [null, null],
|
||||
projectList: [], // 项目列表
|
||||
projectId: 0, // 项目ID
|
||||
maxCommissionRate: 0, // 最大抽佣比率
|
||||
showPopup: false, // 控制弹窗显隐
|
||||
LodingHidden: true, // 控制加载框取消
|
||||
showCommissionRatePop: false,
|
||||
nowMyUnitPrice: 0, // 现在的‘我的单价’,用于传给弹窗
|
||||
nowCommissionRate: 0, // 现在的'抽成比例', 用于传给弹窗
|
||||
nowAgentUnitPrice: 0, // 现在的‘代理单价’,用于传给弹窗
|
||||
nowProjectDetailName: '', // 现在的‘项目详细名称’,用于传给弹窗
|
||||
},
|
||||
|
||||
// 获取项目列表
|
||||
getProjectList() {
|
||||
wx.request({
|
||||
url: baseUrl + '/projectCommission/query/commission',
|
||||
method: 'POST',
|
||||
header: {
|
||||
Authorization: wx.getStorageSync('token'),
|
||||
},
|
||||
success: res => {
|
||||
if (res.data.code === 1) {
|
||||
console.log('项目列表---->',res.data.data);
|
||||
this.setData({
|
||||
projectList: res.data.data
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 显示弹窗
|
||||
showPopup() {
|
||||
this.setData({
|
||||
showPopup: true
|
||||
});
|
||||
},
|
||||
|
||||
// 关闭弹窗
|
||||
closePopup() {
|
||||
this.setData({
|
||||
showPopup: false
|
||||
});
|
||||
},
|
||||
|
||||
// 处理抽佣比例提交
|
||||
handleCommissionSubmit(e) {
|
||||
const { commissionRate } = e.detail;
|
||||
console.log(`设置的抽佣比例是:${commissionRate}%`);
|
||||
// 你可以在这里保存提交的数据,或者执行其他操作
|
||||
wx.request({
|
||||
url: baseUrl + '/projectCommission/update/unite/rate',
|
||||
method: 'POST',
|
||||
header: {
|
||||
Authorization: wx.getStorageSync('token'),
|
||||
},
|
||||
data: {
|
||||
uniteCommissionRate: commissionRate
|
||||
},
|
||||
success: res => {
|
||||
console.log('一键设置下级抽成比例结果---->',res.data);
|
||||
if (res.data.code === 1) {
|
||||
wx.showToast({
|
||||
title: '设置成功',
|
||||
icon: 'success',
|
||||
duration: 1500
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
this.closePopup(); // 确认后关闭弹窗
|
||||
},
|
||||
|
||||
// 点击“设价”按钮,显示弹窗
|
||||
showCommissionRatePop() {
|
||||
showCommissionRatePop(e) {
|
||||
console.log('弹窗传值----->',e);
|
||||
this.setData({
|
||||
nowCommissionRate: e.currentTarget.dataset.currentcommissionrate,
|
||||
nowMyUnitPrice: e.currentTarget.dataset.nowmyunitprice,
|
||||
nowAgentUnitPrice: e.currentTarget.dataset.agentunitprice,
|
||||
nowProjectDetailName: e.currentTarget.dataset.projectdetailname,
|
||||
projectId: e.currentTarget.dataset.detailid,
|
||||
maxCommissionRate: e.currentTarget.dataset.maxcommissionrate,
|
||||
})
|
||||
|
||||
this.setData({ showCommissionRatePop: true });
|
||||
},
|
||||
|
||||
|
@ -41,20 +102,24 @@ Page({
|
|||
|
||||
// 确认按钮回调
|
||||
handleCommissionRateConfirm(e) {
|
||||
const { agentPrice, commissionRate, pricingMethod } = e.detail;
|
||||
console.log('设置数据:', agentPrice, commissionRate, pricingMethod);
|
||||
this.getProjectList()
|
||||
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 }`,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
this.getProjectList()
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,21 +16,21 @@
|
|||
/>
|
||||
</view>
|
||||
<view class="flex-col mt-19">
|
||||
<view class="flex-col list-item mt-20" wx:for="{{items}}" wx:for-item="item" wx:for-index="index" wx:key="index">
|
||||
<view class="flex-col list-item mt-20" wx:for="{{projectList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
|
||||
<view class="flex-row group_2">
|
||||
<view class="flex-row flex-1 self-center">
|
||||
<image
|
||||
class="shrink-0 image_3"
|
||||
src="./images/xmtp.png"
|
||||
src="{{ item.projectImage }}"
|
||||
/>
|
||||
<view class="flex-col items-start flex-1 group_3 ml-13">
|
||||
<text class="font">美团神券包-春季活动</text>
|
||||
<text class="font">{{ item.projectName }}</text>
|
||||
<view class="flex-col justify-start items-center text-wrapper mt-14">
|
||||
<text class="font_3 text_4">结算T+2</text>
|
||||
<text class="font_3 text_4">结算T+{{ item.projectSettlementCycle }}</text>
|
||||
</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"
|
||||
|
@ -47,14 +47,14 @@
|
|||
<view class="flex-col mt-16">
|
||||
<view
|
||||
class="flex-row justify-center items-center relative list-item_2 mt-14"
|
||||
wx:for="{{items_1}}"
|
||||
wx:for-item="item"
|
||||
wx:for="{{item.projectDetailCommissionVOList}}"
|
||||
wx:for-item="CommissionList"
|
||||
wx:for-index="index"
|
||||
wx:key="index"
|
||||
>
|
||||
<text class="font_6 text_6 pos">3.6元购买</text>
|
||||
<text class="font_7 text_9">0.30/0.30/0.00%</text>
|
||||
<view class="flex-row group_5 pos_2" bindtap="showCommissionRatePop">
|
||||
<text class="font_6 text_6 pos">{{ CommissionList.projectDetailName }}</text>
|
||||
<text class="font_7 text_9">{{ CommissionList.myUnitPrice }}/{{ CommissionList.agentUnitPrice }}/{{ CommissionList.currentCommissionRate }}%</text>
|
||||
<view class="flex-row group_5 pos_2" bindtap="showCommissionRatePop" data-nowMyUnitPrice="{{ CommissionList.myUnitPrice }} " data-currentCommissionRate="{{ CommissionList.currentCommissionRate }}" data-agentUnitPrice="{{ CommissionList.agentUnitPrice }}" data-projectDetailName="{{ CommissionList.projectDetailName }}" data-detailid="{{ CommissionList.id }}" data-maxCommissionRate="{{ CommissionList.maxCommissionRate }}">
|
||||
<image
|
||||
class="image_4 image_6"
|
||||
src="./images/yjt3.png"
|
||||
|
@ -70,9 +70,16 @@
|
|||
<!-- 弹窗组件 -->
|
||||
<commissionPop show="{{showPopup}}" bind:close="closePopup" bind:submit="handleCommissionSubmit" />
|
||||
<!-- 弹窗组件 -->
|
||||
<!-- 四个变量 -->
|
||||
<commissionRatePop
|
||||
show="{{showCommissionRatePop}}"
|
||||
bind:cancel="closeCommissionRatePop"
|
||||
bind:close="closeCommissionRatePop"
|
||||
bind:confirm="handleCommissionRateConfirm"
|
||||
/>
|
||||
pgencyPrice="{{ nowAgentUnitPrice }}"
|
||||
commissionRate="{{ nowCommissionRate }}"
|
||||
myUnitPrice="{{ nowMyUnitPrice }}"
|
||||
projectDetailName="{{ nowProjectDetailName }}"
|
||||
detailId="{{ projectId }}"
|
||||
maxCommissionRate="{{ maxCommissionRate }}"
|
||||
/>
|
||||
|
|
|
@ -172,4 +172,4 @@
|
|||
}
|
||||
.text_8 {
|
||||
margin-left: -75.75rpx;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ Component({
|
|||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
commissionRate: "", // 用户输入的抽佣比例
|
||||
commissionRate: 0, // 用户输入的抽佣比例
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
import { baseUrl } from "../../../../request";
|
||||
Component({
|
||||
|
||||
data: {
|
||||
pgencyPriceAble: true, // 代理单价input启用/禁用
|
||||
commissionRateAble: true, // 抽成比例input启用/禁用
|
||||
LodingHidden: false, // 遮罩禁用启用
|
||||
},
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
|
@ -7,6 +14,30 @@ Component({
|
|||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
pgencyPrice: { // 代理单价
|
||||
type: String,
|
||||
value: 0
|
||||
},
|
||||
commissionRate: { // 抽成比例
|
||||
type: String,
|
||||
value: 0
|
||||
},
|
||||
myUnitPrice: { // 我的单价
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
projectDetailName: { // 项目详细名称
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
detailId: { // 下级项目明细id
|
||||
type: Number,
|
||||
value: 0
|
||||
},
|
||||
maxCommissionRate: { // 最大抽佣比例
|
||||
type: Number,
|
||||
value: 0
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -14,15 +45,116 @@ Component({
|
|||
*/
|
||||
methods: {
|
||||
close() {
|
||||
this.resetStatus();
|
||||
this.triggerEvent('close');
|
||||
},
|
||||
cancel() {
|
||||
this.resetStatus();
|
||||
this.triggerEvent('cancel');
|
||||
},
|
||||
confirm() {
|
||||
// 触发confirm事件带数据
|
||||
this.triggerEvent('confirm', {/*数据*/});
|
||||
const id = this.data.detailId;
|
||||
const Rate = this.data.commissionRate;
|
||||
const maxRate = this.data.maxCommissionRate;
|
||||
// console.log('maxRate---->', maxRate);
|
||||
if (Rate > maxRate || Rate < 0) {
|
||||
wx.showModal({
|
||||
title: '抽佣比率错误',
|
||||
content: '抽佣比率大于最大抽成',
|
||||
showCancel: false
|
||||
})
|
||||
return;
|
||||
}
|
||||
wx.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
// 发送请求
|
||||
wx.request({
|
||||
url: baseUrl + '/projectCommission/update/rate',
|
||||
method: 'POST',
|
||||
header: {
|
||||
Authorization: wx.getStorageSync('token'),
|
||||
},
|
||||
data: {
|
||||
id: id,
|
||||
currentCommissionRate: Rate
|
||||
},
|
||||
success: res => {
|
||||
console.log('后端结果---->',res.data);
|
||||
if (res.data.code === 1) {
|
||||
wx.hideLoading() // 加载框关闭
|
||||
this.triggerEvent('confirm', {});
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: '服务异常',
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
this.resetStatus();
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
// 单选框选择方法
|
||||
radioChange(e) {
|
||||
const selected = e.detail.value;
|
||||
if (selected === '代理价') {
|
||||
this.setData({
|
||||
pgencyPriceAble: false,
|
||||
commissionRateAble: true,
|
||||
})
|
||||
} else {
|
||||
this.setData({
|
||||
pgencyPriceAble: true,
|
||||
commissionRateAble: false,
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// 重置input状态
|
||||
resetStatus() {
|
||||
this.setData({
|
||||
pgencyPriceAble: true,
|
||||
commissionRateAble: true,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 处理输入框的变化
|
||||
*/
|
||||
handleInputChange(e) {
|
||||
const { field } = e.target.dataset; // 获取字段名
|
||||
this.setData({
|
||||
[field]: e.detail.value, // 动态更新输入框数据
|
||||
});
|
||||
},
|
||||
|
||||
// 计算单价——当输入抽成比率失焦时自动计算
|
||||
calculateUnitPrice() {
|
||||
const tempCommissionRate = this.data.commissionRate/100; // 暂存抽成比率
|
||||
const tempMyUnitPrice = this.data.myUnitPrice; // 暂存我的单价
|
||||
let res = parseFloat( (tempMyUnitPrice * (1- tempCommissionRate)).toPrecision(2) ) ;
|
||||
// 计算单价 (避免精度丢失问题)
|
||||
this.setData({
|
||||
pgencyPrice : res
|
||||
})
|
||||
},
|
||||
|
||||
// 计算比率——当输入代理单价失焦时自动计算
|
||||
calculateRatio() {
|
||||
const tempPgencyPrice = this.data.pgencyPrice; // 暂存代理单价
|
||||
const tempMyUnitPrice = this.data.myUnitPrice; // 暂存我的单价
|
||||
if (tempPgencyPrice == tempMyUnitPrice) {
|
||||
this.setData({ commissionRate: 100 })
|
||||
} else {
|
||||
let res = (tempMyUnitPrice - tempPgencyPrice) / tempMyUnitPrice;
|
||||
this.setData({
|
||||
commissionRate: parseFloat((res*100).toPrecision(2))
|
||||
})
|
||||
}
|
||||
console.log('抽佣比率------>',this.data.commissionRate);
|
||||
}
|
||||
}
|
||||
})
|
|
@ -4,34 +4,53 @@
|
|||
<text class="self-center font text">代理价设置</text>
|
||||
<view class="flex-col self-stretch mt-24">
|
||||
<view class="flex-col">
|
||||
<text class="self-start font_2 text_2">我的价格0.30,我的抽成0.17元</text>
|
||||
<text class="self-start font_2 text_2">我的价格{{ myUnitPrice }},我的抽成{{ (myUnitPrice*100 - pgencyPrice*100)/100 }}元</text>
|
||||
<view class="flex-col self-stretch section_2 mt-13">
|
||||
<view class="flex-row justify-between items-center">
|
||||
<text class="font_2 text_4">结算标准</text>
|
||||
<text class="font_2 text_3">3.6元购买30元券包3.6元购买</text>
|
||||
<text class="font_2 text_3">{{ projectDetailName }}</text>
|
||||
</view>
|
||||
<view class="flex-row justify-between items-center group">
|
||||
<text class="font_2 text_5">代理价</text>
|
||||
<view class="flex-col justify-start items-start text-wrapper">
|
||||
<input class="text_6 font" placeholder="0.30" />
|
||||
<input
|
||||
class="text_8 font"
|
||||
type="digit"
|
||||
placeholder="请输入代理单价"
|
||||
data-field="pgencyPrice"
|
||||
value="{{ pgencyPrice }}"
|
||||
disabled="{{ pgencyPriceAble }}"
|
||||
bindblur="calculateRatio"
|
||||
bindinput="handleInputChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row justify-between items-center group_2">
|
||||
<text class="font_2 text_7">抽成比例</text>
|
||||
<view class="flex-col justify-start items-start text-wrapper">
|
||||
<input class="text_8 font" placeholder="0.30" />
|
||||
<view class="flex-col justify-start items-start text-wrapper input-container">
|
||||
<image class="input-icon" src="./images/baifenbi.png"></image>
|
||||
<input
|
||||
class="text_8 font"
|
||||
placeholder="请输入抽成比例"
|
||||
type="digit"
|
||||
data-field="commissionRate"
|
||||
value="{{ commissionRate }}"
|
||||
disabled="{{ commissionRateAble }}"
|
||||
bindblur="calculateUnitPrice"
|
||||
bindinput="handleInputChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="flex-row justify-between items-center group_3">
|
||||
<text class="font_2 text_10">设价方式</text>
|
||||
<radio-group class="flex-col group_4">
|
||||
<radio-group class="flex-col group_4" bindchange="radioChange">
|
||||
<view class="flex-row items-center">
|
||||
<radio class="radio" color="#FF8D1A"></radio>
|
||||
<radio class="radio" color="#FF8D1A" value="代理价"></radio>
|
||||
<text class="font_2 text_9 ml-7">代理价</text>
|
||||
</view>
|
||||
<view class="flex-row items-center mt-14">
|
||||
<radio class="radio_1" color="#FF8D1A"></radio>
|
||||
<radio class="radio_1" color="#FF8D1A" value="抽成比例"></radio>
|
||||
<text class="font_2 text_11 ml-7">抽成比例</text>
|
||||
</view>
|
||||
</radio-group>
|
||||
|
@ -40,8 +59,8 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="flex-col items-center mt-22">
|
||||
<view class="flex-col justify-start items-center text-wrapper_2"><text class="font_3 text_12">确定</text></view>
|
||||
<view class="flex-col justify-start items-center text-wrapper_3 mt-12">
|
||||
<view class="flex-col justify-start items-center text-wrapper_2" bind:tap="confirm"><text class="font_3 text_12">确定</text></view>
|
||||
<view class="flex-col justify-start items-center text-wrapper_3 mt-12" bind:tap="cancel">
|
||||
<text class="font_3 text_13">取消</text>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -121,6 +121,19 @@ radio {
|
|||
transform: scale(0.8); /* 调整为你需要的缩放比例 */
|
||||
}
|
||||
|
||||
/* 在.wxss文件中 */
|
||||
.input-container {
|
||||
position: relative; /* 容器使用相对定位 */
|
||||
}
|
||||
|
||||
.input-icon {
|
||||
position: absolute; /* 图标使用绝对定位 */
|
||||
left: 82px; /* 设置图标距离左边的距离 */
|
||||
top: 9px; /* 设置图标距离顶部的距离 */
|
||||
width: 15px; /* 图标宽度 */
|
||||
height: 15px; /* 图标高度 */
|
||||
}
|
||||
|
||||
/* 弹窗外围容器,覆盖全屏并居中 */
|
||||
.popup-wrapper {
|
||||
position: fixed;
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
|
@ -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()
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -8,15 +8,14 @@ Page({
|
|||
*/
|
||||
data: {
|
||||
items: [null],
|
||||
cxz: "",
|
||||
nickName: "",
|
||||
userAvatar: "",
|
||||
phoneNumber: "",
|
||||
userAccount: "",
|
||||
invitationCode: "",
|
||||
currentBalance: "", // 当前余额
|
||||
withdrawalAmount: "", // 提现中的余额
|
||||
withdrawnAmount: "", // 已提现的余额
|
||||
withdrawalingBalance: 0, // 提现中的余额
|
||||
withdrawaledAmount: "", // 已提现的余额
|
||||
totalIncome:"", // 累计收入
|
||||
showPopup: false, // 控制弹窗显示与否
|
||||
qrcode: "https://img.picui.cn/free/2025/05/29/6837c53582068.gif", // 设置二维码图片的路径
|
||||
|
@ -27,6 +26,9 @@ Page({
|
|||
showPopup: true
|
||||
});
|
||||
},
|
||||
testOrigin() {
|
||||
console.log("testOrigin");
|
||||
},
|
||||
|
||||
// 关闭弹窗
|
||||
closePopup() {
|
||||
|
@ -96,8 +98,8 @@ Page({
|
|||
if (res.data.code === 1) {
|
||||
this.setData({
|
||||
currentBalance: res.data.data.currentBalance, // 当前余额
|
||||
withdrawalAmount: res.data.data.withdrawalAmount, // 提现中的余额
|
||||
withdrawnAmount: res.data.data.withdrawnAmount, // 已提现的余额
|
||||
withdrawalingBalance: res.data.data.withdrawalAmount, // 提现中的余额
|
||||
withdrawaledAmount: res.data.data.withdrawnAmount, // 已提现的余额
|
||||
totalIncome: res.data.data.totalIncome // 累计收入
|
||||
})
|
||||
} else {
|
||||
|
@ -134,6 +136,27 @@ Page({
|
|||
})
|
||||
},
|
||||
|
||||
// 复制邀请码到剪贴板
|
||||
copyInvitationCode() {
|
||||
wx.setClipboardData({
|
||||
data: this.data.invitationCode,
|
||||
success() {
|
||||
wx.showToast({
|
||||
title: '复制成功',
|
||||
icon: 'success',
|
||||
duration: 1500
|
||||
});
|
||||
},
|
||||
fail() {
|
||||
wx.showToast({
|
||||
title: '复制失败',
|
||||
icon: 'error',
|
||||
duration: 1500
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
<view class="flex-col relative section">
|
||||
<view class="flex-row justify-between items-center group">
|
||||
<view class="flex-col">
|
||||
<text class="self-start font text">qingcheng</text>
|
||||
<text class="self-start font text">{{ nickName }}</text>
|
||||
<view class="flex-row items-center self-stretch group_2 mt-9">
|
||||
<image
|
||||
class="image_3"
|
||||
src="./images/dianhua.png"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<text class="font_2 text_2 ml-7">15214547473</text>
|
||||
<text class="font_2 text_2 ml-7">{{ phoneNumber }}</text>
|
||||
</view>
|
||||
<view class="flex-row items-center self-stretch section_2 mt-9">
|
||||
<text class="font_3 text_3">邀请码:123445</text>
|
||||
<view class="flex-row items-center self-stretch section_2 mt-9" bindtap="copyInvitationCode">
|
||||
<text class="font_3 text_3">邀请码:{{ invitationCode }}</text>
|
||||
<image
|
||||
class="shrink-0 image_4"
|
||||
src="./images/fuzhi.png"
|
||||
|
@ -34,7 +34,7 @@
|
|||
<view class="flex-row justify-between items-center group_4">
|
||||
<view class="group_5">
|
||||
<text class="font_2 text_6">当前金额:</text>
|
||||
<text class="text_5">¥5.00</text>
|
||||
<text class="text_5">¥{{ currentBalance }}</text>
|
||||
</view>
|
||||
<view class="flex-row items-center section_3" bind:tap="lijitixian">
|
||||
<image
|
||||
|
@ -47,15 +47,15 @@
|
|||
<view class="flex-row items-start equal-division section_4">
|
||||
<view class="flex-col items-center equal-division-item_8">
|
||||
<text class="font_2 text_8">提现中</text>
|
||||
<text class="font_4 mt-15">¥0.00</text>
|
||||
<text class="font_4 mt-15">¥{{ withdrawalingBalance }}</text>
|
||||
</view>
|
||||
<view class="flex-col items-center group_6 equal-division-item">
|
||||
<text class="font_2 text_9">已提现</text>
|
||||
<text class="font_4 mt-15">¥0.00</text>
|
||||
<text class="font_4 mt-15">¥{{ withdrawaledAmount }}</text>
|
||||
</view>
|
||||
<view class="flex-col items-center group_7 equal-division-item_8">
|
||||
<text class="font_2 text_10">累计收入</text>
|
||||
<text class="font_4 mt-15">¥0.00</text>
|
||||
<text class="font_4 mt-15">¥{{ totalIncome }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -29,7 +29,8 @@ Page({
|
|||
phoneNumber: phone,
|
||||
verificationCode: verificationCode,
|
||||
userPassword: password,
|
||||
userConfirmPassword: currentPwd
|
||||
userConfirmPassword: currentPwd,
|
||||
sourceToken: wx.getStorageSync('token')
|
||||
},
|
||||
success: res => {
|
||||
console.log('修改密码--->',res);
|
||||
|
|
|
@ -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()
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -1,66 +1,92 @@
|
|||
import { baseUrl } from "../../../request";
|
||||
|
||||
// pages/personCenter/withdrawal/withdrawal.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
withdrawalAccount: '', // 这里保存提现账户信息
|
||||
},
|
||||
|
||||
// 获取当前账户信息
|
||||
getAccountInfo() {
|
||||
wx.request({
|
||||
url: baseUrl + '/userAccount/queryById', // 替换为你的后端接口
|
||||
method: 'POST',
|
||||
header: {
|
||||
Authorization: wx.getStorageSync('token'),
|
||||
},
|
||||
success: (res) => {
|
||||
console.log('当前账户是---->',res.data.data);
|
||||
if (res.data.code === 1) {
|
||||
this.setData({
|
||||
withdrawalAccount: res.data.data.bankCardNumber,
|
||||
});
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: '获取数据失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
wx.showToast({
|
||||
title: '请求失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.getAccountInfo()
|
||||
},
|
||||
|
||||
/**
|
||||
* 跳转到添加提现账户页面
|
||||
*/
|
||||
goToAddAccount() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/personCenter/bindBankCard/bindBankCard', // 自定义的添加提现账户页面
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
onReady() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
onShow() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
onHide() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
onUnload() {},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
onPullDownRefresh() {},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
onReachBottom() {},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
onShareAppMessage() {},
|
||||
});
|
|
@ -2,11 +2,15 @@
|
|||
<view class="flex-col self-stretch section">
|
||||
<text class="self-start font">提现账户</text>
|
||||
<view class="flex-row items-center self-stretch section_2 mt-11">
|
||||
<image
|
||||
class="image"
|
||||
src="./images/zh.png"
|
||||
/>
|
||||
<text class="font_2 text ml-10">622031207006363442</text>
|
||||
<!-- 判断是否有提现账户信息 -->
|
||||
<block wx:if="{{withdrawalAccount}}">
|
||||
<image class="image" src="./images/zh.png" />
|
||||
<text class="font_2 text ml-10">{{withdrawalAccount}}</text>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<!-- 没有提现账户时显示“去添加”按钮 -->
|
||||
<button class="add-btn" bindtap="goToAddAccount">去添加</button>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-col self-stretch section_3">
|
||||
|
|
|
@ -88,4 +88,12 @@
|
|||
.text_6 {
|
||||
color: #ffffff;
|
||||
line-height: 28.36rpx;
|
||||
}
|
||||
}
|
||||
.add-btn {
|
||||
background-color: #ff8d1a;
|
||||
color: #ffffff;
|
||||
font-size: 26.72rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
border: none;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { baseUrl } from "../../../request";
|
||||
|
||||
// pages/personCenter/withdrawalAccount/withdrawalAccount.js
|
||||
Page({
|
||||
|
||||
|
@ -5,18 +7,58 @@ Page({
|
|||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
cardHolder: '', // 姓名
|
||||
idCardNumber: '', // 身份证号
|
||||
phoneNumber: '', // 手机号
|
||||
bankCardNumber: '', // 银行卡号
|
||||
openBank: '' // 开户银行
|
||||
},
|
||||
|
||||
// 获取当前账户信息
|
||||
getAccountInfo() {
|
||||
wx.request({
|
||||
url: baseUrl + '/userAccount/queryById', // 替换为你的后端接口
|
||||
method: 'POST',
|
||||
header: {
|
||||
Authorization: wx.getStorageSync('token'),
|
||||
},
|
||||
success: (res) => {
|
||||
console.log('当前账户是---->',res.data);
|
||||
if (res.data.code === 1) {
|
||||
this.setData({
|
||||
cardHolder: res.data.data.cardHolder,
|
||||
idCardNumber: res.data.data.idCardNumber,
|
||||
phoneNumber: res.data.data.phoneNumber,
|
||||
bankCardNumber: res.data.data.bankCardNumber,
|
||||
openBank: res.data.data.openBank
|
||||
});
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: '获取数据失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
wx.showToast({
|
||||
title: '请求失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
gotoEditBankCardInfo() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/personCenter/bindBankCard/bindBankCard',
|
||||
url: `/pages/personCenter/bindBankCard/bindBankCard?isUpdate=${true}`,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
this.getAccountInfo()
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,28 +6,28 @@
|
|||
<view class="flex-col self-stretch group">
|
||||
<view class="flex-row justify-between group_2">
|
||||
<text class="font text">姓名</text>
|
||||
<text class="font text_2">陈新知</text>
|
||||
<text class="font text_2">{{cardHolder}}</text> <!-- 绑定姓名 -->
|
||||
</view>
|
||||
<view class="flex-row justify-between items-center group_2 mt-27">
|
||||
<text class="font text_3">手机号</text>
|
||||
<text class="font_2 text_4">15888610253</text>
|
||||
<text class="font_2 text_4">{{phoneNumber}}</text> <!-- 绑定手机号 -->
|
||||
</view>
|
||||
<view class="flex-col mt-27">
|
||||
<view class="flex-row justify-between items-center group_3">
|
||||
<text class="font">身份证号</text>
|
||||
<text class="font_2">33100420******50910</text>
|
||||
<text class="font_2">{{idCardNumber}}</text> <!-- 绑定身份证号 -->
|
||||
</view>
|
||||
<view class="flex-row justify-between items-center group_4">
|
||||
<text class="font">开户银行</text>
|
||||
<text class="font_2 text_5">浙江省台州市中国工商银行台州蓬街支行</text>
|
||||
<text class="font_2 text_5">{{openBank}}</text> <!-- 绑定开户银行 -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row justify-between mt-27">
|
||||
<text class="font text_6">银行卡号</text>
|
||||
<text class="font_2">62220********363442</text>
|
||||
<text class="font_2">{{bankCardNumber}}</text> <!-- 绑定银行卡号 -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-col justify-start items-center self-center text-wrapper" bind:tap="gotoEditBankCardInfo">
|
||||
<text class="font text_7">修改账户</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -14,8 +14,11 @@ Page({
|
|||
},
|
||||
|
||||
onLoad(options) {
|
||||
// console.log('---->',options);
|
||||
const id = options.id;
|
||||
this.setData({ id });
|
||||
const isPromo = options.isPromo;
|
||||
console.log(isPromo)
|
||||
this.setData({ id ,activeTab: Number(isPromo) });
|
||||
},
|
||||
|
||||
// 每次页面展示都刷新(含navigateBack返回时)
|
||||
|
|
|
@ -59,7 +59,7 @@ Page({
|
|||
const projectId = e.currentTarget.dataset.id;
|
||||
// 带上 id 跳转到详情页(路径按你的项目结构调整)
|
||||
wx.navigateTo({
|
||||
url: `/pages/projectModule/projectDetail/projectDetail?id=${projectId}`
|
||||
url: `/pages/projectModule/projectDetail/projectDetail?id=${projectId}&isPromo=0`
|
||||
});
|
||||
},
|
||||
});
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
/* 结算周期背景 */
|
||||
.text-wrapper {
|
||||
padding: 7.5rpx 0;
|
||||
padding: 10.5rpx 0;
|
||||
background-color: #ffebeb;
|
||||
border-radius: 9.38rpx;
|
||||
width: 112.5rpx;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { baseUrl } from "../../../request";
|
||||
|
||||
// pages/projectModule/settlement/settlement.js
|
||||
Page({
|
||||
|
||||
|
@ -5,14 +7,61 @@ Page({
|
|||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
items: [null, null],
|
||||
pid: 0, // 项目id
|
||||
projectSettlementList: [], // 项目结算列表
|
||||
},
|
||||
|
||||
// 获取项目明细列表
|
||||
getProjectSettlementList() {
|
||||
const pid = this.data.pid
|
||||
wx.request({
|
||||
url: baseUrl + '/projectSettlement/query/all/settle',
|
||||
method: 'POST',
|
||||
header: {
|
||||
Authorization: wx.getStorageSync('token')
|
||||
},
|
||||
data: {
|
||||
id: pid
|
||||
},
|
||||
success: res =>{
|
||||
console.log('---->',res.data);
|
||||
if (res.data.code === 1) {
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.setData({ pid: options.id })
|
||||
console.log('项目id--->',options.id);
|
||||
this.getProjectSettlementList()
|
||||
// 模拟后端响应数据
|
||||
const response = {
|
||||
code: 0,
|
||||
data: [
|
||||
{
|
||||
id: 1,
|
||||
projectDetailName: "新用户完成首单",
|
||||
settlementQuantity: 2,
|
||||
settlementRevenue: 2.34,
|
||||
workTime: "2025-05-20", // 示例作业时间
|
||||
settlementTime: "2025-05-22", // 示例结算时间
|
||||
revenueSource: false
|
||||
}
|
||||
],
|
||||
message: ""
|
||||
};
|
||||
|
||||
if (response.code === 0) {
|
||||
// 将后端返回的数据赋值给 projectSettlementList
|
||||
this.setData({
|
||||
projectSettlementList: response.data
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -63,4 +112,4 @@ Page({
|
|||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
});
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<view class="flex-col page">
|
||||
<view class="flex-col justify-start items-start text-wrapper"><text class="text">项目:饿了么-超吃卡</text></view>
|
||||
<view class="flex-col mt-11">
|
||||
<view class="flex-col list-item mt-20" wx:for="{{items}}" wx:for-item="item" wx:for-index="index" wx:key="index">
|
||||
<view class="flex-col list-item mt-20" wx:for="{{ projectSettlementList }}" wx:for-item="item" wx:for-index="index" wx:key="index">
|
||||
<view class="flex-row items-center group">
|
||||
<view class="flex-row items-center flex-1">
|
||||
<image
|
||||
class="shrink-0 image"
|
||||
src="https://ide.code.fun/api/image?token=68368d354ae84d001230f4d1&name=1ca23eeec01596125d5539fcda13702d.png"
|
||||
/>
|
||||
<text class="font text_2 ml-14">美团神券包-春季活动</text>
|
||||
<text class="font text_2 ml-14">{{ projectSettlementList.projectDetailName}}</text>
|
||||
</view>
|
||||
<text class="font text_3 ml-21">业务员:陈新知</text>
|
||||
</view>
|
||||
|
@ -20,22 +20,22 @@
|
|||
</view>
|
||||
<view class="flex-col justify-start group_2 mt-10">
|
||||
<view class="flex-row justify-center items-center relative section_2">
|
||||
<text class="font_3 text_6 pos">3.6元购买券</text>
|
||||
<text class="font_4">10</text>
|
||||
<text class="font_5 pos_2">¥3.00</text>
|
||||
<text class="font_3 text_6 pos">{{ projectSettlementList.settlementQuantity }}元购买券</text>
|
||||
<text class="font_4">{{ projectSettlementList.settlementQuantity }}</text>
|
||||
<text class="font_5 pos_2">¥{{ projectSettlementList.settlementRevenue.toFixed(2) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row group_1">
|
||||
<view class="group_3">
|
||||
<text class="font_6 text_7">作业时间:</text>
|
||||
<text class="font_5">2025-05-20</text>
|
||||
<text class="font_5">{{ projectSettlementList.workTime || '暂无' }}</text>
|
||||
</view>
|
||||
<view class="group_4 ml-47">
|
||||
<text class="font_6">结算时间:</text>
|
||||
<text class="font_5">2025-05-22</text>
|
||||
<text class="font_5">{{ projectSettlementList.settlementTime || '暂无' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { baseUrl } from "../../../request"
|
||||
|
||||
// pages/projectModule/userProject/userProject.js
|
||||
Page({
|
||||
|
||||
|
@ -6,20 +8,60 @@ Page({
|
|||
*/
|
||||
|
||||
data: {
|
||||
items: [null, null, null],
|
||||
userProjectList: [],
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
this.getProgram();
|
||||
},
|
||||
tiaozhuan(){
|
||||
|
||||
// 结算记录
|
||||
gotoSubSettlement(e) {
|
||||
|
||||
const projectId = e.currentTarget.dataset.id;
|
||||
|
||||
wx.navigateTo({
|
||||
url: '/pages/projectModule/projectDetail/projectDetail',
|
||||
url: `/pages/projectModule/settlement/settlement?id=${projectId}`,
|
||||
})
|
||||
},
|
||||
|
||||
// 获取项目列表
|
||||
getProgram() {
|
||||
wx.request({
|
||||
url: baseUrl + '/project/get/running',
|
||||
method: 'POST',
|
||||
header: {
|
||||
Authorization: wx.getStorageSync('token')
|
||||
},
|
||||
success: res => {
|
||||
// console.log(res.data);
|
||||
if(res.data.code === 1) {
|
||||
this.setData({
|
||||
userProjectList: res.data.data
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转项目明细
|
||||
gotoProjectDetail(e){
|
||||
// 获取data-id中的值
|
||||
const projectId = e.currentTarget.dataset.id;
|
||||
wx.navigateTo({
|
||||
url: `/pages/projectModule/projectDetail/projectDetail?id=${projectId}&isPromo=0`,
|
||||
})
|
||||
},
|
||||
// 子元素点击事件,阻止冒泡
|
||||
stopEventPropagation(e) {
|
||||
const projectId = e.currentTarget.dataset.id;
|
||||
wx.navigateTo({
|
||||
url: `/pages/projectModule/projectDetail/projectDetail?id=${projectId}&isPromo=1`,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<view class="flex-col justify-start page">
|
||||
<view class="flex-col list">
|
||||
<view class="flex-col list-item mt-15" wx:for="{{ userProjectList }}" wx:for-item="item" wx:for-index="index" wx:key="index" >
|
||||
<view class="flex-col list-item mt-15" wx:for="{{ userProjectList }}" wx:for-item="item" wx:for-index="index" wx:key="index" bind:tap="gotoProjectDetail" data-id="{{ item.projectId }}">
|
||||
<view class="flex-row justify-between items-center self-stretch">
|
||||
<view class="flex-row items-center">
|
||||
<image
|
||||
|
@ -15,19 +15,17 @@
|
|||
<image
|
||||
class="image_2"
|
||||
src="./images/yjt.png"
|
||||
bind:tap="gotoProjectDetail"
|
||||
data-id="{{ item.projectId }}"
|
||||
/>
|
||||
</view>
|
||||
<view class="mt-14 flex-row group_2 equal-division">
|
||||
<view class="flex-row justify-center items-center section equal-division-item">
|
||||
<view class="flex-row justify-center items-center section equal-division-item" data-id="{{ item.projectId }}"catch:tap="stopEventPropagation">
|
||||
<image
|
||||
class="image_3"
|
||||
src="./images/tgm.png"
|
||||
/>
|
||||
<text class="ml-4 font_3">推广码</text>
|
||||
</view>
|
||||
<view class="ml-14 flex-row items-center section equal-division-item_2" bind:tap="gotoSubSettlement">
|
||||
<view class="ml-14 flex-row items-center section equal-division-item_2" bind:tap="gotoSubSettlement" data-id="{{ item.projectId }}">
|
||||
<image
|
||||
class="shrink-0 image_4"
|
||||
src="./images/jsmx.png"
|
||||
|
|
Loading…
Reference in New Issue
Block a user