You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
140 lines
3.2 KiB
140 lines
3.2 KiB
<template>
|
|
<view>
|
|
<uni-card title="提现">
|
|
<view style="color: red;font-size: 12px;">*支付宝实名和手机号必须一致并经过实名认证</view>
|
|
<view class="zhifubao">
|
|
<view class="name">支付宝手机号:</view>
|
|
<view class="zfb-data">
|
|
<input type="number" v-model='zfbAccount' placeholder="支付宝手机号">
|
|
</view>
|
|
</view>
|
|
<view class="zhifubao">
|
|
<view class="name">支付宝实名:</view>
|
|
<view class="zfb-data">
|
|
<input type="text" v-model='zfbName' placeholder="支付宝认证的实名">
|
|
</view>
|
|
</view>
|
|
<view class="zhifubao">
|
|
<view class="name">提现金额:</view>
|
|
<view class="zfb-data">
|
|
<input type="digit" v-model="realBalance" placeholder="请输入提现金额">
|
|
</view>
|
|
</view>
|
|
<view class="yue-box">
|
|
<view class="yue">
|
|
可提现余额:
|
|
<text>{{canbalance?canbalance:'0'}}</text>
|
|
</view>
|
|
<view class="quanbu" @click="onQuanbuClick">
|
|
全部提现
|
|
</view>
|
|
</view>
|
|
<view>
|
|
<u-button type="primary" shape="circle" :disabled="isClick" @click="onSubmit">提现</u-button>
|
|
</view>
|
|
</uni-card>
|
|
</view>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
name: "withdrawal",
|
|
data() {
|
|
return {
|
|
balance: 0,
|
|
canbalance:'',
|
|
zfbAccount: '',
|
|
zfbName: '',
|
|
realBalance:'',
|
|
shopId:'',
|
|
isClick:false
|
|
}
|
|
},
|
|
onLoad(options) {
|
|
this.canbalance = options.balance
|
|
this.shopId = uni.getStorageSync('shopId')
|
|
},
|
|
methods: {
|
|
onQuanbuClick() {
|
|
this.realBalance = this.canbalance
|
|
},
|
|
onSubmit() {
|
|
this.isClick = true;
|
|
if(Number(this.realBalance) > Number(this.canbalance)){
|
|
this.tui.toast("提现金额不能大于账户余额!")
|
|
return
|
|
}else if(this.realBalance =='' || this.zfbName =='' || this.zfbAccount ==''){
|
|
this.tui.toast("信息填写完整后再进行操作!")
|
|
return
|
|
}else if(this.realBalance < 0.1){
|
|
this.tui.toast("提现金额不能小于0.1元")
|
|
return
|
|
}
|
|
this.tui.request('/app/returnCommission/handleReturn', 'post', {
|
|
commission:this.realBalance,
|
|
shopId:this.shopId,
|
|
aliName:this.zfbName,
|
|
aliAccount:this.zfbAccount
|
|
}, false, false, true).then((res) => {
|
|
|
|
if (res.code == 200){
|
|
this.tui.toast(res.message)
|
|
setTimeout(() => {
|
|
uni.reLaunch({
|
|
url: `/pages/rebate/rebate`
|
|
})
|
|
}, 2000)
|
|
}else{
|
|
this.tui.toast(res.message)
|
|
setTimeout(() => {
|
|
this.isClick = false;
|
|
// uni.reLaunch({
|
|
// url: `/pages/rebate/rebate`
|
|
// })
|
|
}, 2000)
|
|
}
|
|
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
.zhifubao {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin: 30rpx 0;
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
}
|
|
.zhifubao input{
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
border: 1px solid #eee;
|
|
}
|
|
.input-flex {
|
|
display: flex;
|
|
margin: 50upx 0;
|
|
}
|
|
|
|
.yue-box {
|
|
display: flex;
|
|
font-size: 24upx;
|
|
|
|
.yue {
|
|
color: #c26f59;
|
|
margin: 0 20rpx 50rpx 220rpx;
|
|
}
|
|
|
|
.quanbu {
|
|
color: #657284;
|
|
}
|
|
}
|
|
.name{
|
|
width: 35%;
|
|
}
|
|
.zfb-data{
|
|
width: 65%;
|
|
}
|
|
</style>
|