|
@@ -1,73 +1,80 @@
|
|
<template>
|
|
<template>
|
|
<view>
|
|
<view>
|
|
<form @submit="submitSub" :style="colorStyle">
|
|
<form @submit="submitSub" :style="colorStyle">
|
|
- <view class="payment-top acea-row row-column row-center-wrapper">
|
|
|
|
|
|
+ <view class="payment-top acea-row row-column row-center-wrapper" v-if="is_gq !=1">
|
|
<span class="name">我的余额</span>
|
|
<span class="name">我的余额</span>
|
|
<view class="pic">
|
|
<view class="pic">
|
|
¥<span class="pic-font">{{ userinfo.now_money || 0 }}</span>
|
|
¥<span class="pic-font">{{ userinfo.now_money || 0 }}</span>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="payment-top acea-row row-column row-center-wrapper" v-else>
|
|
|
|
+ <span class="name">我的股权</span>
|
|
|
|
+ <view class="pic">
|
|
|
|
+ ¥<span class="pic-font">{{ staffInfo.shareholding || 0 }}</span>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
<view class="payment">
|
|
<view class="payment">
|
|
- <view class="nav acea-row row-around row-middle">
|
|
|
|
|
|
+ <view class="nav acea-row row-around row-middle" v-if="is_gq !=1">
|
|
<view class="item" :class="active==index?'on':''" v-for="(item,index) in navRecharge" :key="index"
|
|
<view class="item" :class="active==index?'on':''" v-for="(item,index) in navRecharge" :key="index"
|
|
@click="navRecharges(index)">{{item}}</view>
|
|
@click="navRecharges(index)">{{item}}</view>
|
|
</view>
|
|
</view>
|
|
- <view class='tip picList' v-if='!active'>
|
|
|
|
- <view class="pic-box pic-box-color acea-row row-center-wrapper row-column"
|
|
|
|
- :class="activePic == index ? 'pic-box-color-active' : ''" v-for="(item, index) in picList"
|
|
|
|
- :key="index" @click="picCharge(index, item)" v-if="item.price">
|
|
|
|
- <view class="pic-number-pic">
|
|
|
|
- {{ item.price }}<span class="pic-number"> 元</span>
|
|
|
|
|
|
+ <view class='tip picList' v-if='!active'>
|
|
|
|
+ <view class="pic-box pic-box-color acea-row row-center-wrapper row-column"
|
|
|
|
+ :class="activePic == index ? 'pic-box-color-active' : ''" v-for="(item, index) in picList"
|
|
|
|
+ :key="index" @click="picCharge(index, item)" v-if="item.price">
|
|
|
|
+ <view class="pic-number-pic">
|
|
|
|
+ {{ item.price }}<span class="pic-number"> 元</span>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="pic-number">赠送:{{ item.give_money }} 元</view>
|
|
</view>
|
|
</view>
|
|
- <view class="pic-number">赠送:{{ item.give_money }} 元</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="pic-box pic-box-color acea-row row-center-wrapper"
|
|
|
|
- :class="activePic == picList.length ? 'pic-box-color-active' : ''"
|
|
|
|
- @click="picCharge(picList.length)">
|
|
|
|
- <input type="digit" placeholder="其他" v-model="money" class="pic-box-money pic-number-pic"
|
|
|
|
- :class="activePic == picList.length ? 'pic-box-color-active' : ''" />
|
|
|
|
- </view>
|
|
|
|
-
|
|
|
|
- <view class="flex share-user">
|
|
|
|
- <view class="title">
|
|
|
|
- 邀请人:
|
|
|
|
|
|
+ <view class="pic-box pic-box-color acea-row row-center-wrapper"
|
|
|
|
+ :class="activePic == picList.length ? 'pic-box-color-active' : ''"
|
|
|
|
+ @click="picCharge(picList.length)">
|
|
|
|
+ <input type="digit" placeholder="其他" v-model="money" class="pic-box-money pic-number-pic"
|
|
|
|
+ :class="activePic == picList.length ? 'pic-box-color-active' : ''" />
|
|
</view>
|
|
</view>
|
|
- <view class="input-box">
|
|
|
|
- <input type="text" placeholder="请输入邀请人会员码" v-model="verify_code" class="input-user" />
|
|
|
|
|
|
+
|
|
|
|
+ <view class="flex share-user">
|
|
|
|
+ <view class="title">
|
|
|
|
+ 邀请人:
|
|
|
|
+ </view>
|
|
|
|
+ <view class="input-box">
|
|
|
|
+ <input type="text" placeholder="请输入邀请人会员码" v-model="verify_code" class="input-user" />
|
|
|
|
+ </view>
|
|
|
|
+ <!-- #ifdef H5 -->
|
|
|
|
+ <view class="iconfont icon-saoma" @click="scanCode"></view>
|
|
|
|
+ <!-- #endif -->
|
|
|
|
+ <!-- #ifdef MP || MP-WEIXIN || APP -->
|
|
|
|
+ <view class="iconfont icon-saoma" @click="scanCode">
|
|
|
|
+ </view>
|
|
|
|
+ <!-- #endif -->
|
|
</view>
|
|
</view>
|
|
- <!-- #ifdef H5 -->
|
|
|
|
- <view class="iconfont icon-saoma" @click="scanCode"></view>
|
|
|
|
- <!-- #endif -->
|
|
|
|
- <!-- #ifdef MP || MP-WEIXIN || APP -->
|
|
|
|
- <view class="iconfont icon-saoma" @click="scanCode">
|
|
|
|
|
|
+ <view class="tips-box">
|
|
|
|
+ <view class="tips mt-30">注意事项:</view>
|
|
|
|
+ <view class="tips-samll" v-for="item in rechargeAttention" :key="item">
|
|
|
|
+ {{ item }}
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- <!-- #endif -->
|
|
|
|
</view>
|
|
</view>
|
|
- <view class="tips-box">
|
|
|
|
- <view class="tips mt-30">注意事项:</view>
|
|
|
|
- <view class="tips-samll" v-for="item in rechargeAttention" :key="item">
|
|
|
|
- {{ item }}
|
|
|
|
|
|
+ <view class="tip" v-else>
|
|
|
|
+ <view class='input'><text>¥</text><input @input='inputNum' :maxlength="moneyMaxLeng"
|
|
|
|
+ placeholder="0.00" type='digit' placeholder-class='placeholder' :value="number"
|
|
|
|
+ name="number"></input></view>
|
|
|
|
+ <view class="tips-title" v-if="is_gq != 1">
|
|
|
|
+ <view style="font-weight: bold; font-size: 26rpx;">提示:</view>
|
|
|
|
+ <view style="margin-top: 10rpx;">当前可转入佣金为 <text
|
|
|
|
+ class='font-color'>¥{{userinfo.commissionCount || 0}}</text>,冻结佣金为<text
|
|
|
|
+ class='font-color'>¥{{userinfo.broken_commission}}</text></view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="tip" v-else>
|
|
|
|
- <view class='input'><text>¥</text><input @input='inputNum' :maxlength="moneyMaxLeng"
|
|
|
|
- placeholder="0.00" type='digit' placeholder-class='placeholder' :value="number"
|
|
|
|
- name="number"></input></view>
|
|
|
|
- <view class="tips-title">
|
|
|
|
- <view style="font-weight: bold; font-size: 26rpx;">提示:</view>
|
|
|
|
- <view style="margin-top: 10rpx;">当前可转入佣金为 <text
|
|
|
|
- class='font-color'>¥{{userinfo.commissionCount || 0}}</text>,冻结佣金为<text
|
|
|
|
- class='font-color'>¥{{userinfo.broken_commission}}</text></view>
|
|
|
|
- </view>
|
|
|
|
- <view class="tips-box">
|
|
|
|
- <view class="tips mt-30">注意事项:</view>
|
|
|
|
- <view class="tips-samll" v-for="item in rechargeAttention" :key="item">
|
|
|
|
- {{ item }}
|
|
|
|
|
|
+ <view class="tips-box" v-if="is_gq != 1">
|
|
|
|
+ <view class="tips mt-30">注意事项:</view>
|
|
|
|
+ <view class="tips-samll" v-for="item in rechargeAttention" :key="item">
|
|
|
|
+ {{ item }}
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <button class='but bg-color' formType="submit"> {{active ? '立即转入': '立即充值' }}</button>
|
|
|
|
|
|
+ <button class='but bg-color' formType="submit" v-if="is_gq != 1"> {{active ? '立即转入': '立即充值' }}</button>
|
|
|
|
+ <button class='but bg-color' formType="submit" v-else>提现</button>
|
|
</view>
|
|
</view>
|
|
</form>
|
|
</form>
|
|
<payment :payMode="payMode" :pay_close="pay_close" :is-call="true" @changePayType="changePayType"
|
|
<payment :payMode="payMode" :pay_close="pay_close" :is-call="true" @changePayType="changePayType"
|
|
@@ -87,7 +94,9 @@
|
|
rechargeRecharge,
|
|
rechargeRecharge,
|
|
rechargeWechat,
|
|
rechargeWechat,
|
|
getRechargeApi,
|
|
getRechargeApi,
|
|
- memberCardCreate
|
|
|
|
|
|
+ memberCardCreate,
|
|
|
|
+ getStaffInfo,
|
|
|
|
+ equityWithdrawal
|
|
} from '@/api/user.js';
|
|
} from '@/api/user.js';
|
|
import payment from '@/components/payment';
|
|
import payment from '@/components/payment';
|
|
import {
|
|
import {
|
|
@@ -113,6 +122,8 @@
|
|
data() {
|
|
data() {
|
|
let that = this;
|
|
let that = this;
|
|
return {
|
|
return {
|
|
|
|
+ staffInfo: {},
|
|
|
|
+ is_gq: 0,
|
|
now_money: 0,
|
|
now_money: 0,
|
|
navRecharge: ['账户充值', '佣金转入'],
|
|
navRecharge: ['账户充值', '佣金转入'],
|
|
active: 0,
|
|
active: 0,
|
|
@@ -185,11 +196,18 @@
|
|
} else {
|
|
} else {
|
|
toLogin();
|
|
toLogin();
|
|
}
|
|
}
|
|
|
|
+ if(options.is_gq) {
|
|
|
|
+ this.is_gq = options.is_gq
|
|
|
|
+ this.active = 1
|
|
|
|
+ }
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
uni.removeStorageSync('form_type_cart');
|
|
uni.removeStorageSync('form_type_cart');
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ goTx() {
|
|
|
|
+ console.log(this.number)
|
|
|
|
+ },
|
|
scanCode() {
|
|
scanCode() {
|
|
var self = this;
|
|
var self = this;
|
|
// #ifdef MP || APP
|
|
// #ifdef MP || APP
|
|
@@ -301,6 +319,18 @@
|
|
let that = this;
|
|
let that = this;
|
|
getUserInfo().then(res => {
|
|
getUserInfo().then(res => {
|
|
that.$set(that, 'userinfo', res.data);
|
|
that.$set(that, 'userinfo', res.data);
|
|
|
|
+ if(that.is_gq == 1) {
|
|
|
|
+ that.getStaffInfo()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getStaffInfo() {
|
|
|
|
+ let that =this
|
|
|
|
+ getStaffInfo({
|
|
|
|
+ uid: that.userinfo.uid
|
|
|
|
+ }).then(res => {
|
|
|
|
+ that.staffInfo = res.data.list[0]
|
|
|
|
+
|
|
})
|
|
})
|
|
},
|
|
},
|
|
changePayType: function(e) {
|
|
changePayType: function(e) {
|
|
@@ -463,63 +493,88 @@
|
|
submitSub: function(e) {
|
|
submitSub: function(e) {
|
|
let that = this
|
|
let that = this
|
|
let value = e.detail.value.number;
|
|
let value = e.detail.value.number;
|
|
- // 转入余额
|
|
|
|
- if (that.active) {
|
|
|
|
|
|
+ if(that.is_gq == 1) {
|
|
|
|
+ console.log(value)
|
|
if (parseFloat(value) < 0 || parseFloat(value) == NaN || value == undefined || value == "") {
|
|
if (parseFloat(value) < 0 || parseFloat(value) == NaN || value == undefined || value == "") {
|
|
return that.$util.Tips({
|
|
return that.$util.Tips({
|
|
title: '请输入金额'
|
|
title: '请输入金额'
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- uni.showModal({
|
|
|
|
- title: '转入余额',
|
|
|
|
- content: '转入余额后无法再次转出,确认是否转入余额',
|
|
|
|
- success(res) {
|
|
|
|
- if (res.confirm) {
|
|
|
|
- // #ifdef MP || APP-PLUS
|
|
|
|
- rechargeRoutine({
|
|
|
|
- price: parseFloat(value),
|
|
|
|
- type: 1,
|
|
|
|
- bar_code:that.verify_code
|
|
|
|
- })
|
|
|
|
- // #endif
|
|
|
|
- // #ifdef H5
|
|
|
|
- rechargeWechat({
|
|
|
|
|
|
+ if(parseFloat(value) >parseFloat(that.staffInfo.shareholding)) {
|
|
|
|
+ return that.$util.Tips({
|
|
|
|
+ title: '您当前的股权不足'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ equityWithdrawal({
|
|
|
|
+ shareholding:value,
|
|
|
|
+ uid: that.userinfo.uid
|
|
|
|
+ }).then(res => {
|
|
|
|
+ that.$util.Tips({
|
|
|
|
+ title: '提交成功',
|
|
|
|
+ icon: 'success'
|
|
|
|
+ })
|
|
|
|
+ that.getStaffInfo()
|
|
|
|
+ })
|
|
|
|
+ }else {
|
|
|
|
+ // 转入余额
|
|
|
|
+ if (that.active) {
|
|
|
|
+ if (parseFloat(value) < 0 || parseFloat(value) == NaN || value == undefined || value == "") {
|
|
|
|
+ return that.$util.Tips({
|
|
|
|
+ title: '请输入金额'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '转入余额',
|
|
|
|
+ content: '转入余额后无法再次转出,确认是否转入余额',
|
|
|
|
+ success(res) {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ // #ifdef MP || APP-PLUS
|
|
|
|
+ rechargeRoutine({
|
|
price: parseFloat(value),
|
|
price: parseFloat(value),
|
|
- from: that.from,
|
|
|
|
type: 1,
|
|
type: 1,
|
|
bar_code:that.verify_code
|
|
bar_code:that.verify_code
|
|
})
|
|
})
|
|
// #endif
|
|
// #endif
|
|
- .then(res => {
|
|
|
|
- // that.$set(that, 'userinfo.now_money', that.$util.$h.Add(value, that.userinfo.now_money))
|
|
|
|
- return that.$util.Tips({
|
|
|
|
- title: '转入成功',
|
|
|
|
- icon: 'success'
|
|
|
|
- }, {
|
|
|
|
- tab: 5,
|
|
|
|
- url: '/pages/users/user_money/index'
|
|
|
|
- });
|
|
|
|
- }).catch(err => {
|
|
|
|
- return that.$util.Tips({
|
|
|
|
- title: err
|
|
|
|
|
|
+ // #ifdef H5
|
|
|
|
+ rechargeWechat({
|
|
|
|
+ price: parseFloat(value),
|
|
|
|
+ from: that.from,
|
|
|
|
+ type: 1,
|
|
|
|
+ bar_code:that.verify_code
|
|
})
|
|
})
|
|
|
|
+ // #endif
|
|
|
|
+ .then(res => {
|
|
|
|
+ // that.$set(that, 'userinfo.now_money', that.$util.$h.Add(value, that.userinfo.now_money))
|
|
|
|
+ return that.$util.Tips({
|
|
|
|
+ title: '转入成功',
|
|
|
|
+ icon: 'success'
|
|
|
|
+ }, {
|
|
|
|
+ tab: 5,
|
|
|
|
+ url: '/pages/users/user_money/index'
|
|
|
|
+ });
|
|
|
|
+ }).catch(err => {
|
|
|
|
+ return that.$util.Tips({
|
|
|
|
+ title: err
|
|
|
|
+ })
|
|
|
|
+ });
|
|
|
|
+ } else if (res.cancel) {
|
|
|
|
+ return that.$util.Tips({
|
|
|
|
+ title: '已取消'
|
|
});
|
|
});
|
|
- } else if (res.cancel) {
|
|
|
|
- return that.$util.Tips({
|
|
|
|
- title: '已取消'
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- // #ifdef MP
|
|
|
|
- this.pay_close = true;
|
|
|
|
- // #endif
|
|
|
|
- // #ifndef MP
|
|
|
|
- this.pay_close = true;
|
|
|
|
- // #endif
|
|
|
|
- this.totalPrice = this.rechar_id == 0 ? parseFloat(this.money) : parseFloat(this.numberPic);
|
|
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ // #ifdef MP
|
|
|
|
+ this.pay_close = true;
|
|
|
|
+ // #endif
|
|
|
|
+ // #ifndef MP
|
|
|
|
+ this.pay_close = true;
|
|
|
|
+ // #endif
|
|
|
|
+ this.totalPrice = this.rechar_id == 0 ? parseFloat(this.money) : parseFloat(this.numberPic);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|