|
@@ -1,28 +1,29 @@
|
|
<template>
|
|
<template>
|
|
- <view class="content" v-if="!sh">
|
|
|
|
|
|
+ <view class="content">
|
|
|
|
+ <uni-notice-bar single="true" text="每月25号到月底可提现上月结算余额"></uni-notice-bar>
|
|
<view class="content-money">
|
|
<view class="content-money">
|
|
- <view class="buttom">
|
|
|
|
- <text class="text">可提现金额</text>
|
|
|
|
- <view class="icon">
|
|
|
|
- <text>¥</text>
|
|
|
|
- {{ money }}
|
|
|
|
|
|
+ <view class="flex ">
|
|
|
|
+ <view class="buttom">
|
|
|
|
+ <view class="icon">{{ money | getMoneyStyle }}</view>
|
|
|
|
+ <text class="text">可提现佣金</text>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="interval"></view>
|
|
|
|
- <view class="buttom">
|
|
|
|
- <text class="text">申请提现金额</text>
|
|
|
|
- <view class=" icon">
|
|
|
|
- <input class="input" type="number" v-model="withdrawal" :placeholder="'最低提现金额' + minPrice + '元'" placeholder-class="placeholder" />
|
|
|
|
|
|
+ <view class="interval"></view>
|
|
|
|
+ <view class="buttom">
|
|
|
|
+ <view class=" icon">{{ freeze | getMoneyStyle }}</view>
|
|
|
|
+ <text class="text">待审核提现佣金</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="interval"></view>
|
|
|
|
- <view class="tip">
|
|
|
|
- <text class="tip-text">申请提现金额</text>
|
|
|
|
- <view class=" tip-icon" @click="all()">全部提现</view>
|
|
|
|
|
|
+ </view>
|
|
|
|
+ <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 + '元'" placeholder-class="placeholder" />
|
|
|
|
+ <view class="buttom" @click="withdrawal = money">全部提现</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
- <view class="list">
|
|
|
|
|
|
+ <!-- #ifndef MP-WEIXIN -->
|
|
|
|
+ <view class="list" v-if="!weichatBsrowser">
|
|
<radio-group @change="tabRadio">
|
|
<radio-group @change="tabRadio">
|
|
<!-- <label>
|
|
<!-- <label>
|
|
<view class="box">
|
|
<view class="box">
|
|
@@ -38,11 +39,11 @@
|
|
<view class="icon iconfont iconzhifubao"></view>
|
|
<view class="icon iconfont iconzhifubao"></view>
|
|
<view class="title-box">
|
|
<view class="title-box">
|
|
<view class="title">
|
|
<view class="title">
|
|
- <text v-if="aliData.fullname != null">提现至支付宝</text>
|
|
|
|
|
|
+ <text v-if="aliData.fullname">提现至支付宝</text>
|
|
<text v-else>请创建支付宝账号</text>
|
|
<text v-else>请创建支付宝账号</text>
|
|
</view>
|
|
</view>
|
|
<view class="node">
|
|
<view class="node">
|
|
- <text v-if="aliData.fullname != null">真实姓名({{ aliData.fullname }})</text>
|
|
|
|
|
|
+ <text v-if="aliData.fullname">真实姓名({{ aliData.fullname }})</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="right"><radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" /></view>
|
|
<view class="right"><radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" /></view>
|
|
@@ -53,11 +54,11 @@
|
|
<view class="icon iconfont"><image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image></view>
|
|
<view class="icon iconfont"><image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image></view>
|
|
<view class="title-box">
|
|
<view class="title-box">
|
|
<view class="title">
|
|
<view class="title">
|
|
- <text v-if="bankData.bankno != null">{{ bankData.bank + ' ' + bankData.bankno }}</text>
|
|
|
|
|
|
+ <text v-if="bankData.bankno">{{ bankData.bank + ' ' + bankData.bankno }}</text>
|
|
<text v-else>请创建银行账号</text>
|
|
<text v-else>请创建银行账号</text>
|
|
</view>
|
|
</view>
|
|
<view class="node">
|
|
<view class="node">
|
|
- <text v-if="bankData.fullname != null">真实姓名({{ bankData.fullname}})</text>
|
|
|
|
|
|
+ <text v-if="bankData.fullname">真实姓名({{ bankData.fullname }})</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="right"><radio value="bank" color="#5dbc7c" :checked="type == 'bank'" /></view>
|
|
<view class="right"><radio value="bank" color="#5dbc7c" :checked="type == 'bank'" /></view>
|
|
@@ -65,67 +66,72 @@
|
|
</label>
|
|
</label>
|
|
</radio-group>
|
|
</radio-group>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- #endif -->
|
|
<button class="add-btn up" @click="confirm">提交申请</button>
|
|
<button class="add-btn up" @click="confirm">提交申请</button>
|
|
- <button class="add-btn modified" @click="navTo('/pages/money/account')">账号管理</button>
|
|
|
|
|
|
+ <button class="add-btn modified" v-if="!weichatBsrowser" @click="navTo('/pages/money/account')">账号管理</button>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { getMoneyStyle } from '@/utils/rocessor.js';
|
|
import { getMoneyStyle } from '@/utils/rocessor.js';
|
|
import { extractCash, extractBank, aliInfo, bankInfo } from '@/api/wallet.js';
|
|
import { extractCash, extractBank, aliInfo, bankInfo } from '@/api/wallet.js';
|
|
-import { mapState, mapMutations } from 'vuex';
|
|
|
|
-import { loadIndexs } from '@/api/index.js';
|
|
|
|
|
|
+import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
|
|
export default {
|
|
export default {
|
|
|
|
+ filters: {
|
|
|
|
+ getMoneyStyle
|
|
|
|
+ },
|
|
|
|
+ components: {
|
|
|
|
+ uniNoticeBar
|
|
|
|
+ },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- sh: true,
|
|
|
|
type: 'alipay', //提现方式
|
|
type: 'alipay', //提现方式
|
|
- money: '', //可提现金额
|
|
|
|
|
|
+ money: '0.00', //可提现金额
|
|
|
|
+ freeze: '0.0', //冻结金额
|
|
withdrawal: '', //提现金额
|
|
withdrawal: '', //提现金额
|
|
minPrice: '', //最少提现金额
|
|
minPrice: '', //最少提现金额
|
|
- coldMoney: '', //冻结中的金额
|
|
|
|
- aliData: { fullname: '', alino: '' },
|
|
|
|
- bankData: { fullname: '', bank: '', bankno: '' },
|
|
|
|
|
|
+ aliData: {},
|
|
|
|
+ bankData: {},
|
|
// #ifdef H5
|
|
// #ifdef H5
|
|
weichatBsrowser: false
|
|
weichatBsrowser: false
|
|
// #endif
|
|
// #endif
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- computed: {
|
|
|
|
- ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
|
|
|
|
- moneyMin() {
|
|
|
|
- return '最低提现金额' + this.minPrice + '元';
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- onShow(options) {
|
|
|
|
- loadIndexs({}).then(({data}) =>{
|
|
|
|
- console.log(data,'123')
|
|
|
|
- if(data.cash_switch == '1'){
|
|
|
|
- this.sh = false
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ onLoad(options) {
|
|
// #ifdef H5
|
|
// #ifdef H5
|
|
this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
|
|
this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
|
|
// #endif
|
|
// #endif
|
|
//加载提现信息
|
|
//加载提现信息
|
|
this.loadData();
|
|
this.loadData();
|
|
// 加载提款账号信息
|
|
// 加载提款账号信息
|
|
- this.aliData.fullname = this.userInfo.alipay_name;
|
|
|
|
- console.log(this.aliData.fullname);
|
|
|
|
- this.aliData.alino = this.userInfo.alipay_code;
|
|
|
|
- this.bankData.fullname = this.userInfo.bank_user_name;
|
|
|
|
- this.bankData.bank = this.userInfo.bank_name;
|
|
|
|
- this.bankData.bankno = this.userInfo.bank_code;
|
|
|
|
|
|
+ this.loadAli();
|
|
|
|
+ this.loadBank();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 更新数据
|
|
|
|
+ dataUp() {
|
|
|
|
+ this.loadAli();
|
|
|
|
+ this.loadBank();
|
|
|
|
+ },
|
|
|
|
+ //加载数据
|
|
|
|
+ async loadAli(source) {
|
|
|
|
+ console.log(source,'ali');
|
|
|
|
+ aliInfo({}).then(e => {
|
|
|
|
+ this.aliData = e.data;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 加载银行卡信息
|
|
|
|
+ async loadBank() {
|
|
|
|
+ bankInfo({}).then(e => {
|
|
|
|
+ this.bankData = e.data;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
// 加载余额信息
|
|
// 加载余额信息
|
|
async loadData() {
|
|
async loadData() {
|
|
extractBank({}).then(({ data }) => {
|
|
extractBank({}).then(({ data }) => {
|
|
- console.log(data);
|
|
|
|
- this.coldMoney = data.brokerage_price; //冻结中金额
|
|
|
|
- this.money = data.commissionCount * 1; //可提现余额
|
|
|
|
- this.minPrice = data.minPrice; //最小提现
|
|
|
|
- this.freeze = data.inmoneyCount; //提现中的余额
|
|
|
|
|
|
+ this.money = data.commissionCount;
|
|
|
|
+ this.minPrice = data.minPrice;
|
|
|
|
+ this.freeze = data.incommissionCount;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 跳转
|
|
// 跳转
|
|
@@ -134,33 +140,27 @@ export default {
|
|
url: url
|
|
url: url
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- all() {
|
|
|
|
- this.withdrawal = this.money;
|
|
|
|
- },
|
|
|
|
// 切换选中对象
|
|
// 切换选中对象
|
|
tabRadio(e) {
|
|
tabRadio(e) {
|
|
this.type = e.detail.value;
|
|
this.type = e.detail.value;
|
|
},
|
|
},
|
|
// 提交
|
|
// 提交
|
|
confirm() {
|
|
confirm() {
|
|
- console.log(this.withdrawal);
|
|
|
|
- if (this.withdrawal === '') {
|
|
|
|
- this.$api.msg('请填写需要提现的佣金');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if (this.withdrawal == 0) {
|
|
|
|
- this.$api.msg('提现佣金不能为0');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if (this.withdrawal < this.minPrice) {
|
|
|
|
- this.$api.msg('提现金额不能低于最小金额');
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
let data = {
|
|
let data = {
|
|
extract_type: this.type, //bank -银行卡 alipay-支付宝 weixin-微信
|
|
extract_type: this.type, //bank -银行卡 alipay-支付宝 weixin-微信
|
|
money: this.withdrawal, //金额
|
|
money: this.withdrawal, //金额
|
|
- money_type: 'brokerage' //0佣金1余额
|
|
|
|
|
|
+ money_type: 0 //0佣金1余额
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+ if (this.withdrawal < this.minPrice) {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '提现金额不可少于'+this.minPrice,
|
|
|
|
+ duration: 2000,
|
|
|
|
+ mask: false,
|
|
|
|
+ icon: 'none',
|
|
|
|
+ })
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
if (this.type == 'alipay') {
|
|
if (this.type == 'alipay') {
|
|
data.name = this.aliData.fullname;
|
|
data.name = this.aliData.fullname;
|
|
data.alipay_code = this.aliData.alino;
|
|
data.alipay_code = this.aliData.alino;
|
|
@@ -173,14 +173,11 @@ export default {
|
|
|
|
|
|
extractCash(data)
|
|
extractCash(data)
|
|
.then(e => {
|
|
.then(e => {
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages/money/success?type=1'
|
|
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: '提交成功',
|
|
|
|
+ duration: 2000,
|
|
|
|
+ position: 'top'
|
|
});
|
|
});
|
|
- // uni.showToast({
|
|
|
|
- // title: '提交成功',
|
|
|
|
- // duration: 2000,
|
|
|
|
- // position: 'top'
|
|
|
|
- // });
|
|
|
|
})
|
|
})
|
|
.catch(e => {
|
|
.catch(e => {
|
|
console.log();
|
|
console.log();
|
|
@@ -195,72 +192,77 @@ page {
|
|
height: 100%;
|
|
height: 100%;
|
|
}
|
|
}
|
|
.content-money {
|
|
.content-money {
|
|
- padding: 0 20rpx;
|
|
|
|
|
|
+ padding: 30rpx 0;
|
|
|
|
+ background: #ffffff;
|
|
|
|
+}
|
|
|
|
+.flex {
|
|
background-color: #ffffff;
|
|
background-color: #ffffff;
|
|
|
|
+ text-align: center;
|
|
|
|
+ margin: 0 30rpx;
|
|
|
|
+ border-radius: $border-radius-sm;
|
|
.buttom {
|
|
.buttom {
|
|
- display: flex;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- align-items: center;
|
|
|
|
- height: 110rpx;
|
|
|
|
|
|
+ font-size: $font-lg;
|
|
|
|
+ width: 50%;
|
|
}
|
|
}
|
|
.interval {
|
|
.interval {
|
|
- width: 100%;
|
|
|
|
- height: 1px;
|
|
|
|
- background: #e6e6e6;
|
|
|
|
|
|
+ width: 2px;
|
|
|
|
+ height: 60rpx;
|
|
|
|
+ background-color: #eeeeee;
|
|
}
|
|
}
|
|
.icon {
|
|
.icon {
|
|
- font-size: 48rpx;
|
|
|
|
- font-family: SourceHanSansCN;
|
|
|
|
- font-weight: 500;
|
|
|
|
- color: #333333;
|
|
|
|
- text {
|
|
|
|
- font-size: 32rpx;
|
|
|
|
|
|
+ background-size: 100%;
|
|
|
|
+ font-size: 42rpx;
|
|
|
|
+ color: $font-color-dark;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ background-repeat: no-repeat;
|
|
|
|
+ background-position: center;
|
|
|
|
+ }
|
|
|
|
+ .text {
|
|
|
|
+ color: $font-color-light;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.row-box {
|
|
|
|
+ margin-top: 30rpx;
|
|
|
|
+ padding: 20rpx 30rpx;
|
|
|
|
+ background: #fff;
|
|
|
|
+ .title {
|
|
|
|
+ font-size: $font-base + 2rpx;
|
|
|
|
+ color: $font-color-dark;
|
|
|
|
+ }
|
|
|
|
+ .row {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ position: relative;
|
|
|
|
+ height: 80rpx;
|
|
|
|
+ .tit {
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
+ width: 40rpx;
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
+ color: $font-color-dark;
|
|
}
|
|
}
|
|
.input {
|
|
.input {
|
|
- text-align: right;
|
|
|
|
flex: 1;
|
|
flex: 1;
|
|
font-size: 30rpx;
|
|
font-size: 30rpx;
|
|
color: $font-color-dark;
|
|
color: $font-color-dark;
|
|
}
|
|
}
|
|
.iconlocation {
|
|
.iconlocation {
|
|
- text-align: right;
|
|
|
|
font-size: 36rpx;
|
|
font-size: 36rpx;
|
|
color: $font-color-light;
|
|
color: $font-color-light;
|
|
}
|
|
}
|
|
- }
|
|
|
|
- .text {
|
|
|
|
- font-size: 32rpx;
|
|
|
|
- font-family: PingFang SC;
|
|
|
|
- font-weight: 500;
|
|
|
|
- color: #333333;
|
|
|
|
- }
|
|
|
|
- .tip {
|
|
|
|
- height: 74rpx;
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- align-items: center;
|
|
|
|
- .tip-text {
|
|
|
|
- font-size: 24rpx;
|
|
|
|
- font-family: PingFang SC;
|
|
|
|
- font-weight: 500;
|
|
|
|
- color: #999999;
|
|
|
|
- }
|
|
|
|
- .tip-icon {
|
|
|
|
- font-size: 26rpx;
|
|
|
|
- font-family: SourceHanSansCN;
|
|
|
|
- font-weight: 400;
|
|
|
|
- color: #438bed;
|
|
|
|
|
|
+
|
|
|
|
+ .buttom {
|
|
|
|
+ color: $font-color-spec;
|
|
|
|
+ font-size: $font-base;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
.add-btn {
|
|
.add-btn {
|
|
&.modified {
|
|
&.modified {
|
|
- color: #2ed8db;
|
|
|
|
- border:1px solid #2ed8db;
|
|
|
|
|
|
+ color: $base-color;
|
|
}
|
|
}
|
|
&.up {
|
|
&.up {
|
|
- background: linear-gradient(90deg, #08c4e6, #50ead2);
|
|
|
|
|
|
+ background-color: $base-color;
|
|
color: #fff;
|
|
color: #fff;
|
|
}
|
|
}
|
|
display: flex;
|
|
display: flex;
|