|
|
@@ -5,7 +5,7 @@
|
|
|
<view class="flex " style="width: 750rpx;justify-content: space-around;margin-left: 0;">
|
|
|
<view class="buttom">
|
|
|
<view class="icon">{{ money | getMoneyStyle }}</view>
|
|
|
- <text class="text">可提现佣金</text>
|
|
|
+ <text class="text">可提现金额</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -13,63 +13,97 @@
|
|
|
<view class="row-box">
|
|
|
<view class="title">提现金额</view>
|
|
|
<view class="row">
|
|
|
- <text class="tit">¥</text>
|
|
|
- <input class="input" type="number" v-model="withdrawal" :placeholder="'最低提现金额' + minPrice + '元'"
|
|
|
+ <text class="tit"></text>
|
|
|
+ <input class="input" type="number" v-model="withdrawal" placeholder="请输入提现金额"
|
|
|
placeholder-class="placeholder" />
|
|
|
<view class="buttom" @click="withdrawal = money">全部提现</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <template v-if="auth_status == 0">
|
|
|
- <view class="list">
|
|
|
- <radio-group @change="tabRadio">
|
|
|
- <label>
|
|
|
- <view class="box">
|
|
|
- <view class="icon iconfont iconzhifubao"></view>
|
|
|
- <view class="title-box">
|
|
|
- <view class="title">
|
|
|
- <text v-if="aliData.fullname">提现至支付宝</text>
|
|
|
- <text v-else>请创建支付宝账号</text>
|
|
|
- </view>
|
|
|
- <view class="node">
|
|
|
- <text v-if="aliData.fullname">真实姓名({{ aliData.fullname }})</text>
|
|
|
- </view>
|
|
|
+ <view class="list">
|
|
|
+ <radio-group @change="tabRadio">
|
|
|
+ <!-- <label>
|
|
|
+ <view class="box">
|
|
|
+ <view class="icon iconfont iconweixin1"></view>
|
|
|
+ <view class="title-box">
|
|
|
+ <view class="title">
|
|
|
+ <text v-if="weixin_no">提现至微信</text>
|
|
|
+ <text v-else>请创建微信账号</text>
|
|
|
</view>
|
|
|
- <view class="right">
|
|
|
- <radio value="alipay" color="#007c92" :checked="type == 'alipay'" />
|
|
|
+ <view class="node">
|
|
|
+ <text v-if="weixin_no">账号({{ weixin_no }})</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </label>
|
|
|
- <label>
|
|
|
- <view class="box">
|
|
|
- <view class="icon iconfont">
|
|
|
- <image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image>
|
|
|
+ <view class="right">
|
|
|
+ <radio value="weixin" color="#c29963" :checked="type == 'weixin'" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </label> -->
|
|
|
+ <!-- <label>
|
|
|
+ <view class="box">
|
|
|
+ <view class="icon iconfont iconzhifubao"></view>
|
|
|
+ <view class="title-box">
|
|
|
+ <view class="title">
|
|
|
+ <text v-if="aliData.name">提现至支付宝</text>
|
|
|
+ <text v-else>请创建支付宝账号</text>
|
|
|
</view>
|
|
|
- <view class="title-box">
|
|
|
- <view class="title">
|
|
|
- <text v-if="bankInfo.fullname">{{ bankInfo.bank + ' ' + bankInfo.bankno }}</text>
|
|
|
- <text v-else>请创建银行账号</text>
|
|
|
- </view>
|
|
|
- <view class="node">
|
|
|
- <text v-if="bankInfo.fullname">真实姓名({{ bankInfo.fullname }})</text>
|
|
|
- </view>
|
|
|
+ <view class="node">
|
|
|
+ <text v-if="aliData.name">真实姓名({{ aliData.name }})</text>
|
|
|
</view>
|
|
|
- <view class="right">
|
|
|
- <radio value="bank" color="#007c92" :checked="type == 'bank'" />
|
|
|
+ </view>
|
|
|
+ <view class="right">
|
|
|
+ <radio value="alipay" color="#ff4072" :checked="type == 'alipay'" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </label> -->
|
|
|
+ <!-- <label>
|
|
|
+ <view class="box">
|
|
|
+ <view class="icon iconfont">
|
|
|
+ <image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image>
|
|
|
+ </view>
|
|
|
+ <view class="title-box">
|
|
|
+ <view class="title">
|
|
|
+ <text v-if="bankInfo.bankno">{{ bankInfo.bank + ' ' + bankInfo.bankno }}</text>
|
|
|
+ <text v-else>请创建银行账号</text>
|
|
|
+ </view>
|
|
|
+ <view class="node">
|
|
|
+ <text v-if="bankInfo.fullname">真实姓名({{ bankInfo.fullname }})</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </label>
|
|
|
- </radio-group>
|
|
|
- </view>
|
|
|
- <button class="add-btn modified" @click="navTo('/pages/user/sqdl')">提现账号管理</button>
|
|
|
- </template>
|
|
|
+ <view class="right">
|
|
|
+ <radio value="bank" color="#ff4072" :checked="type == 'bank'" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </label> -->
|
|
|
+ </radio-group>
|
|
|
+ </view>
|
|
|
|
|
|
+ <view class="row b-b" v-if="type == 'bank'">
|
|
|
+ <text class="tit">银行卡号</text>
|
|
|
+ <input class="input" type="text" v-model="bankInfo.cardnum" placeholder="请输入银行卡号"
|
|
|
+ placeholder-class="placeholder" />
|
|
|
+ </view>
|
|
|
+ <view class="row b-b" v-if="type == 'bank'">
|
|
|
+ <text class="tit">姓名</text>
|
|
|
+ <input class="input" type="text" v-model="bankInfo.name" placeholder="请输入姓名"
|
|
|
+ placeholder-class="placeholder" />
|
|
|
+ </view>
|
|
|
+ <view class="row b-b" v-if="type == 'bank'">
|
|
|
+ <text class="tit">所属银行</text>
|
|
|
+ <input class="input" type="text" v-model="bankInfo.bankname" placeholder="请输入所属银行"
|
|
|
+ placeholder-class="placeholder" />
|
|
|
+ </view>
|
|
|
+ <view class="row b-b" v-if="type == 'bank'">
|
|
|
+ <text class="tit">所属支行</text>
|
|
|
+ <input class="input" type="text" v-model="bankInfo.subbranch" placeholder="请输入所属支行"
|
|
|
+ placeholder-class="placeholder" />
|
|
|
+ </view>
|
|
|
+ <!-- <button class="add-btn modified" @click="navTo('/pages/user/sqdl')">银行卡管理</button> -->
|
|
|
<button class="add-btn up" @click="confirm">提交申请</button>
|
|
|
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { loadIndexs } from '@/api/index.js'
|
|
|
import {
|
|
|
getLevelList,
|
|
|
bank,
|
|
|
@@ -87,8 +121,7 @@
|
|
|
} from '@/api/wallet.js';
|
|
|
import {
|
|
|
orderData,
|
|
|
- getUserInfo,
|
|
|
- getAli
|
|
|
+ getUserInfo
|
|
|
} from '@/api/user.js';
|
|
|
import {
|
|
|
mapState,
|
|
|
@@ -107,11 +140,12 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- auth_status: '1',
|
|
|
- bankData: {
|
|
|
-
|
|
|
+ bankInfo: {
|
|
|
+ name: '',
|
|
|
+ bankname: '',
|
|
|
+ cardnum: '',
|
|
|
+ subbranch: ''
|
|
|
},
|
|
|
- bankInfo: {},
|
|
|
weixin_no: '',
|
|
|
type: 'bank', //提现方式
|
|
|
money: '0.00', //可提现金额
|
|
|
@@ -127,6 +161,7 @@
|
|
|
bank_name: '',
|
|
|
bank_belonging: '',
|
|
|
jftype: 0,
|
|
|
+ typee: 0
|
|
|
};
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
@@ -138,38 +173,42 @@
|
|
|
|
|
|
},
|
|
|
onShow() {
|
|
|
- this.dataUp()
|
|
|
- this.getIndex()
|
|
|
+ // this.dataUp()
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
|
|
|
- getIndex() {
|
|
|
- loadIndexs().then(res => {
|
|
|
- this.auth_status = res.data.auth_status
|
|
|
- })
|
|
|
- },
|
|
|
dataUp() {
|
|
|
- let obj = this
|
|
|
- bankInfo().then(res => {
|
|
|
- if(res.data && res.data.id) {
|
|
|
- this.bankInfo = res.data
|
|
|
- }
|
|
|
- })
|
|
|
- getAli().then(res => {
|
|
|
- if (res.data && res.data.id) {
|
|
|
- this.aliData = res.data
|
|
|
- }
|
|
|
- })
|
|
|
+ // let obj = this
|
|
|
+ // bankInfo().then(res => {
|
|
|
+ // // console.log(res.data.);
|
|
|
+ // // console.log(res,res.dat);
|
|
|
+ // if(res.data && res.data.id) {
|
|
|
+ // // console.log('dd');
|
|
|
+ // this.bankInfo = res.data
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
// 加载余额信息
|
|
|
async loadData() {
|
|
|
-
|
|
|
+ let bankInfo = uni.getStorageSync('bankInfo')
|
|
|
+ if(bankInfo && bankInfo.name) {
|
|
|
+ this.bankInfo = bankInfo
|
|
|
+ }
|
|
|
extractBank({}).then(({
|
|
|
data
|
|
|
}) => {
|
|
|
+ console.log(data, 'data+++++++++')
|
|
|
this.minPrice = data.minPrice;
|
|
|
- this.money = data.brokerage_price
|
|
|
+ // if(this.typee == 1) {
|
|
|
+ // this.money = data.brokerage_price_1 || 0
|
|
|
+ // }else {
|
|
|
+ // this.money = data.brokerage_price
|
|
|
+ // }
|
|
|
+
|
|
|
});
|
|
|
+ getUserInfo().then(res => {
|
|
|
+ this.money = res.data.brokerage_price
|
|
|
+ })
|
|
|
|
|
|
},
|
|
|
// 跳转
|
|
|
@@ -185,13 +224,20 @@
|
|
|
// 提交
|
|
|
confirm() {
|
|
|
let obj = this
|
|
|
+ if(this.loading) {
|
|
|
+ return
|
|
|
+ }
|
|
|
let data = {
|
|
|
extract_type: this.type, //bank -银行卡 alipay-支付宝 weixin-微信
|
|
|
- money: this.withdrawal, //金额
|
|
|
- type: 0 //0佣金1余额
|
|
|
+ money: this.withdrawal * 1, //金额
|
|
|
+ // type: 0 ,//0佣金1余额
|
|
|
+ // balance_type: this.typee
|
|
|
};
|
|
|
|
|
|
- if (this.withdrawal < this.minPrice) {
|
|
|
+ if (!this.withdrawal) {
|
|
|
+ return this.$api.msg('请输入提现金额')
|
|
|
+ }
|
|
|
+ if (this.withdrawal * 1 < this.minPrice * 1) {
|
|
|
uni.showToast({
|
|
|
title: '提现金额不可少于' + this.minPrice,
|
|
|
duration: 2000,
|
|
|
@@ -201,37 +247,39 @@
|
|
|
return;
|
|
|
}
|
|
|
if (this.type == 'alipay') {
|
|
|
- data.name = this.aliData.fullname || '';
|
|
|
- data.alipay_code = this.aliData.alino || '';
|
|
|
- if(!data.name) {
|
|
|
- return this.$api.msg('请完善支付宝信息')
|
|
|
- }
|
|
|
+ console.log('alipay');
|
|
|
+ data.name = this.aliData.name;
|
|
|
+ data.alipay_code = this.aliData.payment;
|
|
|
}
|
|
|
if (this.type == 'bank') {
|
|
|
- console.log('bank');
|
|
|
- data.name = this.bankInfo.fullname;
|
|
|
- data.bankname = this.bankInfo.bank + this.bankInfo.subbranch;
|
|
|
- data.cardnum = this.bankInfo.bankno;
|
|
|
- if(!data.name) {
|
|
|
- return this.$api.msg('请完善银行卡信息')
|
|
|
- }
|
|
|
+ data.name = this.bankInfo.name;
|
|
|
+ data.bankname = this.bankInfo.bankname ;
|
|
|
+ data.cardnum = this.bankInfo.cardnum;
|
|
|
+ data.subbranch = this.bankInfo.subbranch
|
|
|
}
|
|
|
if(this.type == 'weixin') {
|
|
|
console.log('weixin');
|
|
|
data.weixin = this.weixin_no
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
+ this.loading = true
|
|
|
+ uni.showLoading({
|
|
|
+ title:'提交中...'
|
|
|
+ })
|
|
|
extractCash(data)
|
|
|
.then(e => {
|
|
|
+ uni.setStorageSync('bankInfo',this.bankInfo)
|
|
|
obj.loadData()
|
|
|
-
|
|
|
+ uni.hideLoading()
|
|
|
uni.showToast({
|
|
|
title: '提交成功',
|
|
|
duration: 2000,
|
|
|
position: 'top'
|
|
|
});
|
|
|
+ obj.loading = false
|
|
|
})
|
|
|
.catch(e => {
|
|
|
+ obj.loading = false
|
|
|
console.log();
|
|
|
});
|
|
|
}
|
|
|
@@ -315,7 +363,7 @@
|
|
|
}
|
|
|
|
|
|
.buttom {
|
|
|
- color: $base-color;
|
|
|
+ color: $font-color-spec;
|
|
|
font-size: $font-base;
|
|
|
}
|
|
|
}
|
|
|
@@ -326,7 +374,7 @@
|
|
|
// color: #ffffff;
|
|
|
border:1px solid $base-color;
|
|
|
// background-color: #fff;
|
|
|
- color: $base-color;
|
|
|
+ color:$base-color;
|
|
|
background-color: #fff;
|
|
|
}
|
|
|
|
|
|
@@ -430,4 +478,4 @@
|
|
|
padding: 20rpx;
|
|
|
color: #fd3b39;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|