commission--yt-commit

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

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>