Merge branch 'feature-xxx' into dev

This commit is contained in:
2025-06-16 16:17:23 +08:00
50 changed files with 882 additions and 456 deletions

View File

@ -28,12 +28,14 @@ Page({
success: res => {
if (res.data.code === 1) {
wx.showToast({
title: '退出登录',
title: '退出成功',
icon: 'success'
})
wx.reLaunch({
url: '/pages/loginModule/pwdLogin/pwdLogin',
})
setTimeout(() => {
wx.reLaunch({
url: '/pages/loginModule/pwdLogin/pwdLogin',
})
}, 1000); // 1000ms = 1秒
} else {
wx.showToast({
title: res.data.message,
@ -75,53 +77,17 @@ Page({
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
gotoAgreement() {
wx.navigateTo({
url: '/pages/loginModule/agreement/agreement',
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
gotoPolicy() {
wx.navigateTo({
url: '/pages/loginModule/privacyPolicy/privacyPolicy',
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -28,7 +28,7 @@
/>
</view>
<view class="section_3"></view>
<view class="flex-row justify-between items-center group_5">
<view class="flex-row justify-between items-center group_5" bind:tap="gotoAgreement">
<text class="font">用户协议</text>
<image
class="image_2"
@ -36,7 +36,7 @@
/>
</view>
<view class="section_3"></view>
<view class="flex-row justify-between items-center group_6">
<view class="flex-row justify-between items-center group_6" bind:tap="gotoPolicy">
<text class="font text_6">隐私政策</text>
<image
class="image_2"

View File

@ -8,7 +8,7 @@ Page({
*/
data: {
withdrawalList: [],
withdrawalStatus: ['审核', '提现成功', '提现失败']
withdrawalStatus: ['审核', '提现成功', '提现失败']
},
getWithdrawalList() {

View File

@ -2,14 +2,12 @@
margin-top: 28.85rpx;
}
.page {
padding: 88.46rpx 0 87.85rpx;
background-image: linear-gradient(180deg, #ffa74f -29.4%, #ffffff1a 115.7%);
background-color: #ffffff;
width: 100%;
overflow: hidden;
height: 100%;
}
.section {
padding: 88.46rpx 0 878.85rpx;
background-image: linear-gradient(180deg, #ffa74f -29.4%, #ffffff1a 115.7%);
overflow: auto;
}
.section_2 {
margin-left: 50rpx;

View File

@ -42,14 +42,15 @@ Page({
success(res) {
// console.log('后端返回---->',res.data);
// 成功的回调
wx.showToast({
title: '更新成功',
icon: 'success',
});
// 这里可以跳转到其他页面
wx.navigateTo({
url: '/pages/personCenter/withdrawalAccount/withdrawalAccount',
});
if (res.data.code === 1) {
wx.showToast({
title: '更新成功',
icon: 'success',
});
setTimeout(() => {
wx.navigateBack({});
}, 1000)
}
},
fail(err) {
// 失败的回调

View File

@ -80,8 +80,8 @@
</view>
<!-- 保存按钮 -->
<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 wx:if="{{ isUpdate }}" class="flex-col justify-start items-center self-center text-wrapper_3" bindtap="updateInfo">
<text class="font_2 text_8">更新</text>
</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 File

@ -11,7 +11,7 @@
.font_2 {
font-size: 30.53rpx;
font-family: SourceHanSansCN;
line-height: 28.09rpx;
line-height: 30.53rpx;
color: #000000;
}
.text_2 {
@ -37,6 +37,7 @@
border-radius: 10rpx;
}
.text_3 {
width: 90%;
margin-left: 27.52rpx;
}
.font {
@ -60,13 +61,14 @@
border-radius: 10rpx;
}
.text_12 {
width: 90%;
margin-left: 25.8rpx;
}
.group_4 {
line-height: 28.09rpx;
}
.text_1 {
width: 400rpx;
width: 90%;
margin-left: 27.82rpx;
}
.group_5 {
@ -76,6 +78,7 @@
line-height: 28.21rpx;
}
.text_5 {
width: 90%;
margin-left: 26.74rpx;
}
.font_4 {
@ -92,10 +95,10 @@
}
.text-wrapper_3 {
margin-top: 57.25rpx;
padding: 25.84rpx 0 20.5rpx;
padding: 26.25rpx 0;
background-color: #ff8d1a;
border-radius: 19.08rpx;
width: 248.09rpx;
width: 243.75rpx;
}
.text_8 {
color: #ffffff;

View File

@ -6,7 +6,7 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
onLoad() {
this.getProjectList()
this.getFixedRate()
},
@ -126,53 +126,27 @@ Page({
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.onRefresh();
},
onRefresh:function(){
//导航条加载动画
wx.showNavigationBarLoading()
//loading 提示框
wx.showLoading({
title: '加载中...',
})
console.log("下拉刷新啦");
this.onLoad()
setTimeout(function () {
wx.hideLoading();
wx.hideNavigationBarLoading();
//停止下拉刷新
wx.stopPullDownRefresh();
}, 1000)
},
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -2,5 +2,6 @@
"usingComponents": {
"commissionPop": "/pages/personCenter/component/commissionPop/commissionPop",
"commissionRatePop": "/pages/personCenter/component/commissionRatePop/commissionRatePop"
}
},
"enablePullDownRefresh": true
}

View File

@ -32,9 +32,9 @@ import { baseUrl } from "../../../../request";Component({
// 提交设置
submit() {
const rate = parseFloat(this.data.commissionRate);
if (isNaN(rate) || rate <= 0 || rate > 5) {
if (isNaN(rate) || rate < 0 || rate > 10) {
wx.showToast({
title: `请输入有效的比例,最大为 5%`,
title: `请输入有效的比例,最大为 10%`,
icon: 'none',
});
return;

View File

@ -1,66 +1,55 @@
// pages/personCenter/contactSuper/contactSuper.js
Page({
const { baseUrl } = require("../../../request");
Page({
/**
* 页面的初始数据
*/
data: {
nickName: '', // 后端返回的昵称
phoneNumber: '' // 后端返回的手机号
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.fetchSupervisorInfo();
},
/**
* 生命周期函数--监听页面初次渲染完成
/**
* 请求后端接口,获取上级联系人信息
*/
onReady() {
fetchSupervisorInfo() {
const token = wx.getStorageSync('token');
wx.request({
url: baseUrl + '/userInfo/getSuper',
method: 'POST',
header: {
Authorization: token
},
success: (res) => {
if (res.data.code === 1) {
const { nickName, phoneNumber } = res.data.data;
this.setData({ nickName, phoneNumber });
} else {
wx.showToast({
title: res.data.message || '获取信息失败',
icon: 'none'
});
}
},
fail: (err) => {
console.error('fetchSupervisorInfo error:', err);
wx.showToast({
title: '请求失败,请稍后重试',
icon: 'none'
});
}
});
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
gotoCall() {
wx.makePhoneCall({
phoneNumber: this.data.phoneNumber
})
}
})

View File

@ -1,9 +1,11 @@
<view class="flex-col justify-start page">
<view class="flex-row justify-between section">
<view class="flex-col self-center">
<text class="self-start text">CHENXINZHI</text>
<view class="flex-row items-center self-stretch mt-53">
<text class="text_2">联系电话 15123967648</text>
<!-- 绑定昵称 -->
<text class="self-start text">{{nickName}}</text>
<view class="flex-row items-center self-stretch mt-53" bind:tap="gotoCall">
<!-- 绑定手机号 -->
<text class="text_2">联系电话 {{phoneNumber}}</text>
<image
class="shrink-0 image_2 ml-6"
src="./images/sjh.png"
@ -15,4 +17,4 @@
src="./images/logo.png"
/>
</view>
</view>
</view>

View File

@ -42,7 +42,10 @@
<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">{{item.projectName}}</text> <!-- 项目名称 -->
<text class="shrink-0 self-start font_5 text_9 ml-21">{{item.changeAmount}}</text> <!-- 变动金额 -->
<!-- 判断变动金额的符号和字体颜色 -->
<text class="shrink-0 self-start font_5 text_9 ml-21" style="color: {{item.changeAmount >= 0 ? '#FE2828' : '#10D466'}}">{{item.changeAmount >= 0 ? '+' : ''}}{{item.changeAmount}}
</text>
</view>
<view class="mt-12 flex-row justify-between items-center">
<text class="font_6 text_10">{{item.createTime}}</text> <!-- 创建时间 -->

View File

@ -11,14 +11,14 @@
margin-left: 40.38rpx;
}
.page {
padding: 69.23rpx 38.46rpx 517.31rpx;
padding: 69.23rpx 38.46rpx 69.31rpx;
background-image: linear-gradient(180deg, #ffc387 0%, #ffffff00 120.3%);
width: 100%;
overflow: hidden;
height: 100%;
overflow: auto;
}
.section {
margin-left: 11.54rpx;
margin-left: 3.85rpx;
margin-right: 3.85rpx;
background-color: #ffbb78;
border-radius: 14.15rpx;
@ -38,7 +38,6 @@
line-height: 35.04rpx;
}
.text-wrapper {
padding: 11.54rpx 0;
background-color: #ffffff;
border-radius: 28.85rpx;
width: 130.77rpx;
@ -78,7 +77,7 @@
}
.text_3 {
color: #ff8d1a;
line-height: 24.88rpx;
line-height: 48.08rpx;
}
.text {
line-height: 25.15rpx;

View File

@ -85,58 +85,62 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
getUserMainInfo() {
const token = wx.getStorageSync('token');
// 获取用户主要信息
wx.request({
url: baseUrl + '/userInfo/get/main/jwt',
method: 'GET',
header: {
Authorization: token
},
success: res => {
if (res.data.code === 1) {
let result = res.data.data
this.setData({
currentBalance: result.currentBalance, // 当前余额
withdrawalingBalance: result.withdrawalAmount, // 提现中的余额
withdrawaledAmount: result.withdrawnAmount, // 已提现的余额
totalIncome: result.totalIncome, // 累计收入
qrcode: globalImgUrl + result.inviteQrCode
})
} else {
wx.showToast({
title: '获取个人信息失败',
icon: 'none'
})
}
},
fail: () => {
wx.showToast({ title: '网络错误,请重试', icon: 'none' });
}
})
// 获取用户信息
wx.request({
url: baseUrl + '/userInfo/get/jwt',
method: 'GET',
header: {
Authorization: token
},
success: res => {
if (res.data.code === 1) {
this.setData({
nickName: res.data.data.nickName,
// TODO 头像未连接
userAvatar: res.data.data.userAvatar,
phoneNumber: res.data.data.phoneNumber,
userAccount: res.data.data.userAccount,
invitationCode: res.data.data.invitationCode
})
}
}
})
},
onLoad(options) {
const token = wx.getStorageSync('token');
// 获取用户主要信息
wx.request({
url: baseUrl + '/userInfo/get/main/jwt',
method: 'GET',
header: {
Authorization: token
},
success: res => {
if (res.data.code === 1) {
let result = res.data.data
this.setData({
currentBalance: result.currentBalance, // 当前余额
withdrawalingBalance: result.withdrawalAmount, // 提现中的余额
withdrawaledAmount: result.withdrawnAmount, // 已提现的余额
totalIncome: result.totalIncome, // 累计收入
qrcode: globalImgUrl + result.inviteQrCode
})
} else {
wx.showToast({
title: '获取个人信息失败',
icon: 'none'
})
}
},
fail: () => {
wx.showToast({ title: '网络错误,请重试', icon: 'none' });
}
})
// 获取用户信息
wx.request({
url: baseUrl + '/userInfo/get/jwt',
method: 'GET',
header: {
Authorization: token
},
success: res => {
if (res.data.code === 1) {
this.setData({
nickName: res.data.data.nickName,
// TODO 头像未连接
userAvatar: res.data.data.userAvatar,
phoneNumber: res.data.data.phoneNumber,
userAccount: res.data.data.userAccount,
invitationCode: res.data.data.invitationCode
})
}
}
})
this.getUserMainInfo()
},
// 复制邀请码到剪贴板
@ -171,41 +175,12 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
this.getUserMainInfo()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
gotoCall() {
wx.makePhoneCall({
phoneNumber: this.data.phoneNumber
})
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -3,7 +3,7 @@
<view class="flex-row justify-between items-center group">
<view class="flex-col">
<text class="self-start font text">{{ nickName }}</text>
<view class="flex-row items-center self-stretch group_2 mt-9">
<view class="flex-row items-center self-stretch group_2 mt-9" bind:tap="gotoCall">
<image
class="image_3"
src="./images/dianhua.png"

View File

@ -14,7 +14,7 @@
margin-left: 9.38rpx;
}
.page {
padding: 65.63rpx 28.13rpx 331.88rpx 30rpx;
padding: 65.63rpx 28.13rpx 331.88rpx;
background-image: linear-gradient(180deg, #ff8d1a -7.3%, #ffffff00 92.1%);
width: 100%;
overflow: hidden;

View File

@ -39,9 +39,12 @@ Page({
title: '更改密码成功',
icon: 'success'
})
wx.reLaunch({
url: '/pages/loginModule/pwdLogin/pwdLogin',
})
setTimeout(() => {
wx.reLaunch({
url: '/pages/loginModule/pwdLogin/pwdLogin',
})
}, 1000); // 1000ms = 1秒
} else {
wx.showModal({
title: '提示',

View File

@ -34,7 +34,7 @@
font-size: 30.53rpx;
font-family: SourceHanSansCN;
line-height: 28.34rpx;
color: #8c8c8c;
color: #323232;
}
.text_3 {
color: #ff8d1a;
@ -45,7 +45,6 @@
}
.text {
margin-left: 2.69rpx;
color: #000000;
line-height: 23.17rpx;
}
.text_4 {

View File

@ -18,8 +18,29 @@ Page({
nowAgentUnitPrice: 0, // 现在的‘代理单价’,用于传给弹窗
nowProjectDetailName: '', // 现在的‘项目详细名称’,用于传给弹窗
isSub: true, // 用于区分是项目抽佣页面还是单个用户抽佣页面
searchText: '',
tempSubCommissionList: []
},
// 输入框内容变化时更新数据
onInput(e) {
this.setData({
searchText: e.detail.value, // 获取用户输入的关键字
});
},
onSearch() {
let searchValue = this.data.searchText; // 获取输入框的值
let subCommissionList = this.data.subCommissionList
// 筛选出 salespersonName 包含 searchText 的项
let filtered = subCommissionList.filter(item =>
item.subUserNickName.includes(searchValue)
);
this.setData({
tempSubCommissionList: filtered
})
},
// 点击“设价”按钮,显示弹窗
showCommissionRatePop(e) {
console.log('弹窗传值----->',e);
@ -59,7 +80,8 @@ Page({
console.log('下级抽佣列表----->',res.data.data);
if (res.data.code === 1) {
this.setData({
subCommissionList: res.data.data
subCommissionList: res.data.data,
tempSubCommissionList: res.data.data
})
}
}
@ -77,52 +99,25 @@ Page({
this.getSubCommissionList()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.onRefresh();
},
onRefresh:function(){
//导航条加载动画
wx.showNavigationBarLoading()
//loading 提示框
wx.showLoading({
title: '加载中...',
})
this.getSubCommissionList()
setTimeout(function () {
wx.hideLoading();
wx.hideNavigationBarLoading();
//停止下拉刷新
wx.stopPullDownRefresh();
}, 1000)
},
})

View File

@ -1,5 +1,6 @@
{
"usingComponents": {
"commissionRatePop": "/pages/personCenter/component/commissionRatePop/commissionRatePop"
}
},
"enablePullDownRefresh": true
}

View File

@ -7,11 +7,11 @@
class="image"
src="./images/ss.png"
/>
<input class="font text_2 ml-7" placeholder="请输入关键字" />
<input class="font text_2 ml-7" placeholder="请输入关键字" bindinput="onInput" confirm-type="search" bindconfirm="onSearch" value="{{searchText}}"/>
</view>
</view>
<view class="flex-col mt-16">
<view class="flex-col list-item_1 mt-23" wx:for="{{ subCommissionList }}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="flex-col list-item_1 mt-23" wx:for="{{ tempSubCommissionList }}" 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">

View File

@ -41,7 +41,7 @@
height: 35.63rpx;
}
.text_2 {
color: #999999;
color: #323232;
line-height: 27.96rpx;
}
.list-item_1 {

View File

@ -8,10 +8,12 @@ Page({
*/
data: {
directAgentSize: 0, // 直接代理人数
teamSize: null, // 团队人数
teamEarnings: null, // 团队收益
teamSize: '', // 团队人数
teamEarnings: '', // 团队收益
invitationCode: "", // 邀请码
userMemberInfoVOList: [] // 成员列表
userMemberInfoVOList: [], // 成员列表
searchText: '',
tempUserMemberInfoVOList: [],
},
// 获取团队成员信息
@ -23,19 +25,39 @@ Page({
Authorization: wx.getStorageSync('token')
},
success: res => {
console.log('团队成员信息---->',res.data.data);
// console.log('团队成员信息---->',res.data.data);
let result = res.data.data
this.setData({
directAgentSize: result.directAgentSize,
teamSize: result.teamSize,
teamEarnings: result.teamEarnings,
invitationCode: result.invitationCode,
userMemberInfoVOList: result.userMemberInfoVOList
userMemberInfoVOList: result.userMemberInfoVOList,
tempUserMemberInfoVOList: result.userMemberInfoVOList
})
}
})
},
// 输入框内容变化时更新数据
onInput(e) {
this.setData({
searchText: e.detail.value, // 获取用户输入的关键字
});
},
onSearch() {
let searchValue = this.data.searchText; // 获取输入框的值
let userMemberList = this.data.userMemberInfoVOList
// 筛选出 salespersonName 包含 searchText 的项
let filtered = userMemberList.filter(item =>
item.nickName.includes(searchValue)
);
this.setData({
tempUserMemberInfoVOList: filtered
})
},
// 复制邀请码到剪贴板
copyInvitationCode() {
wx.setClipboardData({

View File

@ -44,13 +44,13 @@
class="image_4"
src="./images/ss.png"
/>
<input class="font text_8 ml-4" placeholder="请输入关键字"/>
<input class="font text_8 ml-4" placeholder="请输入关键字" bindinput="onInput" confirm-type="search" bindconfirm="onSearch" value="{{searchText}}"/>
</view>
</view>
<view class="flex-col list mt-13">
<view
class="flex-row items-center relative group_6"
wx:for="{{userMemberInfoVOList}}"
wx:for="{{tempUserMemberInfoVOList}}"
wx:for-item="item"
wx:for-index="index"
wx:key="index"

View File

@ -14,9 +14,8 @@
padding: 39.38rpx 28.13rpx 117.32rpx 30rpx;
background-image: linear-gradient(0deg, #ffffff 66.3%, #ff8d1a 100%);
width: 100%;
overflow-y: auto;
overflow-x: hidden;
height: 100%;
overflow: auto;
}
.section {
padding: 30.97rpx 0 18.75rpx;

View File

@ -6,22 +6,26 @@ Page({
* 页面的初始数据
*/
data: {
withdrawalAccount: '', // 这里保存提现账户信息
currentBalance: 0, // 当前可提现余额
withdrawalAccount: '', // 提现账户信息
withdrawnAmount: '', // 用户输入的提现金额
},
// 获取当前账户信息
getAccountInfo() {
wx.request({
url: baseUrl + '/userAccount/queryById', // 替换为你的后端接口
url: baseUrl + '/withdrawalApply/query/condition', // 替换为你的后端接口
method: 'POST',
header: {
Authorization: wx.getStorageSync('token'),
},
success: (res) => {
console.log('当前账户是---->',res.data.data);
console.log('当前账户是---->', res.data.data);
if (res.data.code === 1) {
let result = res.data.data;
this.setData({
withdrawalAccount: res.data.data.bankCardNumber,
currentBalance: result.currentBalance.toFixed(2),
withdrawalAccount: result.bankCardNumber
});
} else {
wx.showToast({
@ -39,11 +43,95 @@ Page({
});
},
// 输入框内容变化时更新数据
onInput(e) {
this.setData({
withdrawnAmount: e.detail.value, // 获取用户输入的金额
});
},
// 点击“全部提现”,填充当前可提现余额到输入框
onWithdrawAll() {
this.setData({
withdrawnAmount: this.data.currentBalance, // 将当前余额填入提现金额输入框
});
},
// 点击“立即提现”,发送请求
onSubmitWithdraw() {
const { withdrawnAmount, currentBalance } = this.data;
// 校验提现金额是否大于当前可提现余额
if (!withdrawnAmount) {
wx.showToast({
title: '请输入提现金额',
icon: 'none'
});
return;
}
// 校验提现金额是否大于当前可提现余额
if (parseFloat(withdrawnAmount) > parseFloat(currentBalance)) {
wx.showToast({
title: '提现金额不可大于余额',
icon: 'none'
});
return;
}
// 校验提现金额是否小于1元
if (parseFloat(withdrawnAmount) < 1) {
wx.showToast({
title: '最低提现金额为1元',
icon: 'none'
});
return;
}
// 发送提现请求
wx.request({
url: baseUrl + '/withdrawalApply/add', // 后端提现请求路径
method: 'POST',
header: {
Authorization: wx.getStorageSync('token'), // 请求头中加入token
},
data: {
withdrawnAmount: withdrawnAmount // 请求体携带提现金额
},
success: (res) => {
if (res.data.code === 1) {
wx.showToast({
title: '提现成功,等待后台审核',
icon: 'none',
duration: 1000,
});
// 1秒后跳转到账单详情页面
setTimeout(() => {
wx.redirectTo({
url: '/pages/personCenter/billingDetails/billingDetails',
});
}, 1000); // 延时1秒跳转
} else {
wx.showToast({
title: res.data.message,
icon: 'none'
});
}
},
fail: () => {
wx.showToast({
title: '请求失败,请稍后再试',
icon: 'none'
});
}
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getAccountInfo()
this.getAccountInfo(); // 加载页面时获取账户信息
},
/**
@ -89,4 +177,4 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage() {},
});
});

View File

@ -22,14 +22,14 @@
class="shrink-0 image_2"
src="./images/money.png"
/>
<input class="font_2 text_3 ml-13" placeholder="请输入金额" />
<input class="font_2 text_3 ml-13" placeholder="请输入提现金额" bindinput="onInput" type="digit" value="{{withdrawnAmount}}"/>
</view>
<text class="text_4">全部提现</text>
<text class="text_4" bindtap="onWithdrawAll">全部提现</text>
</view>
<text class="self-start font_2 text_5 mt-19">可提现:13.93元</text>
<text class="self-start font_2 text_5 mt-19">可提现:{{ currentBalance }}元</text>
</view>
</view>
<view class="flex-col justify-start items-center self-center text-wrapper">
<view bindtap="onSubmitWithdraw" class="flex-col justify-start items-center self-center text-wrapper">
<text class="font text_6">立即提现</text>
</view>
</view>
</view>

View File

@ -41,10 +41,11 @@
font-size: 26.72rpx;
font-family: SourceHanSansCN;
line-height: 21.39rpx;
color: #000000;
color: #323232;
}
.text {
line-height: 20.29rpx;
font-size: 32.25rpx;
line-height: 32.25rpx;
}
.section_3 {
margin-top: 40.08rpx;
@ -65,18 +66,19 @@
height: 41.98rpx;
}
.text_3 {
color: #b0b0b0;
line-height: 24.92rpx;
color: #323232;
line-height: 35.25rpx;
font-size: 35.25rpx;
}
.text_4 {
color: #ff8d1a;
font-size: 22.9rpx;
font-size: 30.25rpx;
font-family: SourceHanSansCN;
line-height: 21.39rpx;
line-height: 30.25rpx;
}
.text_5 {
font-size: 24.81rpx;
line-height: 22.88rpx;
font-size: 30.25rpx;
line-height: 30.25rpx;
}
.text-wrapper {
margin-top: 64.89rpx;