修复功能(用户申请提现)

This commit is contained in:
2025-06-11 11:32:02 +08:00
parent ae9886635d
commit a51f9bdea8
5 changed files with 63 additions and 58 deletions

View File

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

View File

@ -4,7 +4,7 @@
.page { .page {
background-color: #ffffff; background-color: #ffffff;
width: 100%; width: 100%;
height: 100%; overflow-y: auto;
} }
.section { .section {
padding: 88.46rpx 0 87.85rpx; padding: 88.46rpx 0 87.85rpx;

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-col list-item mt-13" wx:for="{{fundsChangeVOList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class="flex-row"> <view class="flex-row">
<text class="flex-1 font_4">{{item.projectName}}</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> <!-- 变动金额 -->
<!-- 判断变动金额的符号和字体颜色 -->
<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>
<view class="mt-12 flex-row justify-between items-center"> <view class="mt-12 flex-row justify-between items-center">
<text class="font_6 text_10">{{item.createTime}}</text> <!-- 创建时间 --> <text class="font_6 text_10">{{item.createTime}}</text> <!-- 创建时间 -->

View File

@ -11,11 +11,9 @@
margin-left: 40.38rpx; margin-left: 40.38rpx;
} }
.page { .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%); background-image: linear-gradient(180deg, #ffc387 0%, #ffffff00 120.3%);
width: 100%; width: 100%;
overflow: hidden;
height: 100%;
} }
.section { .section {
margin-left: 11.54rpx; margin-left: 11.54rpx;

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) { onLoad(options) {
const token = wx.getStorageSync('token'); this.getUserMainInfo()
// 获取用户主要信息
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
})
}
}
})
}, },
// 复制邀请码到剪贴板 // 复制邀请码到剪贴板
@ -171,7 +175,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
this.getUserMainInfo()
}, },
/** /**