|
@@ -1,27 +1,27 @@
|
|
|
<template>
|
|
|
<view :style="colorStyle">
|
|
|
<view class='cash-withdrawal'>
|
|
|
- <view class='nav acea-row' v-if="navList.length>1">
|
|
|
+ <!-- <view class='nav acea-row' v-if="navList.length>1">
|
|
|
<view v-for="(item,index) in navList" :key="index" class='item fontcolor' @click="swichNav(item.id)">
|
|
|
<view class='line bg-color' :class='currentTab==item.id ? "on":""'></view>
|
|
|
<view class='iconfont' :class='item.icon+" "+(currentTab==item.id ? "on":"")'></view>
|
|
|
<view>{{item.name}}</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class='wrapper'>
|
|
|
<view :hidden='currentTab != 0' class='list'>
|
|
|
<form @submit="subCash">
|
|
|
- <view class='item acea-row row-between-wrapper'>
|
|
|
+ <!-- <view class='item acea-row row-between-wrapper'>
|
|
|
<view class='name'>持卡人</view>
|
|
|
<view class='input'><input placeholder='请输入持卡人姓名' placeholder-class='placeholder'
|
|
|
name="name" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;"></input></view>
|
|
|
- </view>
|
|
|
- <view class='item acea-row row-between-wrapper'>
|
|
|
+ </view> -->
|
|
|
+ <!-- <view class='item acea-row row-between-wrapper'>
|
|
|
<view class='name'>卡号</view>
|
|
|
<view class='input'><input type='number' placeholder='请填写卡号' placeholder-class='placeholder'
|
|
|
name="cardnum"></input></view>
|
|
|
- </view>
|
|
|
- <view class='item acea-row row-between-wrapper'>
|
|
|
+ </view> -->
|
|
|
+ <!-- <view class='item acea-row row-between-wrapper'>
|
|
|
<view class='name'>银行</view>
|
|
|
<view class='input'>
|
|
|
<picker @change="bindPickerChange" :value="index" :range="array">
|
|
@@ -29,18 +29,20 @@
|
|
|
<text class='iconfont icon-qiepian38'></text>
|
|
|
</picker>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<view class='item acea-row row-between-wrapper'>
|
|
|
<view class='name'>提现</view>
|
|
|
- <view class='input'><input @input='inputNum' :maxlength="moneyMaxLeng" :placeholder='"最低提现金额:¥"+minPrice' placeholder-class='placeholder'
|
|
|
- name="money" type='digit'></input></view>
|
|
|
+ <view class='input'><input @input='inputNum' :maxlength="moneyMaxLeng"
|
|
|
+ :placeholder='"最低提现金额:¥"+minPrice' placeholder-class='placeholder' name="money"
|
|
|
+ type='digit'></input></view>
|
|
|
</view>
|
|
|
<view class='tip'>
|
|
|
当前可提现金额: <text
|
|
|
class="price">¥{{userInfo.commissionCount}}</text>,冻结佣金:¥{{userInfo.broken_commission}}
|
|
|
</view>
|
|
|
<view class='tip'>
|
|
|
- 提现手续费: <text class="price">{{withdraw_fee}}%</text>,实际到账:<text class="price">¥{{true_money}}</text>
|
|
|
+ 提现手续费: <text class="price">{{withdraw_fee}}%</text>,实际到账:<text
|
|
|
+ class="price">¥{{true_money}}</text>
|
|
|
</view>
|
|
|
<view class='tip'>
|
|
|
说明: 每笔佣金的冻结期为{{userInfo.broken_day}}天,到期后可提现
|
|
@@ -53,12 +55,15 @@
|
|
|
<view class='item acea-row row-between-wrapper' v-if="extract_wechat_type == 0">
|
|
|
<view class='name'>账号</view>
|
|
|
<view class='input'><input placeholder='请填写您的微信账号' placeholder-class='placeholder'
|
|
|
- name="name" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;"></input></view>
|
|
|
+ name="name"
|
|
|
+ onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;"></input>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class='item acea-row row-between-wrapper'>
|
|
|
<view class='name'>提现</view>
|
|
|
- <view class='input'><input @input='inputNum' :maxlength="moneyMaxLeng" :placeholder='"最低提现金额:¥"+minPrice' placeholder-class='placeholder'
|
|
|
- name="money" type='digit'></input></view>
|
|
|
+ <view class='input'><input @input='inputNum' :maxlength="moneyMaxLeng"
|
|
|
+ :placeholder='"最低提现金额:¥"+minPrice' placeholder-class='placeholder' name="money"
|
|
|
+ type='digit'></input></view>
|
|
|
</view>
|
|
|
<view class='item acea-row row-top row-between' v-if="extract_wechat_type == 0">
|
|
|
<view class='name'>收款码</view>
|
|
@@ -79,7 +84,8 @@
|
|
|
class="price">¥{{userInfo.commissionCount}}</text>,冻结佣金:¥{{userInfo.broken_commission}}
|
|
|
</view>
|
|
|
<view class='tip'>
|
|
|
- 提现手续费: <text class="price">{{withdraw_fee}}%</text>,实际到账:<text class="price">¥{{true_money}}</text>
|
|
|
+ 提现手续费: <text class="price">{{withdraw_fee}}%</text>,实际到账:<text
|
|
|
+ class="price">¥{{true_money}}</text>
|
|
|
</view>
|
|
|
<view class='tip'>
|
|
|
说明: 每笔佣金的冻结期为{{userInfo.broken_day}}天,到期后可提现
|
|
@@ -92,12 +98,15 @@
|
|
|
<view class='item acea-row row-between-wrapper'>
|
|
|
<view class='name'>账号</view>
|
|
|
<view class='input'><input placeholder='请填写您的支付宝账号' placeholder-class='placeholder'
|
|
|
- name="name" onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;"></input></view>
|
|
|
+ name="name"
|
|
|
+ onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;"></input>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class='item acea-row row-between-wrapper'>
|
|
|
<view class='name'>提现</view>
|
|
|
- <view class='input'><input @input='inputNum' :maxlength="moneyMaxLeng" :placeholder='"最低提现金额:¥"+minPrice' placeholder-class='placeholder'
|
|
|
- name="money" type='digit'></input></view>
|
|
|
+ <view class='input'><input @input='inputNum' :maxlength="moneyMaxLeng"
|
|
|
+ :placeholder='"最低提现金额:¥"+minPrice' placeholder-class='placeholder' name="money"
|
|
|
+ type='digit'></input></view>
|
|
|
</view>
|
|
|
<view class='item acea-row row-top row-between'>
|
|
|
<view class='name'>收款码</view>
|
|
@@ -118,7 +127,8 @@
|
|
|
class="price">¥{{userInfo.commissionCount}}</text>,冻结佣金:¥{{userInfo.broken_commission}}
|
|
|
</view>
|
|
|
<view class='tip'>
|
|
|
- 提现手续费: <text class="price">{{withdraw_fee}}%</text>,实际到账:<text class="price">¥{{true_money}}</text>
|
|
|
+ 提现手续费: <text class="price">{{withdraw_fee}}%</text>,实际到账:<text
|
|
|
+ class="price">¥{{true_money}}</text>
|
|
|
</view>
|
|
|
<view class='tip'>
|
|
|
说明: 每笔佣金的冻结期为{{userInfo.broken_day}}天,到期后可提现
|
|
@@ -135,6 +145,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {
|
|
|
+ bank_info
|
|
|
+ } from '@/api/new.js';
|
|
|
import {
|
|
|
extractCash,
|
|
|
extractBank,
|
|
@@ -149,7 +162,7 @@
|
|
|
import colors from '@/mixins/color.js';
|
|
|
export default {
|
|
|
components: {},
|
|
|
- mixins:[colors],
|
|
|
+ mixins: [colors],
|
|
|
data() {
|
|
|
return {
|
|
|
navList: [],
|
|
@@ -167,7 +180,8 @@
|
|
|
moneyMaxLeng: 8,
|
|
|
withdraw_fee: '0',
|
|
|
true_money: 0,
|
|
|
- extract_wechat_type:0
|
|
|
+ extract_wechat_type: 0,
|
|
|
+ isAuth: false, //判断是否认证
|
|
|
};
|
|
|
},
|
|
|
computed: mapGetters(['isLogin']),
|
|
@@ -191,18 +205,47 @@
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
+ if (this.isLogin) {
|
|
|
+ this.bank_info();
|
|
|
+ }
|
|
|
uni.removeStorageSync('form_type_cart');
|
|
|
},
|
|
|
methods: {
|
|
|
+ bank_info() {
|
|
|
+ const that = this;
|
|
|
+ bank_info().then((res) => {
|
|
|
+ if (!res.data.bank_code) {
|
|
|
+ that.isAuth = false;
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '您还未认证请立即认证',
|
|
|
+ confirmText: '立即认证',
|
|
|
+ success: res => {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: './WAuth'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: () => {},
|
|
|
+ complete: () => {}
|
|
|
+ });
|
|
|
+ return
|
|
|
+ } else {
|
|
|
+ that.isAuth = true;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
inputNum: function(e) {
|
|
|
let val = e.detail.value;
|
|
|
let dot = val.indexOf('.');
|
|
|
- if(dot>-1){
|
|
|
- this.moneyMaxLeng = dot+3;
|
|
|
- }else{
|
|
|
+ if (dot > -1) {
|
|
|
+ this.moneyMaxLeng = dot + 3;
|
|
|
+ } else {
|
|
|
this.moneyMaxLeng = 8
|
|
|
}
|
|
|
- this.true_money = Math.floor((this.$util.$h.Mul(val,this.$util.$h.Div(this.$util.$h.Sub(100,this.withdraw_fee),100)))*100)/100 || 0;
|
|
|
+ this.true_money = Math.floor((this.$util.$h.Mul(val, this.$util.$h.Div(this.$util.$h.Sub(100, this
|
|
|
+ .withdraw_fee), 100))) * 100) / 100 || 0;
|
|
|
},
|
|
|
// uploadpicW(){
|
|
|
// this.uploadpic(this.qrcodeUrlW);
|
|
@@ -261,32 +304,26 @@
|
|
|
let that = this;
|
|
|
getUserInfo().then(res => {
|
|
|
that.userInfo = res.data;
|
|
|
- if(res.data.user_extract_bank_status){
|
|
|
- this.navList.push(
|
|
|
- {
|
|
|
- 'name': '银行卡',
|
|
|
- 'icon': 'icon-yinhangqia',
|
|
|
- 'id': 0
|
|
|
- }
|
|
|
- )
|
|
|
+ if (res.data.user_extract_bank_status) {
|
|
|
+ this.navList.push({
|
|
|
+ 'name': '银行卡',
|
|
|
+ 'icon': 'icon-yinhangqia',
|
|
|
+ 'id': 0
|
|
|
+ })
|
|
|
}
|
|
|
- if(res.data.user_extract_wechat_status){
|
|
|
- this.navList.push(
|
|
|
- {
|
|
|
- 'name': '微信',
|
|
|
- 'icon': 'icon-weixin2',
|
|
|
- 'id': 1
|
|
|
- }
|
|
|
- )
|
|
|
+ if (res.data.user_extract_wechat_status) {
|
|
|
+ this.navList.push({
|
|
|
+ 'name': '微信',
|
|
|
+ 'icon': 'icon-weixin2',
|
|
|
+ 'id': 1
|
|
|
+ })
|
|
|
}
|
|
|
- if(res.data.user_extract_alipay_status){
|
|
|
- this.navList.push(
|
|
|
- {
|
|
|
- 'name': '支付宝',
|
|
|
- 'icon': 'icon-icon34',
|
|
|
- 'id': 2
|
|
|
- }
|
|
|
- )
|
|
|
+ if (res.data.user_extract_alipay_status) {
|
|
|
+ this.navList.push({
|
|
|
+ 'name': '支付宝',
|
|
|
+ 'icon': 'icon-icon34',
|
|
|
+ 'id': 2
|
|
|
+ })
|
|
|
}
|
|
|
this.currentTab = this.navList[0].id;
|
|
|
})
|
|
@@ -300,41 +337,58 @@
|
|
|
subCash: function(e) {
|
|
|
let that = this,
|
|
|
value = e.detail.value;
|
|
|
- if (that.currentTab == 0) { //银行卡
|
|
|
- if (value.name.length == 0) return this.$util.Tips({
|
|
|
- title: '请填写持卡人姓名'
|
|
|
- });
|
|
|
- if (value.cardnum.length == 0) return this.$util.Tips({
|
|
|
- title: '请填写卡号'
|
|
|
- });
|
|
|
- if (that.index == 0) return this.$util.Tips({
|
|
|
- title: "请选择银行"
|
|
|
- });
|
|
|
- value.extract_type = 'bank';
|
|
|
- value.bankname = that.array[that.index];
|
|
|
- } else if (that.currentTab == 1) { //微信
|
|
|
- value.extract_type = 'weixin';
|
|
|
- if(that.extract_wechat_type == 0){
|
|
|
- if (value.name.length == 0) return this.$util.Tips({
|
|
|
- title: '请填写微信号'
|
|
|
+ if (!this.isAuth) {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '您还未认证请立即认证',
|
|
|
+ confirmText: '立即认证',
|
|
|
+ success: res => {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: './WAuth'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: () => {},
|
|
|
+ complete: () => {}
|
|
|
});
|
|
|
- if (that.qrcodeUrlW == '') return this.$util.Tips({
|
|
|
- title: '请上传图片'
|
|
|
- });
|
|
|
- value.weixin = value.name;
|
|
|
- value.qrcode_url = that.qrcodeUrlW;
|
|
|
+ return
|
|
|
}
|
|
|
- } else if (that.currentTab == 2) { //支付宝
|
|
|
- value.extract_type = 'alipay';
|
|
|
- if (value.name.length == 0) return this.$util.Tips({
|
|
|
- title: '请填写账号'
|
|
|
- });
|
|
|
- if (that.qrcodeUrlZ == '') return this.$util.Tips({
|
|
|
- title: '请上传图片'
|
|
|
- });
|
|
|
- value.alipay_code = value.name;
|
|
|
- value.qrcode_url = that.qrcodeUrlZ;
|
|
|
- }
|
|
|
+ // if (that.currentTab == 0) { //银行卡
|
|
|
+ // if (value.name.length == 0) return this.$util.Tips({
|
|
|
+ // title: '请填写持卡人姓名'
|
|
|
+ // });
|
|
|
+ // if (value.cardnum.length == 0) return this.$util.Tips({
|
|
|
+ // title: '请填写卡号'
|
|
|
+ // });
|
|
|
+ // if (that.index == 0) return this.$util.Tips({
|
|
|
+ // title: "请选择银行"
|
|
|
+ // });
|
|
|
+ // value.extract_type = 'bank';
|
|
|
+ // value.bankname = that.array[that.index];
|
|
|
+ // } else if (that.currentTab == 1) { //微信
|
|
|
+ // value.extract_type = 'weixin';
|
|
|
+ // if (that.extract_wechat_type == 0) {
|
|
|
+ // if (value.name.length == 0) return this.$util.Tips({
|
|
|
+ // title: '请填写微信号'
|
|
|
+ // });
|
|
|
+ // if (that.qrcodeUrlW == '') return this.$util.Tips({
|
|
|
+ // title: '请上传图片'
|
|
|
+ // });
|
|
|
+ // value.weixin = value.name;
|
|
|
+ // value.qrcode_url = that.qrcodeUrlW;
|
|
|
+ // }
|
|
|
+ // } else if (that.currentTab == 2) { //支付宝
|
|
|
+ // value.extract_type = 'alipay';
|
|
|
+ // if (value.name.length == 0) return this.$util.Tips({
|
|
|
+ // title: '请填写账号'
|
|
|
+ // });
|
|
|
+ // if (that.qrcodeUrlZ == '') return this.$util.Tips({
|
|
|
+ // title: '请上传图片'
|
|
|
+ // });
|
|
|
+ // value.alipay_code = value.name;
|
|
|
+ // value.qrcode_url = that.qrcodeUrlZ;
|
|
|
+ // }
|
|
|
if (value.money.length == 0) return this.$util.Tips({
|
|
|
title: '请填写提现金额'
|
|
|
});
|
|
@@ -346,6 +400,10 @@
|
|
|
} else {
|
|
|
return
|
|
|
}
|
|
|
+ uni.showLoading({
|
|
|
+ title:'提交中',
|
|
|
+ mask:true
|
|
|
+ })
|
|
|
extractCash(value).then(res => {
|
|
|
//that.getUserInfo();
|
|
|
return this.$util.Tips({
|
|
@@ -372,9 +430,11 @@
|
|
|
page {
|
|
|
background-color: #fff !important;
|
|
|
}
|
|
|
- .fontcolor{
|
|
|
+
|
|
|
+ .fontcolor {
|
|
|
color: var(--view-theme) !important;
|
|
|
}
|
|
|
+
|
|
|
.cash-withdrawal .nav {
|
|
|
height: 130rpx;
|
|
|
box-shadow: 0 10rpx 10rpx #f8f8f8;
|
|
@@ -523,4 +583,4 @@
|
|
|
.price {
|
|
|
color: var(--view-priceColor);
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|