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

1.修改工行提现充值;

parent 0959693a
...@@ -9,16 +9,19 @@ ...@@ -9,16 +9,19 @@
</view> </view>
<!-- 卡号显示 --> <!-- 卡号显示 -->
<view class="cardNum"> <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 class="cardNumright" id="cardNumright" @click="CopyCardNumber">复制</view>
</view> </view>
<view class="HidenText"> <view class="HidenText">
<view class="userName">姓名:<span>张三</span></view> <view class="userName">姓名:<span>{{PersonalInfo.name}}</span></view>
<view class="StudentCls" v-if="PersonalInfo.usertype=='1'">班级:高一(63班)</view> <view class="StudentCls" v-if="PersonalInfo.usertype=='1'">
班级:{{PersonalInfo.gradename}}({{PersonalInfo.classname}})</view>
<view class='TeacherCls' v-else>教职工</view> <view class='TeacherCls' v-else>教职工</view>
</view> </view>
<view class="Balance"> <view class="Balance">
<view class="cardBalanceTx">余额:¥<span>0.00</span></view> <view class="cardBalanceTx">余额:¥<span>{{cardBalanceTx}}</span></view>
<view @click="ToWalletTx"> <view @click="ToWalletTx">
<span style="display: inline-block;padding-right: 10rpx;">余额提现</span> <span style="display: inline-block;padding-right: 10rpx;">余额提现</span>
<image style="position: relative;width: 13rpx;height: 20rpx;" class='ImgIcon1' mode='widthFix' <image style="position: relative;width: 13rpx;height: 20rpx;" class='ImgIcon1' mode='widthFix'
...@@ -53,7 +56,7 @@ ...@@ -53,7 +56,7 @@
<view class="depositbox"> <view class="depositbox">
<image mode='widthFix' class="depositImg" src="../../../static/img/depositIcon.png"></image> <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 <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>
<!-- 充值其它金额 --> <!-- 充值其它金额 -->
<view class="OtherMoney" v-if="isOtherMoney"> <view class="OtherMoney" v-if="isOtherMoney">
...@@ -69,7 +72,7 @@ ...@@ -69,7 +72,7 @@
<!-- <view class="" style="height: 1rpx;background-color: #DFDFDF;"></view> --> <!-- <view class="" style="height: 1rpx;background-color: #DFDFDF;"></view> -->
<!-- 充值生活费 --> <!-- 充值生活费 -->
<view class="bottomdiv"> <view class="bottomdiv">
<view class="DepositID" @click="toDeposit(0)" <view class="DepositID" @click="toDeposit"
v-bind:style="Money!=''?'':'background: #e6e6e6 !important;'"> v-bind:style="Money!=''?'':'background: #e6e6e6 !important;'">
<span>充值生活费</span> <span>充值生活费</span>
</view> </view>
...@@ -83,8 +86,8 @@ ...@@ -83,8 +86,8 @@
<view class="OtherTitle">充值金额</view> <view class="OtherTitle">充值金额</view>
<view class="inputOtherM"> <view class="inputOtherM">
<span></span> <span></span>
<input @focus="openKeyBoard('number')" v-model="inputOtherM" @input="inputControl" <input v-model="inputOtherM" @input="inputControl" placeholder-class="placeholderinputOtherM"
placeholder-class="placeholderinputOtherM" type="text" maxlength="6" /> type="text" maxlength="6" />
</view> </view>
<view class="OtherLine"></view> <view class="OtherLine"></view>
<!-- 充值范围 --> <!-- 充值范围 -->
...@@ -107,8 +110,11 @@ ...@@ -107,8 +110,11 @@
</view> </view>
<view style="width: 520rpx;height: 1rpx;background: #EEEEEE;"></view> <view style="width: 520rpx;height: 1rpx;background: #EEEEEE;"></view>
<view class="ContenInfo"> <view class="ContenInfo">
<view class=""> <view class="" v-if="isOtherMoney">
充值金额:50元 充值金额:{{inputOtherM}}
</view>
<view class="" v-else>
充值金额:{{Money}}
</view> </view>
<view class=""> <view class="">
付款账户:浦发银行(6926) 付款账户:浦发银行(6926)
...@@ -117,19 +123,16 @@ ...@@ -117,19 +123,16 @@
<view style="width: 520rpx;height: 1rpx;background: #EEEEEE;"></view> <view style="width: 520rpx;height: 1rpx;background: #EEEEEE;"></view>
<!-- 取消 确认充值按钮 --> <!-- 取消 确认充值按钮 -->
<view class="BtngGoup"> <view class="BtngGoup">
<view class=""> <view class="" @click="close()">
取消 取消
</view> </view>
<view class=""> <view class="" @click="ExchangeRecharge">
确认充值 确认充值
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<!-- 数字键盘 -->
<keyboard-package ref="number" @onInput="onInput" @onDelete="onDelete" @onConfirm="onConfirm"
:disableDot="false" />
</view> </view>
</template> </template>
...@@ -186,10 +189,13 @@ ...@@ -186,10 +189,13 @@
CodeMsg: "获取验证码", CodeMsg: "获取验证码",
type: 'number', type: 'number',
PersonalInfo: { PersonalInfo: {
schoolname: "微微学测试", schoolname: "",
name: "李智书", name: "",
usertype: "1" usertype: "1"
}, },
bankInfo_: {
accountNo: '**** **** **** 1234'
},
ImgUrl: this.$ImgUrl, ImgUrl: this.$ImgUrl,
MoneyList: Array(6).fill(1).map((v, index) => { MoneyList: Array(6).fill(1).map((v, index) => {
return { return {
...@@ -210,10 +216,7 @@ ...@@ -210,10 +216,7 @@
sessionID = options['seesionID'] || ''; sessionID = options['seesionID'] || '';
fromType = options['fromType'] || ''; fromType = options['fromType'] || '';
bankInfo.sessionid = sessionID || ''; bankInfo.sessionid = sessionID || '';
this.queryUserBankInfo()
this.QueryUserInfo() this.QueryUserInfo()
this.queryBankInfo()
}, },
created: function() { created: function() {
...@@ -222,6 +225,39 @@ ...@@ -222,6 +225,39 @@
}, },
methods: { 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) { inputControl(e) {
let this_ = this let this_ = this
...@@ -247,9 +283,103 @@ ...@@ -247,9 +283,103 @@
document.scrollingElement.scrollTo(0, this.scrollTop); 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() { async CopyCardNumber() {
let value = "sdfsdf" let value = this.bankInfo_.accountNo
Dialog({ Dialog({
title: '系统提示', title: '系统提示',
message: '复制成功!' message: '复制成功!'
...@@ -430,8 +560,14 @@ ...@@ -430,8 +560,14 @@
}, },
success: function(res2) { success: function(res2) {
if (res2.code == "10000") { if (res2.code == "10000") {
if (!res2.results) {
weui.topTips("获取用户银行信息失败!")
return
}
bankInfo = res2.results; bankInfo = res2.results;
bankInfo.sessionid = sessionID;
this_.queryBankInfo(); this_.queryBankInfo();
this_.bankInfo_ = bankInfo
} else { } else {
weui.topTips(res2.message) weui.topTips(res2.message)
} }
...@@ -459,9 +595,7 @@ ...@@ -459,9 +595,7 @@
if (res1.code == "10000") { if (res1.code == "10000") {
bankInfo.schoolId = res1.results.schoolid; bankInfo.schoolId = res1.results.schoolid;
bankInfo.userId = res1.results.id; bankInfo.userId = res1.results.id;
$('.userNameTx').html(res1.results.name); this_.PersonalInfo = res1.results
$('.schoolNameTx').html(res1.results.schoolname);
$('.ClsNameTx').html(res1.results.gradename + res1.results.classname);
if (res1.results.usertype == 1) { if (res1.results.usertype == 1) {
$('.StudentCls').css('display', 'block'); $('.StudentCls').css('display', 'block');
$('.TeacherCls').css('display', 'none'); $('.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