From c76bbf920f7ea32d2c604cdc529b865950ea24ac Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期四, 21 八月 2025 15:28:14 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
small-program/pages/withdrawal/withdrawal.vue | 75 ++++++++++++++++++++++++++++++++++++-
1 files changed, 72 insertions(+), 3 deletions(-)
diff --git a/small-program/pages/withdrawal/withdrawal.vue b/small-program/pages/withdrawal/withdrawal.vue
index 765f968..5e058c1 100644
--- a/small-program/pages/withdrawal/withdrawal.vue
+++ b/small-program/pages/withdrawal/withdrawal.vue
@@ -35,9 +35,39 @@
data() {
return {
tips:'',//
+ wxTips:'',
+ canTransfer:false,
changing1:false,
amount: null
};
+ },
+ onLoad(){
+ var that =this
+ that.canTransfer = false
+ if (wx.canIUse('requestMerchantTransfer')) {
+ //that.tips='鎮ㄧ殑寰俊鐗堟湰鏀寔璇ュ姛鑳�'
+ that.canTransfer = true
+ }else{
+ that.tips='鎮ㄧ殑寰俊鐗堟湰杩囦綆锛岃鏇存柊鑷虫渶鏂扮増鏈娇鐢ㄨ鍔熻兘'
+ uni.showToast({
+ title:'鎮ㄧ殑寰俊鐗堟湰杩囦綆锛岃鏇存柊鑷虫渶鏂扮増鏈娇鐢ㄨ鍔熻兘銆�'
+ })
+ }
+ /* wx.ready(function () {
+ wx.checkJsApi({
+ jsApiList: ['requestMerchantTransfer'],
+ success: function (res) {
+ if (res.checkResult['requestMerchantTransfer']) {
+ that.canTransfer = true
+ } else {
+ that.tips='鎮ㄧ殑寰俊鐗堟湰杩囦綆锛岃鏇存柊鑷虫渶鏂扮増鏈娇鐢ㄨ鍔熻兘'
+ uni.showToast({
+ title:'鎮ㄧ殑寰俊鐗堟湰杩囦綆锛岃鏇存柊鑷虫渶鏂扮増鏈娇鐢ㄨ鍔熻兘銆�'
+ })
+ }
+ }
+ });
+ }); */
},
methods: {
jump() {
@@ -51,7 +81,45 @@
changeAmount(){
this.tips=''
},
+ wxMerchantTransfer(param){
+ wx.requestMerchantTransfer({
+ mchId: param.mchId,
+ appId: param.appId,
+ package: param.packageInfo,
+ success: (res) => {
+ // res.err_msg灏嗗湪椤甸潰灞曠ず鎴愬姛鍚庤繑鍥炲簲鐢ㄦ椂杩斿洖ok锛屽苟涓嶄唬琛ㄤ粯娆炬垚鍔�
+ uni.navigateTo({
+ url: '/pages/withdrawal-successful/withdrawal-successful'
+ })
+ },
+ fail: (res) => {
+ uni.showToast({
+ title:'瀵逛笉璧凤紝鎻愮幇澶辫触銆�'+res.err_msg
+ })
+ },
+ });
+ /* WeixinJSBridge.invoke('requestMerchantTransfer',param,
+ function (res) {
+ if (res.err_msg === 'requestMerchantTransfer:ok') {
+ // res.err_msg灏嗗湪椤甸潰灞曠ず鎴愬姛鍚庤繑鍥炲簲鐢ㄦ椂杩斿洖success锛屽苟涓嶄唬琛ㄤ粯娆炬垚鍔�
+ uni.navigateTo({
+ url: '/pages/withdrawal-successful/withdrawal-successful'
+ })
+ }else{
+ uni.showToast({
+ title:'瀵逛笉璧凤紝鎻愮幇澶辫触銆�'+res.err_msg
+ })
+ }
+ }
+ ); */
+ },
submit() {
+ if(!this.canTransfer){
+ uni.showToast({
+ title:'鎮ㄧ殑寰俊鐗堟湰杩囦綆锛岃鏇存柊鑷虫渶鏂扮増鏈娇鐢ㄨ鍔熻兘銆�'
+ })
+ return;
+ }
if(this.changing1){
return
}
@@ -72,9 +140,10 @@
that.$u.api.applyWithdrawal(param)
.then(res =>{
if(res.code ===200){
- uni.navigateTo({
- url: '/pages/withdrawal-successful/withdrawal-successful'
- })
+ that.wxMerchantTransfer(res.data);
+ // uni.navigateTo({
+ // url: '/pages/withdrawal-successful/withdrawal-successful'
+ // })
}
}).finally(() => {
that.changing1 = false
--
Gitblit v1.9.3