|
@@ -3,24 +3,6 @@
|
|
<view class="overage">
|
|
<view class="overage">
|
|
账户剩余金额:<text class="number">{{ userInfo.income }}元</text>
|
|
账户剩余金额:<text class="number">{{ userInfo.income }}元</text>
|
|
</view>
|
|
</view>
|
|
- <view class="input-box main-left cross-center">
|
|
|
|
- <view class="left">姓名</view>
|
|
|
|
- <view class="center">
|
|
|
|
- <input v-model="name" type="text" placeholder="请输入姓名">
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="input-box main-left cross-center">
|
|
|
|
- <view class="left">手机号</view>
|
|
|
|
- <view class="center">
|
|
|
|
- <input v-model="phone_num" type="number" placeholder="请输入手机号">
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="input-box main-left cross-center">
|
|
|
|
- <view class="left">提现账号</view>
|
|
|
|
- <view class="center">
|
|
|
|
- <input v-model="account" type="text" placeholder="请输入提现账号">
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
<view class="input-box main-left cross-center">
|
|
<view class="input-box main-left cross-center">
|
|
<view class="left">¥</view>
|
|
<view class="left">¥</view>
|
|
<view class="center">
|
|
<view class="center">
|
|
@@ -40,6 +22,34 @@
|
|
<u-icon name="arrow-right" :color="$colors.infoColor" bold top="1" />
|
|
<u-icon name="arrow-right" :color="$colors.infoColor" bold top="1" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <template v-if="Object.keys(selectType).length">
|
|
|
|
+ <view class="input-box main-left cross-center">
|
|
|
|
+ <view class="left">姓名</view>
|
|
|
|
+ <view class="center">
|
|
|
|
+ <input v-model="name" type="text" placeholder="请输入姓名">
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="input-box main-left cross-center">
|
|
|
|
+ <view class="left">手机号</view>
|
|
|
|
+ <view class="center">
|
|
|
|
+ <input v-model="phone_num" type="number" placeholder="请输入手机号">
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <template v-if="selectType.value === 3">
|
|
|
|
+ <view class="input-box main-left cross-center">
|
|
|
|
+ <view class="left">提现银行</view>
|
|
|
|
+ <view class="center">
|
|
|
|
+ <input v-model="bank_name" type="text" placeholder="请输入提现银行">
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </template>
|
|
|
|
+ <view class="input-box main-left cross-center">
|
|
|
|
+ <view class="left">提现账号</view>
|
|
|
|
+ <view class="center">
|
|
|
|
+ <input v-model="account" type="text" placeholder="请输入提现账号">
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </template>
|
|
|
|
|
|
<view class="btn" @click="handleConfirm">提交申请</view>
|
|
<view class="btn" @click="handleConfirm">提交申请</view>
|
|
<!-- 选择提现方式 -->
|
|
<!-- 选择提现方式 -->
|
|
@@ -79,6 +89,7 @@ export default {
|
|
account: '',
|
|
account: '',
|
|
name: '',
|
|
name: '',
|
|
phone_num: '',
|
|
phone_num: '',
|
|
|
|
+ bank_name: '',
|
|
setting: { withdraw_min: 0, withdraw_discount: 0 },
|
|
setting: { withdraw_min: 0, withdraw_discount: 0 },
|
|
show: false,
|
|
show: false,
|
|
types: [
|
|
types: [
|
|
@@ -97,6 +108,18 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
handleConfirm() {
|
|
handleConfirm() {
|
|
|
|
+ if (!this.price) {
|
|
|
|
+ this.$u.toast(`请输入提现金额`)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (Object.keys(this.selectType).length === 0) {
|
|
|
|
+ this.$u.toast(`请选择提现方式`)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (parseFloat(this.price) < parseFloat(this.setting.withdraw_min)) {
|
|
|
|
+ this.$u.toast(`提现金额不能小于${this.setting.withdraw_min}元`)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if (!this.name) {
|
|
if (!this.name) {
|
|
this.$u.toast(`请输入姓名`)
|
|
this.$u.toast(`请输入姓名`)
|
|
return
|
|
return
|
|
@@ -109,14 +132,6 @@ export default {
|
|
this.$u.toast(`请输入账号`)
|
|
this.$u.toast(`请输入账号`)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if (Object.keys(this.selectType).length === 0) {
|
|
|
|
- this.$u.toast(`请选择提现方式`)
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if (parseFloat(this.price) < parseFloat(this.setting.withdraw_min)) {
|
|
|
|
- this.$u.toast(`提现金额不能小于${this.setting.withdraw_min}元`)
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
if (parseFloat(this.price) > this.userInfo.income) {
|
|
if (parseFloat(this.price) > this.userInfo.income) {
|
|
this.$u.toast(`提现金额不能大于可提现余额`)
|
|
this.$u.toast(`提现金额不能大于可提现余额`)
|
|
return
|
|
return
|
|
@@ -126,12 +141,18 @@ export default {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (this.selectType.value === 3 && !this.bank_name) {
|
|
|
|
+ this.$u.toast(`请输入提现银行`)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
const params = {
|
|
const params = {
|
|
price: this.price,
|
|
price: this.price,
|
|
type: this.selectType.value,
|
|
type: this.selectType.value,
|
|
account: this.account,
|
|
account: this.account,
|
|
name: this.name,
|
|
name: this.name,
|
|
- phone_num: this.phone_num
|
|
|
|
|
|
+ phone_num: this.phone_num,
|
|
|
|
+ bank_name: this.bank_name
|
|
}
|
|
}
|
|
this.$loading()
|
|
this.$loading()
|
|
this.$api.share.withdraw.create(params).then(res => {
|
|
this.$api.share.withdraw.create(params).then(res => {
|