From 99e92a155a1b21a8386b482e7aab6fef649aeffa Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期四, 28 八月 2025 17:47:03 +0800
Subject: [PATCH] 111
---
small-program/pages/withdrawal/withdrawal.vue | 56 +++++++++++++++++++++++++++++++++++---------------------
1 files changed, 35 insertions(+), 21 deletions(-)
diff --git a/small-program/pages/withdrawal/withdrawal.vue b/small-program/pages/withdrawal/withdrawal.vue
index 5e058c1..6e76dcd 100644
--- a/small-program/pages/withdrawal/withdrawal.vue
+++ b/small-program/pages/withdrawal/withdrawal.vue
@@ -11,13 +11,17 @@
<text>鎻愮幇鍒拌处</text>
<text>寰俊闆堕挶</text>
</view>
+ <view class="content-title">鐪熷疄濮撳悕</view>
+ <view class="content-input" style="margin-bottom: 40rpx;">
+ <input style="font-weight: 500;" type="text" v-model="name" @input="changeName" placeholder="寰俊瀹炲悕璁よ瘉濮撳悕" />
+ </view>
<view class="content-title">鎻愮幇閲戦</view>
<view class="content-input">
<view class="content-input-icon">
<image src="/static/icon/ic_money@2x.png" mode="widthFix"></image>
</view>
- <input type="number" v-model="amount" @input="changeAmount" placeholder="璇疯緭鍏ユ彁鐜伴噾棰�" />
- <view class="content-input-btn" @click="inputAll">鍏ㄩ儴鎻愮幇</view>
+ <input type="digit" v-model="amount" @input="changeAmount" placeholder="璇疯緭鍏ユ彁鐜伴噾棰�" />
+ <view class="content-input-btn" @click="inputAll">鍏ㄩ儴鎻愮幇</view>
</view>
<view class="content-tips">{{tips}}</view>
<view class="content-button" @click="submit">2灏忔椂鍒拌处锛岀‘璁ゆ彁鐜�</view>
@@ -38,10 +42,12 @@
wxTips:'',
canTransfer:false,
changing1:false,
- amount: null
+ amount: null,
+ name:''
};
},
onLoad(){
+ this.name = this.userInfo.name
var that =this
that.canTransfer = false
if (wx.canIUse('requestMerchantTransfer')) {
@@ -74,7 +80,7 @@
uni.navigateTo({
url: '/pages/balance-details/balance-details'
})
- },
+ },
inputAll(){
this.amount = ((this.userInfo.amount|| 0)/100).toFixed(2)
},
@@ -88,13 +94,16 @@
package: param.packageInfo,
success: (res) => {
// res.err_msg灏嗗湪椤甸潰灞曠ず鎴愬姛鍚庤繑鍥炲簲鐢ㄦ椂杩斿洖ok锛屽苟涓嶄唬琛ㄤ粯娆炬垚鍔�
+ console.log(res)
uni.navigateTo({
url: '/pages/withdrawal-successful/withdrawal-successful'
})
},
fail: (res) => {
+ console.log("22222222222222",res)
uni.showToast({
- title:'瀵逛笉璧凤紝鎻愮幇澶辫触銆�'+res.err_msg
+ title:'瀵逛笉璧凤紝鎻愮幇澶辫触銆�',
+ icon: 'none'
})
},
});
@@ -114,6 +123,7 @@
); */
},
submit() {
+ var that = this;
if(!this.canTransfer){
uni.showToast({
title:'鎮ㄧ殑寰俊鐗堟湰杩囦綆锛岃鏇存柊鑷虫渶鏂扮増鏈娇鐢ㄨ鍔熻兘銆�'
@@ -134,22 +144,26 @@
this.changing1 = false
return
}
- this.changing1 = true
- var that = this
- var param ={amount:this.amount }
- that.$u.api.applyWithdrawal(param)
- .then(res =>{
- if(res.code ===200){
- that.wxMerchantTransfer(res.data);
- // uni.navigateTo({
- // url: '/pages/withdrawal-successful/withdrawal-successful'
- // })
- }
- }).finally(() => {
- that.changing1 = false
- that.tips=''
- that.amount =null
- })
+ uni.requestSubscribeMessage({
+ tmplIds: ['fNJy4545hcrH83bP3a1vszs7XEKWjXMsrfr2XCNsql0'],
+ success(res) {
+ this.changing1 = true
+ var param ={amount:that.amount,name:that.name }
+ that.$u.api.applyWithdrawal(param)
+ .then(res =>{
+ if(res.code ===200){
+ that.wxMerchantTransfer(res.data);
+ // uni.navigateTo({
+ // url: '/pages/withdrawal-successful/withdrawal-successful'
+ // })
+ }
+ }).finally(() => {
+ that.changing1 = false
+ that.tips=''
+ that.amount =null
+ })
+ }
+ })
},
}
--
Gitblit v1.9.3