|
|
|
@ -14,7 +14,7 @@ |
|
|
|
<view class="withdraw-amount-tip">小贴士:提现金额不少于1元 </view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="error-message" v-if="checkFlag == true">输入金额超过当前余额</view> |
|
|
|
<view class="error-message" v-if="checkFlag == true">输入金额超过或少于可提现余额</view> |
|
|
|
|
|
|
|
<view class="withdraw-title tl-title-margin">选择提现至</view> |
|
|
|
|
|
|
|
@ -73,6 +73,7 @@ |
|
|
|
noClick:true, //防止重复提交 |
|
|
|
creatorAccountList:[], |
|
|
|
accountNo: '', |
|
|
|
accountRealNo: '', //真实已加密账户账号 |
|
|
|
type: '', |
|
|
|
current: 0, |
|
|
|
payType: [ |
|
|
|
@ -126,6 +127,7 @@ |
|
|
|
for (let param of res.data.data) { |
|
|
|
if(param.isUse === '1'){ |
|
|
|
that.accountNo = param.accountNo; |
|
|
|
that.accountRealNo = param.accountRealNo; |
|
|
|
that.type = param.type; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -145,11 +147,13 @@ |
|
|
|
that.accountNo = param.accountNo; |
|
|
|
}, |
|
|
|
|
|
|
|
//检查是否超出余额 |
|
|
|
//检查是否超出余额或少于1元 |
|
|
|
checkAmt:function(){ |
|
|
|
let that = this; |
|
|
|
if(parseFloat(that.amt) > parseFloat(that.userInfo.amt)){ |
|
|
|
that.checkFlag = true; |
|
|
|
}else if(parseFloat(that.amt) < parseFloat(1)){ |
|
|
|
that.checkFlag = true; |
|
|
|
}else{ |
|
|
|
that.checkFlag = false; |
|
|
|
} |
|
|
|
@ -170,9 +174,9 @@ |
|
|
|
}); |
|
|
|
} |
|
|
|
if(that.checkFlag == true){ |
|
|
|
console.log('that.checkFlag',that.checkFlag) |
|
|
|
//console.log('that.checkFlag',that.checkFlag) |
|
|
|
uni.showModal({ |
|
|
|
content: '输入金额超过可提现余额!', |
|
|
|
content: '输入金额超过或少于可提现余额!', |
|
|
|
showCancel: false |
|
|
|
}); |
|
|
|
}else{ |
|
|
|
@ -183,14 +187,15 @@ |
|
|
|
} |
|
|
|
const checkRes = await checkWithdraw(param); |
|
|
|
if(checkRes.data.code === 200){ |
|
|
|
//服务器返回true可提现 |
|
|
|
if(checkRes.data.data === true){ |
|
|
|
//可提现 |
|
|
|
const withdrawParam = { |
|
|
|
creatorId: that.userInfo.id, |
|
|
|
amt: that.amt, |
|
|
|
accountNo: that.accountNo, |
|
|
|
accountNo: that.accountRealNo, |
|
|
|
channel: that.type |
|
|
|
} |
|
|
|
console.log('withdrawParam',withdrawParam) |
|
|
|
const withdrawRes = await withdraw(withdrawParam); |
|
|
|
if(withdrawRes.data.code === 200){ |
|
|
|
//更新艺术家缓存 |
|
|
|
@ -230,7 +235,7 @@ |
|
|
|
}else{ |
|
|
|
//不可提现 |
|
|
|
uni.showModal({ |
|
|
|
content: '输入金额超过可提现余额!', |
|
|
|
content: '输入金额超过或少于可提现余额!', |
|
|
|
showCancel: false |
|
|
|
}); |
|
|
|
} |
|
|
|
|