Commit d77af505 authored by 李智书's avatar 李智书

1.修改工行提现充值;

parent 0959693a
......@@ -9,16 +9,19 @@
</view>
<!-- 卡号显示 -->
<view class="cardNum">
<view class="cardNumleft"><span>账户:</span> **** **** **** 3925 <span>(平安III类户)</span></view>
<view class="cardNumleft"><span>账户:</span> **** **** ****
{{bankInfo_.accountNo.slice(bankInfo_.accountNo.length-4)}} <span>(工商III类户)</span>
</view>
<view class="cardNumright" id="cardNumright" @click="CopyCardNumber">复制</view>
</view>
<view class="HidenText">
<view class="userName">姓名:<span>张三</span></view>
<view class="StudentCls" v-if="PersonalInfo.usertype=='1'">班级:高一(63班)</view>
<view class="userName">姓名:<span>{{PersonalInfo.name}}</span></view>
<view class="StudentCls" v-if="PersonalInfo.usertype=='1'">
班级:{{PersonalInfo.gradename}}({{PersonalInfo.classname}})</view>
<view class='TeacherCls' v-else>教职工</view>
</view>
<view class="Balance">
<view class="cardBalanceTx">余额:¥<span>0.00</span></view>
<view class="cardBalanceTx">余额:¥<span>{{cardBalanceTx}}</span></view>
<view @click="ToWalletTx">
<span style="display: inline-block;padding-right: 10rpx;">余额提现</span>
<image style="position: relative;width: 13rpx;height: 20rpx;" class='ImgIcon1' mode='widthFix'
......@@ -53,7 +56,7 @@
<view class="depositbox">
<image mode='widthFix' class="depositImg" src="../../../static/img/depositIcon.png"></image>
<span style="vertical-align:middle;font-size: 28rpx;color: #333333;font-weight: 500;">最大可充值金额:<span
style="color:red;"><span class="canDepositTx">200000</span></span></span>
style="color:red;"><span class="canDepositTx">2000</span></span></span>
</view>
<!-- 充值其它金额 -->
<view class="OtherMoney" v-if="isOtherMoney">
......@@ -69,7 +72,7 @@
<!-- <view class="" style="height: 1rpx;background-color: #DFDFDF;"></view> -->
<!-- 充值生活费 -->
<view class="bottomdiv">
<view class="DepositID" @click="toDeposit(0)"
<view class="DepositID" @click="toDeposit"
v-bind:style="Money!=''?'':'background: #e6e6e6 !important;'">
<span>充值生活费</span>
</view>
......@@ -83,8 +86,8 @@
<view class="OtherTitle">充值金额</view>
<view class="inputOtherM">
<span></span>
<input @focus="openKeyBoard('number')" v-model="inputOtherM" @input="inputControl"
placeholder-class="placeholderinputOtherM" type="text" maxlength="6" />
<input v-model="inputOtherM" @input="inputControl" placeholder-class="placeholderinputOtherM"
type="text" maxlength="6" />
</view>
<view class="OtherLine"></view>
<!-- 充值范围 -->
......@@ -107,8 +110,11 @@
</view>
<view style="width: 520rpx;height: 1rpx;background: #EEEEEE;"></view>
<view class="ContenInfo">
<view class="">
充值金额:50元
<view class="" v-if="isOtherMoney">
充值金额:{{inputOtherM}}
</view>
<view class="" v-else>
充值金额:{{Money}}
</view>
<view class="">
付款账户:浦发银行(6926)
......@@ -117,19 +123,16 @@
<view style="width: 520rpx;height: 1rpx;background: #EEEEEE;"></view>
<!-- 取消 确认充值按钮 -->
<view class="BtngGoup">
<view class="">
<view class="" @click="close()">
取消
</view>
<view class="">
<view class="" @click="ExchangeRecharge">
确认充值
</view>
</view>
</view>
</view>
</uni-popup>
<!-- 数字键盘 -->
<keyboard-package ref="number" @onInput="onInput" @onDelete="onDelete" @onConfirm="onConfirm"
:disableDot="false" />
</view>
</template>
......@@ -186,10 +189,13 @@
CodeMsg: "获取验证码",
type: 'number',
PersonalInfo: {
schoolname: "微微学测试",
name: "李智书",
schoolname: "",
name: "",
usertype: "1"
},
bankInfo_: {
accountNo: '**** **** **** 1234'
},
ImgUrl: this.$ImgUrl,
MoneyList: Array(6).fill(1).map((v, index) => {
return {
......@@ -210,10 +216,7 @@
sessionID = options['seesionID'] || '';
fromType = options['fromType'] || '';
bankInfo.sessionid = sessionID || '';
this.queryUserBankInfo()
this.QueryUserInfo()
this.queryBankInfo()
},
created: function() {
......@@ -222,6 +225,39 @@
},
methods: {
// 验证码弹出框开启
toDeposit() {
if (this.isOtherMoney) {
if (this.inputOtherM == '') {
uni.showModal({
title: "系统提示",
content: "请输入要充值的金额!"
})
return
}
if (parseFloat(this.inputOtherM) * 1 < 3) {
weui.topTips('充值金额必须大于3元');
return
}
} else {
if (this.Money == '') {
uni.showModal({
title: "系统提示",
content: "请选择要充值的金额!"
})
return
}
if (parseFloat(this.inputOtherM) * 1 < 3) {
weui.topTips('充值金额必须大于3元');
return
}
}
this.$refs.popup.open('top')
},
// 验证码弹出框关闭
close() {
this.$refs.popup.close()
},
// 输入限制
inputControl(e) {
let this_ = this
......@@ -247,9 +283,103 @@
document.scrollingElement.scrollTo(0, this.scrollTop);
})
},
// 充值
async ExchangeRecharge() {
let amount,
bindMedium,
summary;
if (this.isOtherMoney) {
if (this.inputOtherM == '') {
uni.showModal({
title: "系统提示",
content: "请输入要充值的金额!"
})
return
}
amount = this.isOtherMoney * 1
} else {
if (this.Money == '') {
uni.showModal({
title: "系统提示",
content: "请选择要充值的金额!"
})
return
}
amount = this.Money * 1
}
let this_ = this;
let loading = weui.loading('请稍后');
$.ajax({
url: gHost + '/bank-wechat/icbc/account/exchange/recharge',
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: {
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1,
amount: amount,
bindMedium: "6217002920110643831",
summary: "充值",
},
headers: {
'sessionid': sessionID,
},
success: function(res5) {
loading.hide();
if (res5.code == "10000") {
this_.ExchangeRechargeQuery(res5.results.flowId, res5.results.corpSerno);
} else {
weui.topTips(res5.message)
}
},
error: function(err) {
loading.hide();
},
});
},
// 充值结果查询
async ExchangeRechargeQuery(flowId, oriCorpSerno) {
let this_ = this;
let loading = weui.loading('请稍后');
$.ajax({
url: gHost + '/bank-wechat/icbc/account/exchange/rechargeQuery',
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();
},
});
},
// 复制我卡号
async CopyCardNumber() {
let value = "sdfsdf"
let value = this.bankInfo_.accountNo
Dialog({
title: '系统提示',
message: '复制成功!'
......@@ -430,8 +560,14 @@
},
success: function(res2) {
if (res2.code == "10000") {
if (!res2.results) {
weui.topTips("获取用户银行信息失败!")
return
}
bankInfo = res2.results;
bankInfo.sessionid = sessionID;
this_.queryBankInfo();
this_.bankInfo_ = bankInfo
} else {
weui.topTips(res2.message)
}
......@@ -459,9 +595,7 @@
if (res1.code == "10000") {
bankInfo.schoolId = res1.results.schoolid;
bankInfo.userId = res1.results.id;
$('.userNameTx').html(res1.results.name);
$('.schoolNameTx').html(res1.results.schoolname);
$('.ClsNameTx').html(res1.results.gradename + res1.results.classname);
this_.PersonalInfo = res1.results
if (res1.results.usertype == 1) {
$('.StudentCls').css('display', 'block');
$('.TeacherCls').css('display', 'none');
......
This diff is collapsed.
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