From cfca5e8e0edb565726ce6e3312c731e8591be5f3 Mon Sep 17 00:00:00 2001
From: lzx_win <2602107437@qq.com>
Date: Fri, 26 Sep 2025 18:26:33 +0800
Subject: [PATCH] =?UTF-8?q?feat(wallet):=20=E5=AE=8C=E5=96=84=E6=8F=90?=
=?UTF-8?q?=E7=8E=B0=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98=E5=8C=96=E6=94=AF?=
=?UTF-8?q?=E4=BB=98=E9=80=89=E9=A1=B9=E6=8E=92=E5=BA=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在提现组件中添加银行卡号和开户行输入字段
- 实现银行卡信息的本地存储功能
- 调整支付页面中微信支付和余额支付的显示顺序
- 修复支付页面中距离计算的显示问题
- 为记录页面添加跳转到钱包页面的功能
- 移除部分不再使用的充值相关代码
---
pages_subpack/pay/index.vue | 14 +++----
pages_subpack/payment/index.vue | 12 +++---
pages_subpack/record/index.vue | 14 +++++--
pages_subpack/release/component/master.vue | 4 +-
pages_subpack/wallet/component/withdrawal.vue | 53 +++++++++++++++++++++++++--
pages_subpack/wallet/index.vue | 7 ++--
6 files changed, 80 insertions(+), 24 deletions(-)
diff --git a/pages_subpack/pay/index.vue b/pages_subpack/pay/index.vue
index ef9a214..f631216 100644
--- a/pages_subpack/pay/index.vue
+++ b/pages_subpack/pay/index.vue
@@ -63,7 +63,7 @@
公里
- 从师傅出发地到用工目的地总全程为5公里,{{ distance }}公里x¥{{ farePerKm }}=¥{{ fare }}
+ 从师傅出发地到用工目的地总全程为{{ distance }}公里,{{ distance }}公里x¥{{ farePerKm }}=¥{{ fare }}
1.公交/地铁出行费用:每公里¥{{ trafficPrice.bus }}
@@ -75,6 +75,12 @@
+
+
+
+ 微信支付
+
+
@@ -82,12 +88,6 @@
(余额:¥{{ amount }})
-
-
-
- 微信支付
-
-
diff --git a/pages_subpack/payment/index.vue b/pages_subpack/payment/index.vue
index fa5a24b..a5347b4 100644
--- a/pages_subpack/payment/index.vue
+++ b/pages_subpack/payment/index.vue
@@ -40,6 +40,12 @@
v-model="payRadio"
iconPlacement="right">
+
+
+
+ 微信支付
+
+
@@ -47,12 +53,6 @@
(余额:¥{{myMoney}})
-
-
-
- 微信支付
-
-
diff --git a/pages_subpack/record/index.vue b/pages_subpack/record/index.vue
index 6c11a49..8e9b83e 100644
--- a/pages_subpack/record/index.vue
+++ b/pages_subpack/record/index.vue
@@ -9,7 +9,7 @@
¥{{money || 0}}
-
+
提现
@@ -20,9 +20,9 @@
¥{{moneyLog || 0}}
-
+
@@ -107,6 +107,8 @@
this.startDate = this.$dayjs().subtract(1, 'day').format('YYYY-MM-DD')
this.endTime = this.$dayjs().valueOf();
this.endDate = this.$dayjs().format('YYYY-MM-DD')
+ },
+ onShow() {
this.onPayLog();
this.onCountCashOut()
this.onQueryBalance()
@@ -117,6 +119,12 @@
that.onPayLog()
},
methods:{
+ // 跳转到钱包页面
+ goToWallet() {
+ uni.navigateTo({
+ url: '/pages_subpack/wallet/index'
+ })
+ },
onCountCashOut(){
let that = this
let params={}
diff --git a/pages_subpack/release/component/master.vue b/pages_subpack/release/component/master.vue
index 7d11617..74a1834 100644
--- a/pages_subpack/release/component/master.vue
+++ b/pages_subpack/release/component/master.vue
@@ -60,9 +60,9 @@
-->
-
+
+ placeholder="请选择期望工作">
diff --git a/pages_subpack/wallet/component/withdrawal.vue b/pages_subpack/wallet/component/withdrawal.vue
index 11af748..7f81af2 100644
--- a/pages_subpack/wallet/component/withdrawal.vue
+++ b/pages_subpack/wallet/component/withdrawal.vue
@@ -2,6 +2,10 @@
+
+
+
+
@@ -36,32 +40,75 @@
data(){
return{
realName:"",
+ bankCard:"",
+ bankName:"",
money:"",
sysList:[]
}
},
mounted() {
this.sysList = uni.getStorageSync('sysList')
+ this.loadBankInfo()
},
methods:{
+ // 加载银行卡信息
+ loadBankInfo() {
+ const bankInfo = uni.getStorageSync('bankInfo')
+ if (bankInfo) {
+ this.realName = bankInfo.realName || ''
+ this.bankCard = bankInfo.bankCard || ''
+ this.bankName = bankInfo.bankName || ''
+ }
+ },
+ // 保存银行卡信息
+ saveBankInfo() {
+ const bankInfo = {
+ realName: this.realName,
+ bankCard: this.bankCard,
+ bankName: this.bankName
+ }
+ uni.setStorageSync('bankInfo', bankInfo)
+ },
getValueByName(name) {
const item = this.sysList.find((item) => item.name == name);
return item ? item.value : "";
},
onWithdrawal(){
let that = this
- let params = {
- realName:that.realName,
- money:that.money
+
+ // 验证必填字段
+ if(!that.realName){
+ return that.$u.toast("请填写真实姓名!")
+ }
+ if(!that.bankCard){
+ return that.$u.toast("请填写银行卡号!")
+ }
+ if(!that.bankName){
+ return that.$u.toast("请填写开户行!")
}
if(!that.money){
return that.$u.toast("请填写金额!")
}
+
+ // 保存银行卡信息到本地
+ that.saveBankInfo()
+
+ let params = {
+ realName: that.realName,
+ bankCard: that.bankCard,
+ bankName: that.bankName,
+ money: that.money
+ }
+
withdrawal(params).then(response=>{
console.info("response",response)
that.money=""
that.$u.toast("申请成功!")
that.$emit("onParent")
+ //返回页面
+ uni.navigateBack({
+ delta: 1
+ })
}).catch(error=>{
})
diff --git a/pages_subpack/wallet/index.vue b/pages_subpack/wallet/index.vue
index 06cdf96..f9efa3e 100644
--- a/pages_subpack/wallet/index.vue
+++ b/pages_subpack/wallet/index.vue
@@ -47,9 +47,10 @@
nav: [
{
name: '提现',
- }, {
- name: '充值',
- }
+ },
+ // {
+ // name: '充值',
+ // }
],
money:null,