|
@@ -3,7 +3,8 @@
|
|
|
<view class="content-money">
|
|
|
<view class="flex">
|
|
|
<view class="buttom">
|
|
|
- <view class="icon" >{{ userInfo.brokerage_price | getMoneyStyle }}</view>
|
|
|
+ <view class="icon" v-if="type == 'yj'">{{ userInfo.brokerage_price | getMoneyStyle }}</view>
|
|
|
+ <view class="icon" v-if="type == 'yue'">{{ userInfo.now_money | getMoneyStyle }}</view>
|
|
|
<text class="text">可转账余额</text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -19,7 +20,8 @@
|
|
|
<!-- <text class="tit">¥</text> -->
|
|
|
<input class="input" type="number" v-model="withdrawal" placeholder="转入金额"
|
|
|
placeholder-class="placeholder" />
|
|
|
- <view class="buttom" @click="withdrawal = userInfo.brokerage_price*1" >全部转账</view>
|
|
|
+ <view class="buttom" v-if="type == 'yj'" @click="withdrawal = userInfo.brokerage_price*1" >全部转账</view>
|
|
|
+ <view class="buttom" v-if="type == 'yue'" @click="withdrawal = userInfo.now_money*1" >全部转账</view>
|
|
|
<!-- <view class="buttom" @click="withdrawal = userInfo.dynamic_integral" v-if="type== 2">全部转账</view> -->
|
|
|
</view>
|
|
|
</view>
|
|
@@ -33,7 +35,8 @@
|
|
|
} from '@/utils/rocessor.js';
|
|
|
import {
|
|
|
getUserInfo,
|
|
|
- jfzz
|
|
|
+ jfzz,
|
|
|
+ yuezz
|
|
|
} from '@/api/user.js';
|
|
|
import {
|
|
|
mapMutations,
|
|
@@ -55,7 +58,7 @@
|
|
|
weichatBsrowser: false,
|
|
|
// #endif
|
|
|
loding: false,
|
|
|
- type: 0
|
|
|
+ type: 'yj'
|
|
|
};
|
|
|
},
|
|
|
onLoad(options) {
|
|
@@ -109,26 +112,51 @@
|
|
|
price: obj.withdrawal ,//金额
|
|
|
// type: obj.type
|
|
|
};
|
|
|
- jfzz(data)
|
|
|
- .then(e => {
|
|
|
-
|
|
|
- // 允许按钮点击
|
|
|
- obj.loding = false;
|
|
|
- // 初始化提现金额
|
|
|
- obj.withdrawal = '';
|
|
|
- uni.showToast({
|
|
|
- title: '转账成功',
|
|
|
- duration: 2000,
|
|
|
- position: 'top'
|
|
|
+ if(obj.type == 'yj') {
|
|
|
+ jfzz(data)
|
|
|
+ .then(e => {
|
|
|
+
|
|
|
+ // 允许按钮点击
|
|
|
+ obj.loding = false;
|
|
|
+ // 初始化提现金额
|
|
|
+ obj.withdrawal = '';
|
|
|
+ uni.showToast({
|
|
|
+ title: '转账成功',
|
|
|
+ duration: 2000,
|
|
|
+ position: 'top'
|
|
|
+ });
|
|
|
+ obj.dataUp();
|
|
|
+ obj.cancel()
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ obj.$api.msg(e.msg);
|
|
|
+ obj.loding = false;
|
|
|
+ console.log();
|
|
|
});
|
|
|
- obj.dataUp();
|
|
|
- obj.cancel()
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- obj.$api.msg(e.msg);
|
|
|
- obj.loding = false;
|
|
|
- console.log();
|
|
|
- });
|
|
|
+ }
|
|
|
+ if(obj.type == 'yue') {
|
|
|
+ yuezz(data)
|
|
|
+ .then(e => {
|
|
|
+
|
|
|
+ // 允许按钮点击
|
|
|
+ obj.loding = false;
|
|
|
+ // 初始化提现金额
|
|
|
+ obj.withdrawal = '';
|
|
|
+ uni.showToast({
|
|
|
+ title: '转账成功',
|
|
|
+ duration: 2000,
|
|
|
+ position: 'top'
|
|
|
+ });
|
|
|
+ obj.dataUp();
|
|
|
+ obj.cancel()
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ obj.$api.msg(e.msg);
|
|
|
+ obj.loding = false;
|
|
|
+ console.log();
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
boblack() {
|
|
|
uni.navigateBack({
|