commission--yt-commit

This commit is contained in:
2025-06-03 21:29:15 +08:00
parent eaf4b6c5e5
commit 361f6a89d3
16 changed files with 538 additions and 104 deletions

View File

@ -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()
},
/**

View File

@ -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>