|
@@ -145,12 +145,16 @@
|
|
v-model="bankName"></u--input></view>
|
|
v-model="bankName"></u--input></view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
- <view class="" v-else>
|
|
|
|
- <view class="kf_qrcode tn-flex justify-center">
|
|
|
|
- <u--image :showLoading="true" :src="paymentcode" width="100px" height="100px"
|
|
|
|
|
|
+ <view class="">
|
|
|
|
+ <view class="kf_qrcode tn-flex justify-center" v-if="selectedWithdrawType==2">
|
|
|
|
+ <u--image :showLoading="true" :src="wx_qrcode_url" width="100px" height="100px"
|
|
|
|
+ @click="clickuimage()"></u--image>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="kf_qrcode tn-flex justify-center" v-if="selectedWithdrawType==3">
|
|
|
|
+ <u--image :showLoading="true" :src="ali_qrcode_url" width="100px" height="100px"
|
|
@click="clickuimage()"></u--image>
|
|
@click="clickuimage()"></u--image>
|
|
</view>
|
|
</view>
|
|
- <view class="u-text-center">
|
|
|
|
|
|
+ <view class="u-text-center" v-if="selectedWithdrawType!=1">
|
|
点击上传{{selectedWithdrawType==2?"微信":'支付宝'}}收款码
|
|
点击上传{{selectedWithdrawType==2?"微信":'支付宝'}}收款码
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -194,6 +198,7 @@
|
|
import {
|
|
import {
|
|
taskCount,
|
|
taskCount,
|
|
recommendCount,
|
|
recommendCount,
|
|
|
|
+ userInfo
|
|
|
|
|
|
} from '@/api/my/index.js'
|
|
} from '@/api/my/index.js'
|
|
export default {
|
|
export default {
|
|
@@ -262,11 +267,14 @@
|
|
cardNum: '',
|
|
cardNum: '',
|
|
bankName: '',
|
|
bankName: '',
|
|
|
|
|
|
- withDrawInfo: {}
|
|
|
|
|
|
+ withDrawInfo: {},
|
|
|
|
+ userInfo: {},
|
|
|
|
+ wx_qrcode_url: '',
|
|
|
|
+ ali_qrcode_url: ''
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- ...mapGetters(['appInfo', 'userInfo'])
|
|
|
|
|
|
+ // ...mapGetters(['appInfo', 'userInfo'])
|
|
},
|
|
},
|
|
async onShow() {
|
|
async onShow() {
|
|
if (this.withDrawType == 1) {
|
|
if (this.withDrawType == 1) {
|
|
@@ -284,6 +292,20 @@
|
|
console.log('推广-可提现金额', this.enableMoney);
|
|
console.log('推广-可提现金额', this.enableMoney);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ let res66 = await userInfo()
|
|
|
|
+ if (res66.code == 0) {
|
|
|
|
+ this.userInfo = res66.data
|
|
|
|
+
|
|
|
|
+ this.bankName = this.userInfo.bank_name
|
|
|
|
+ this.cardNum = this.userInfo.card_num
|
|
|
|
+ this.realname = this.userInfo.real_name
|
|
|
|
+
|
|
|
|
+ this.wx_qrcode_url = this.userInfo.wx_qrcode_url
|
|
|
|
+ this.ali_qrcode_url = this.userInfo.ali_qrcode_url
|
|
|
|
+
|
|
|
|
+ console.log('提现-用户个人信息', this.userInfo);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
async onLoad(o) {
|
|
async onLoad(o) {
|
|
// let ress6 = await withDrawInfo()
|
|
// let ress6 = await withDrawInfo()
|
|
@@ -306,6 +328,8 @@
|
|
this.dayCash = ress.data[4].value.rule.day
|
|
this.dayCash = ress.data[4].value.rule.day
|
|
this.methods = ress.data[4].value.method
|
|
this.methods = ress.data[4].value.method
|
|
|
|
|
|
|
|
+ this.selectedWithdrawType = Number(this.methods[0])
|
|
|
|
+
|
|
|
|
|
|
this.methods.forEach((item, index) => {
|
|
this.methods.forEach((item, index) => {
|
|
if (item == 2) {
|
|
if (item == 2) {
|
|
@@ -340,17 +364,17 @@
|
|
this.showWithdrawList = false;
|
|
this.showWithdrawList = false;
|
|
this.showBindForm = true
|
|
this.showBindForm = true
|
|
this.selectedWithdrawType = i
|
|
this.selectedWithdrawType = i
|
|
-
|
|
|
|
-
|
|
|
|
// if (i == 1) {
|
|
// if (i == 1) {
|
|
- // this.bankName = '123'
|
|
|
|
- // } else if (i == 1) {
|
|
|
|
-
|
|
|
|
|
|
+ // this.bankName = this.userInfo.bank_name
|
|
|
|
+ // this.cardNum = this.userInfo.card_num
|
|
|
|
+ // this.realname = this.userInfo.real_name
|
|
|
|
+ // } else if (i == 2) {
|
|
|
|
+ // this.realname = this.userInfo.real_name
|
|
|
|
+ // this.paymentcode = this.userInfo.wx_qrcode_url
|
|
// } else {
|
|
// } else {
|
|
-
|
|
|
|
|
|
+ // this.realname = this.userInfo.real_name
|
|
|
|
+ // this.paymentcode = this.userInfo.ali_qrcode_url
|
|
// }
|
|
// }
|
|
-
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
@@ -387,8 +411,14 @@
|
|
this.showBindForm = true
|
|
this.showBindForm = true
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ } else if (this.selectedWithdrawType == 2) {
|
|
|
|
+ if (!this.wx_qrcode_url || !this.realname) {
|
|
|
|
+ this.$u.toast('请上传提现信息');
|
|
|
|
+ this.showBindForm = true
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- if (!this.paymentcode || !this.realname) {
|
|
|
|
|
|
+ if (!this.ali_qrcode_url || !this.realname) {
|
|
this.$u.toast('请上传提现信息');
|
|
this.$u.toast('请上传提现信息');
|
|
this.showBindForm = true
|
|
this.showBindForm = true
|
|
return;
|
|
return;
|
|
@@ -398,9 +428,12 @@
|
|
type: this.withDrawType,
|
|
type: this.withDrawType,
|
|
method: this.selectedWithdrawType,
|
|
method: this.selectedWithdrawType,
|
|
amount: this.money,
|
|
amount: this.money,
|
|
|
|
+ wx_qrcode_url: this.wx_qrcode_url,
|
|
|
|
+ ali_qrcode_url: this.ali_qrcode_url,
|
|
|
|
|
|
real_name: this.realname,
|
|
real_name: this.realname,
|
|
- qrcode_url: this.paymentcode,
|
|
|
|
|
|
+
|
|
|
|
+
|
|
card_num: this.cardNum,
|
|
card_num: this.cardNum,
|
|
bank_name: this.bankName
|
|
bank_name: this.bankName
|
|
});
|
|
});
|
|
@@ -415,6 +448,15 @@
|
|
card_num: this.cardNum,
|
|
card_num: this.cardNum,
|
|
bank_name: this.bankName
|
|
bank_name: this.bankName
|
|
}
|
|
}
|
|
|
|
+ } else if (this.selectedWithdrawType == 2) {
|
|
|
|
+ parms = {
|
|
|
|
+ type: this.withDrawType,
|
|
|
|
+ method: this.selectedWithdrawType,
|
|
|
|
+ amount: this.money,
|
|
|
|
+
|
|
|
|
+ real_name: this.realname,
|
|
|
|
+ wx_qrcode_url: this.wx_qrcode_url
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
parms = {
|
|
parms = {
|
|
type: this.withDrawType,
|
|
type: this.withDrawType,
|
|
@@ -422,16 +464,33 @@
|
|
amount: this.money,
|
|
amount: this.money,
|
|
|
|
|
|
real_name: this.realname,
|
|
real_name: this.realname,
|
|
- qrcode_url: this.paymentcode
|
|
|
|
|
|
+ ali_qrcode_url: this.ali_qrcode_url
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let ress = await applyWithdraw(parms)
|
|
let ress = await applyWithdraw(parms)
|
|
console.log('申请提现返回值', ress, ress.msg);
|
|
console.log('申请提现返回值', ress, ress.msg);
|
|
// if (ress.code == 0) {
|
|
// if (ress.code == 0) {
|
|
- if (ress.code == '提交成功') {
|
|
|
|
|
|
+ if (ress.code == 0) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: '提现申请成功'
|
|
title: '提现申请成功'
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+ this.selectedWithdrawType = Number(this.methods[0])
|
|
|
|
+ this.money = ''
|
|
|
|
+ this.realname = ''
|
|
|
|
+ this.cardNum = ''
|
|
|
|
+ this.bankName = ''
|
|
|
|
+ this.paymentcode = ''
|
|
|
|
+ console.log('提现参数重置后', {
|
|
|
|
+ type: this.withDrawType,
|
|
|
|
+ method: this.selectedWithdrawType,
|
|
|
|
+ amount: this.money,
|
|
|
|
+
|
|
|
|
+ real_name: this.realname,
|
|
|
|
+ card_num: this.cardNum,
|
|
|
|
+ bank_name: this.bankName,
|
|
|
|
+ qrcode_url: this.paymentcode
|
|
|
|
+ });
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: '/pages/user/commission/withdraw-log'
|
|
url: '/pages/user/commission/withdraw-log'
|
|
@@ -472,14 +531,7 @@
|
|
},
|
|
},
|
|
// 确认提现方式
|
|
// 确认提现方式
|
|
onSaveWithdrawType() {
|
|
onSaveWithdrawType() {
|
|
- // this.withdrawType = this.selectedWithdrawType;
|
|
|
|
this.showWithdrawList = false;
|
|
this.showWithdrawList = false;
|
|
- this.paymentcode = ''
|
|
|
|
- this.cardNum = ''
|
|
|
|
- this.bankName = ''
|
|
|
|
- console.log('this.paymentcode----------------', this.paymentcode);
|
|
|
|
- console.log('this.selectedWithdrawType', this.selectedWithdrawType);
|
|
|
|
- // this.getWithdrawInfo();
|
|
|
|
},
|
|
},
|
|
async bindThirdOauth() {
|
|
async bindThirdOauth() {
|
|
let that = this;
|
|
let that = this;
|
|
@@ -504,10 +556,18 @@
|
|
})
|
|
})
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ } else if (this.selectedWithdrawType == 2) {
|
|
|
|
+ if (!that.wx_qrcode_url) {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '请上传微信收款码',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- if (!that.paymentcode) {
|
|
|
|
|
|
+ if (!that.ali_qrcode_url) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title: '请上传收款码',
|
|
|
|
|
|
+ title: '请上传支付宝收款码',
|
|
icon: 'none'
|
|
icon: 'none'
|
|
})
|
|
})
|
|
return;
|
|
return;
|
|
@@ -522,96 +582,21 @@
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- console.log('添加提现信息传递的参数', {
|
|
|
|
- real_name: that.realname,
|
|
|
|
- qrcode_wechat: that.paymentcode
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
if (this.selectedWithdrawType == 1) {
|
|
if (this.selectedWithdrawType == 1) {
|
|
- if (that.realname && that.cardNum) {
|
|
|
|
- // uni.showToast({
|
|
|
|
- // title: '保存成功'
|
|
|
|
- // })
|
|
|
|
|
|
+ if (that.realname && that.cardNum && that.bankName) {
|
|
|
|
+ that.showBindForm = false
|
|
|
|
+ }
|
|
|
|
+ } else if (this.selectedWithdrawType == 2) {
|
|
|
|
+ if (that.realname && that.wx_qrcode_url) {
|
|
that.showBindForm = false
|
|
that.showBindForm = false
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- if (that.realname && that.paymentcode) {
|
|
|
|
- // uni.showToast({
|
|
|
|
- // title: '保存成功'
|
|
|
|
- // })
|
|
|
|
|
|
+ if (that.realname && that.ali_qrcode_url) {
|
|
that.showBindForm = false
|
|
that.showBindForm = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
this.confirmWithdraw()
|
|
this.confirmWithdraw()
|
|
- this.selectedWithdrawType = 2
|
|
|
|
- this.money = ''
|
|
|
|
- this.realname = ''
|
|
|
|
- this.cardNum = ''
|
|
|
|
- this.bankName = ''
|
|
|
|
- this.paymentcode = ''
|
|
|
|
- console.log('提现参数重置后', {
|
|
|
|
- type: this.withDrawType,
|
|
|
|
- method: this.selectedWithdrawType,
|
|
|
|
- amount: this.money,
|
|
|
|
-
|
|
|
|
- real_name: this.realname,
|
|
|
|
- card_num: this.cardNum,
|
|
|
|
- bank_name: this.bankName,
|
|
|
|
- qrcode_url: this.paymentcode
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- // let res7 = await saveWithDrawInfo({
|
|
|
|
- // real_name: this.realname,
|
|
|
|
- // card_num: this.cardNum,
|
|
|
|
- // bank_name: this.bankName,
|
|
|
|
- // qrcode_url: this.paymentcode
|
|
|
|
- // })
|
|
|
|
- // console.log('提交保存的提现信息', {
|
|
|
|
- // real_name: this.realname,
|
|
|
|
- // card_num: this.cardNum,
|
|
|
|
- // bank_name: this.bankName,
|
|
|
|
- // qrcode_url: this.paymentcode
|
|
|
|
- // });
|
|
|
|
- // if (res7.code == 0) {
|
|
|
|
- // this.confirmWithdraw()
|
|
|
|
- // this.selectedWithdrawType = 2
|
|
|
|
- // this.money = ''
|
|
|
|
- // this.realname = ''
|
|
|
|
- // this.cardNum = ''
|
|
|
|
- // this.bankName = ''
|
|
|
|
- // this.paymentcode = ''
|
|
|
|
- // console.log('提现参数重置后', {
|
|
|
|
- // type: this.withDrawType,
|
|
|
|
- // method: this.selectedWithdrawType,
|
|
|
|
- // amount: this.money,
|
|
|
|
-
|
|
|
|
- // real_name: this.realname,
|
|
|
|
- // card_num: this.cardNum,
|
|
|
|
- // bank_name: this.bankName,
|
|
|
|
- // qrcode_url: this.paymentcode
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
return
|
|
return
|
|
- that.$http('commission.update', {
|
|
|
|
- real_name: that.realname,
|
|
|
|
- qrcode_wechat: that.paymentcodeid
|
|
|
|
- }).then(res => {
|
|
|
|
- if (res.code === 0) {
|
|
|
|
- uni.showToast({
|
|
|
|
- title: '保存成功'
|
|
|
|
- })
|
|
|
|
- that.showBindForm = false
|
|
|
|
- that.getCheck()
|
|
|
|
- } else {
|
|
|
|
- uni.showToast({
|
|
|
|
- title: '保存失败',
|
|
|
|
- icon: 'none'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
},
|
|
},
|
|
//上传收款码
|
|
//上传收款码
|
|
clickuimage() {
|
|
clickuimage() {
|
|
@@ -637,7 +622,11 @@
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
let a = JSON.parse(res2.data);
|
|
let a = JSON.parse(res2.data);
|
|
if (a.code == 0) {
|
|
if (a.code == 0) {
|
|
- that.paymentcode = a.data.url
|
|
|
|
|
|
+ if (that.selectedWithdrawType == 2) {
|
|
|
|
+ that.wx_qrcode_url = a.data.url
|
|
|
|
+ } else {
|
|
|
|
+ that.ali_qrcode_url = a.data.url
|
|
|
|
+ }
|
|
// that.paymentcodeid = a.data.id
|
|
// that.paymentcodeid = a.data.id
|
|
} else {
|
|
} else {
|
|
uni.showToast({
|
|
uni.showToast({
|