Commit 064a7416 authored by 李智书's avatar 李智书

1.提交更新;

parent 204d58d1
...@@ -168,6 +168,23 @@ ...@@ -168,6 +168,23 @@
sessionid: '', sessionid: '',
wechattype: 1 wechattype: 1
} }
/**
* 对象转拼接字符串
* @param {*} res Object 需要转换的数据对象
*/
function OforS(res) {
var resL = 0;
var outS = "";
for (var i in res) {
if (resL == 0) {
outS += "" + i + "=" + res[i];
} else {
outS += "&" + i + "=" + res[i];
}
resL++;
}
return outS;
}
export default { export default {
components: { components: {
keyboardPackage keyboardPackage
...@@ -258,6 +275,25 @@ ...@@ -258,6 +275,25 @@
close() { close() {
this.$refs.popup.close() this.$refs.popup.close()
}, },
//切换到提现
ToWalletTx() {
$('#DepositBox').css('display', 'none');
$('#TxWalletBox').css('display', 'block');
// $('.TitleHeader').html('电子账户提现');
$('.doBtnTx').html('提现');
opeType = 1;
uni.navigateTo({
url: "../Reflect/Reflect?" + OforS({
sessionID: sessionID,
userID: userID
})
})
},
//全部提现
TxAllFun() {
this.ReflectMoney = this.cardBalanceTx * 1
// $('.TxClsTx').val($('.cardBalanceTx')[0].textContent * 1);
},
// 输入限制 // 输入限制
inputControl(e) { inputControl(e) {
let this_ = this let this_ = this
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
<view class="OtherMoney" v-if="true"> <view class="OtherMoney" v-if="true">
<span></span> <span></span>
<input class="TxClsTx" v-model="inputOtherM" @input="inputControl" @blur="ReturnToTop" <input class="TxClsTx" v-model="inputOtherM" @input="inputControl" @blur="ReturnToTop"
placeholder="可提现金额3.00元" placeholder-class="placeholderinputOtherM" type="text" maxlength="6" /> :placeholder="placeholder" placeholder-class="placeholderinputOtherM" type="text" maxlength="6" />
<span class="ALL">全部</span> <span class="ALL" @click="TxAllFun">全部</span>
</view> </view>
<view class="OtherMoney" v-if="false" style="color: #BFBFBF;font-weight: 500;"> <view class="OtherMoney" v-if="false" style="color: #BFBFBF;font-weight: 500;">
每日仅可提现一次,请明日再来。 每日仅可提现一次,请明日再来。
...@@ -64,13 +64,16 @@ ...@@ -64,13 +64,16 @@
Money: '', Money: '',
inputOtherM: '', inputOtherM: '',
ImgUrl: this.$ImgUrl, ImgUrl: this.$ImgUrl,
ReflectMoney: 3,
cardBalanceTx: '',
placeholder: "可提现金额3.00元"
} }
}, },
onLoad: function(options) { onLoad: function(options) {
console.log(options); console.log(options);
// 初始化 // 初始化
userID = options['userID'] || ''; userID = options['userID'] || '';
sessionID = options['seesionID'] || ''; sessionID = options['sessionID'] || '';
fromType = options['fromType'] || ''; fromType = options['fromType'] || '';
bankInfo.sessionid = sessionID || ''; bankInfo.sessionid = sessionID || '';
this.QueryUserInfo() this.QueryUserInfo()
...@@ -82,6 +85,110 @@ ...@@ -82,6 +85,110 @@
}, },
methods: { methods: {
//全部提现
TxAllFun() {
let this_ = this
this.inputOtherM = this.cardBalanceTx * 1
this.$nextTick(function() {
if (this_.inputOtherM == '' || this_.inputOtherM * 1 < 3) {
$('.DepositID').attr('style', 'background: rgb(230, 230, 230) !important;');
} else {
$('.DepositID').removeAttr('style');
}
})
},
//
async toDeposit() {
if (!this.inputOtherM) {
uni.showModal({
title: "系统提示",
content: "请输入要提现的金额!"
})
return
}
if (this.inputOtherM * 1 < 0.01) {
weui.topTips('提现金额须大于等于0.01元');
return
}
if (this.inputOtherM * 1 > this.ReflectMoney) {
weui.topTips(`提现金额不可大于账户余额`);
return
}
await this.ExchangeWithdraw()
},
// 提现
async ExchangeWithdraw() {
let this_ = this;
let loading = weui.loading('请稍后');
$.ajax({
url: gHost + '/bank-wechat/icbc/account/exchange/withdraw',
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: {
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
amount: this.inputOtherM * 1,
bindMedium: "6217002920110643831",
summary: "提现",
},
headers: {
'sessionid': sessionID,
},
success: function(res5) {
loading.hide();
if (res5.code == "10000") {
this_.ExchangeWithdrawQuery(res5.results.flowId, res5.results.corpSerno);
} else {
weui.topTips(res5.message)
}
},
error: function(err) {
loading.hide();
},
});
},
// 充值结果查询
async ExchangeWithdrawQuery(flowId, oriCorpSerno) {
let this_ = this;
let loading = weui.loading('请稍后');
$.ajax({
url: gHost + '/bank-wechat/icbc/account/exchange/withdrawQuery',
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: {
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
flowId: flowId,
oriCorpSerno: oriCorpSerno,
},
headers: {
'sessionid': sessionID,
},
success: function(res5) {
loading.hide();
if (res5.code == "10000") {
uni.showModal({
title: "系统提示",
content: "提现成功!"
})
} else {
weui.topTips(res5.message)
uni.showModal({
title: "系统提示",
content: res5.message
})
}
},
error: function(err) {
loading.hide();
},
});
},
// 输入限制 // 输入限制
inputControl(e) { inputControl(e) {
let this_ = this let this_ = this
...@@ -252,9 +359,8 @@ ...@@ -252,9 +359,8 @@
this_.cardBalanceTx = ((res3.results.acctInfoList[0].hqBalanceDTOList[0] this_.cardBalanceTx = ((res3.results.acctInfoList[0].hqBalanceDTOList[0]
.balance * .balance *
1).toFixed(2)); 1).toFixed(2));
$('.TxClsTx').attr('placeholder', this_.placeholder =
`可提现金额${(res3.results.acctInfoList[0].hqBalanceDTOList[0].balance*1).toFixed(2)}元` `可提现金额${(res3.results.acctInfoList[0].hqBalanceDTOList[0].balance*1).toFixed(2)}元`
)
this_.RechargeMax = ((2000 - ((res3.results.acctInfoList[0] this_.RechargeMax = ((2000 - ((res3.results.acctInfoList[0]
.hqBalanceDTOList[0] .hqBalanceDTOList[0]
.balance * 1).toFixed(2) * 1)).toFixed(2)); .balance * 1).toFixed(2) * 1)).toFixed(2));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment