|
@@ -11,7 +11,7 @@
|
|
|
<view class="nav acea-row row-around row-middle">
|
|
|
<view class="item" :class="active==index?'on':''" v-for="(item,index) in navRecharge" :key="index" @click="navRecharges(index)">{{item}}</view>
|
|
|
</view>
|
|
|
- <view class='tip picList' v-if='!active' >
|
|
|
+ <view class='tip picList' v-if="active == 0" >
|
|
|
<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">
|
|
@@ -30,8 +30,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- </view>
|
|
|
- <view class="tip" v-else>
|
|
|
+ </view>
|
|
|
+ <!-- 佣金转余额 -->
|
|
|
+ <view class="tip" v-else-if="active ==1">
|
|
|
<view class='input'><text>¥</text><input @input='inputNum' :maxlength="moneyMaxLeng" placeholder="0.00" type='number' placeholder-class='placeholder' :value="number" name="number"></input></view>
|
|
|
<view class="tips-title">
|
|
|
<view style="font-weight: bold; font-size: 26rpx;">提示:</view>
|
|
@@ -43,8 +44,18 @@
|
|
|
{{ item }}
|
|
|
</view>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
+ <view class="tip" v-else>
|
|
|
+ <view class='input'><input placeholder="请输入收款人手机号" type='number' placeholder-class='placeholder' :value="to_phone" name="to_phone" style="width: 100%;padding-right: 0;"></input></view>
|
|
|
+ <view class='input'><text>¥</text><input @input='inputNum' :maxlength="moneyMaxLeng" placeholder="0.00" type='number' placeholder-class='placeholder' :value="number" name="number"></input></view>
|
|
|
+ <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>
|
|
|
- <button class='but bg-color' formType="submit" > {{active ? '立即转入': '立即充值' }}</button>
|
|
|
+ <button class='but bg-color' formType="submit" > {{active ? (active == 1?'立即转入':'立即转账'): '立即充值' }}</button>
|
|
|
</view>
|
|
|
</form>
|
|
|
<payment :payMode="payMode" :pay_close="pay_close" :is-call="true" @changePayType="changePayType" @onChangeFun="onChangeFun"
|
|
@@ -64,7 +75,8 @@
|
|
|
rechargeRecharge,
|
|
|
rechargeWechat,
|
|
|
getRechargeApi,
|
|
|
- memberCardCreate
|
|
|
+ memberCardCreate,
|
|
|
+ trade
|
|
|
} from '@/api/user.js';
|
|
|
import payment from '@/components/payment';
|
|
|
import {
|
|
@@ -91,9 +103,10 @@
|
|
|
let that = this;
|
|
|
return {
|
|
|
now_money: 0,
|
|
|
- navRecharge: ['账户充值', '佣金转入'],
|
|
|
+ navRecharge: ['账户充值', '佣金转入','余额转账'],
|
|
|
active: 0,
|
|
|
- number: '',
|
|
|
+ number: '',
|
|
|
+ to_phone: '',
|
|
|
userinfo: {},
|
|
|
placeholder: "0.00",
|
|
|
from: '',
|
|
@@ -417,7 +430,7 @@
|
|
|
let that = this
|
|
|
let value = e.detail.value.number;
|
|
|
// 转入余额
|
|
|
- if (that.active) {
|
|
|
+ if (that.active == 1) {
|
|
|
if (parseFloat(value) < 0 || parseFloat(value) == NaN || value == undefined || value == "") {
|
|
|
return that.$util.Tips({
|
|
|
title: '请输入金额'
|
|
@@ -462,7 +475,7 @@
|
|
|
}
|
|
|
},
|
|
|
})
|
|
|
- } else {
|
|
|
+ } else if(that.active == 0){
|
|
|
// #ifdef MP
|
|
|
this.pay_close = true;
|
|
|
// #endif
|
|
@@ -470,6 +483,25 @@
|
|
|
this.pay_close = true;
|
|
|
// #endif
|
|
|
this.totalPrice = this.rechar_id == 0 ? parseFloat(this.money) : parseFloat(this.numberPic);
|
|
|
+ } else {
|
|
|
+ let to_phone = e.detail.value.to_phone
|
|
|
+ console.log(value,'ddddd')
|
|
|
+ trade({
|
|
|
+ to_phone: to_phone,
|
|
|
+ money: value*1
|
|
|
+ }).then(res => {
|
|
|
+ return that.$util.Tips({
|
|
|
+ title: '转账成功',
|
|
|
+ icon: 'success'
|
|
|
+ }, {
|
|
|
+ tab: 5,
|
|
|
+ url: '/pages/users/user_money/index'
|
|
|
+ });
|
|
|
+ }).catch(err => {
|
|
|
+ return that.$util.Tips({
|
|
|
+ title: err
|
|
|
+ })
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
}
|