| xqd
@@ -130,12 +130,16 @@
|
|
|
size="22"></u-icon></view>
|
|
|
|
|
|
<view class="carmititle">添加提现信息</view>
|
|
|
- <view class="kf_qrcode tn-flex justify-center">
|
|
|
- <u--image :showLoading="true" :src="paymentcode" width="100px" height="100px"
|
|
|
- @click="clickuimage()"></u--image>
|
|
|
- </view>
|
|
|
- <view class="u-text-center">
|
|
|
- 点击上传微信收款码
|
|
|
+ <view class="carmiinput" v-if="selectedWithdrawType==1"><u--input placeholder="请输入您的银行卡号"
|
|
|
+ border="surround" clearable v-model="cardNum"></u--input></view>
|
|
|
+ <view class="" v-else>
|
|
|
+ <view class="kf_qrcode tn-flex justify-center">
|
|
|
+ <u--image :showLoading="true" :src="paymentcode" width="100px" height="100px"
|
|
|
+ @click="clickuimage()"></u--image>
|
|
|
+ </view>
|
|
|
+ <view class="u-text-center">
|
|
|
+ 点击上传{{selectedWithdrawType==2?"微信":'支付宝'}}收款码
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="carmiinput"><u--input placeholder="请输入您的真实姓名" border="surround" clearable
|
|
|
v-model="realname"></u--input></view>
|
| xqd
@@ -238,7 +242,8 @@
|
|
|
|
|
|
minCash: 0,
|
|
|
dayCash: 0,
|
|
|
- methods: []
|
|
|
+ methods: [],
|
|
|
+ cardNum: ''
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
| xqd
@@ -325,18 +330,23 @@
|
|
|
icon: 'none'
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- if (!this.paymentcode || !this.realname) {
|
|
|
- this.$u.toast('请上传提现信息');
|
|
|
- this.showBindForm = true
|
|
|
+ if (this.selectedWithdrawType == 1) {
|
|
|
+ this.$u.toast('银行卡提现暂未开通');
|
|
|
return;
|
|
|
}
|
|
|
- // if (!this.realname) {
|
|
|
- // this.$u.toast('请上传提现真实姓名信息');
|
|
|
- // this.showBindForm = true
|
|
|
- // return;
|
|
|
- // }
|
|
|
+ if (this.selectedWithdrawType == 1) {
|
|
|
+ if (!this.cardNum || !this.realname) {
|
|
|
+ this.$u.toast('请上传提现信息');
|
|
|
+ this.showBindForm = true
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!this.paymentcode || !this.realname) {
|
|
|
+ this.$u.toast('请上传提现信息');
|
|
|
+ this.showBindForm = true
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
console.log('申请提现参数', {
|
|
|
type: this.withDrawType,
|
|
|
method: this.selectedWithdrawType,
|
| xqd
@@ -345,14 +355,27 @@
|
|
|
real_name: this.realname,
|
|
|
qrcode_url: this.paymentcode
|
|
|
});
|
|
|
- let ress = await applyWithdraw({
|
|
|
- type: this.withDrawType,
|
|
|
- method: this.selectedWithdrawType,
|
|
|
- amount: this.money,
|
|
|
+ let parms = {}
|
|
|
+ if (this.selectedWithdrawType == 1) {
|
|
|
+ parms = {
|
|
|
+ type: this.withDrawType,
|
|
|
+ method: this.selectedWithdrawType,
|
|
|
+ amount: this.money,
|
|
|
+
|
|
|
+ real_name: this.realname,
|
|
|
+ cardNum: this.cardNum
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ parms = {
|
|
|
+ type: this.withDrawType,
|
|
|
+ method: this.selectedWithdrawType,
|
|
|
+ amount: this.money,
|
|
|
|
|
|
- real_name: this.realname,
|
|
|
- qrcode_url: this.paymentcode
|
|
|
- })
|
|
|
+ real_name: this.realname,
|
|
|
+ qrcode_url: this.paymentcode
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let ress = await applyWithdraw(parms)
|
|
|
console.log('申请提现返回值', ress, ress.msg);
|
|
|
if (ress.code == 0) {
|
|
|
uni.showToast({
|
| xqd
@@ -400,6 +423,9 @@
|
|
|
onSaveWithdrawType() {
|
|
|
// this.withdrawType = this.selectedWithdrawType;
|
|
|
this.showWithdrawList = false;
|
|
|
+ this.paymentcode = ''
|
|
|
+ this.cardNum = ''
|
|
|
+ console.log('this.paymentcode----------------', this.paymentcode);
|
|
|
console.log('this.selectedWithdrawType', this.selectedWithdrawType);
|
|
|
// this.getWithdrawInfo();
|
|
|
},
|
| xqd
@@ -410,13 +436,24 @@
|
|
|
},
|
|
|
exchange() {
|
|
|
let that = this;
|
|
|
- if (!that.paymentcode) {
|
|
|
- uni.showToast({
|
|
|
- title: '请上传微信收款码',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return;
|
|
|
+ if (this.selectedWithdrawType == 1) {
|
|
|
+ if (!that.cardNum) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请填写提现银行卡号',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!that.paymentcode) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '请上传收款码',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
if (!that.realname) {
|
|
|
uni.showToast({
|
|
|
title: '请填写您的真实姓名',
|
| xqd
@@ -430,12 +467,20 @@
|
|
|
qrcode_wechat: that.paymentcode
|
|
|
});
|
|
|
|
|
|
-
|
|
|
- if (that.realname && that.paymentcode) {
|
|
|
- uni.showToast({
|
|
|
- title: '保存成功'
|
|
|
- })
|
|
|
- that.showBindForm = false
|
|
|
+ if (this.selectedWithdrawType == 1) {
|
|
|
+ if (that.realname && that.cardNum) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '保存成功'
|
|
|
+ })
|
|
|
+ that.showBindForm = false
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (that.realname && that.paymentcode) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '保存成功'
|
|
|
+ })
|
|
|
+ that.showBindForm = false
|
|
|
+ }
|
|
|
}
|
|
|
return
|
|
|
that.$http('commission.update', {
|