Commit b9e23711 authored by 符伟's avatar 符伟

Merge branch 'develop' of https://git.xiaopay.net/lizhishu/xzf_uniapp-wechat-web into develop

parents 802f073c 6f054bb6
......@@ -10,7 +10,8 @@
<!-- 卡号显示 -->
<view class="cardNum">
<view class="cardNumleft"><span>账户:</span> **** **** ****
{{bankInfo_.accountNo.slice(bankInfo_.accountNo.length-4)}} <span>(工商III类户)</span>
{{bankInfo_.accountNo.slice(bankInfo_.accountNo.length-4)}}
<span>({{accountEnum[bankInfo_.accountType+'']}}III类户)</span>
</view>
<view class="cardNumright" id="cardNumright" @click="CopyCardNumber">复制</view>
</view>
......@@ -43,7 +44,6 @@
<view class="depotMoney" @click="depotMoney(item.value,index)"
v-bind:class="(MoneyIndex==index)?'choiceClass':''" :data-money="item.value||0"
v-for="(item,index) in MoneyList" :key="index">
<span class="value">
{{item.value}}
</span>
......@@ -110,28 +110,22 @@
<image src="../../../static/img/close.png" mode="aspectFit"></image>
</view>
<view class="RechargeInfo1">
充值生活费
验证校园卡开卡手机号
</view>
<van-field label-class="openCardPhonTxt" label="手机号:" maxlength="11" v-model="openCardPhon"
placeholder="校园卡开卡手机号" center :border="false" />
<view style="width: 520rpx;height: 1rpx;background: #EEEEEE;"></view>
<view class="ContenInfo">
<view class="" v-if="isOtherMoney">
充值金额:{{inputOtherM}}
</view>
<view class="" v-else>
充值金额:{{Money}}
</view>
<view class="">
付款账户:{{bankInfo_.bindCardName}}({{bankInfo_.bindCardNo && bankInfo_.bindCardNo.slice(bankInfo_.accountNo.length-4)}})
</view>
</view>
<van-field v-model="openCardPhonSms" label-class="openCardPhonSmsTxt" maxlength="6" label="验证码:"
placeholder="输入短信验证码" center clearable :border="false">
<van-button slot="button" size="small" type="primary" @click="SendSms">
{{CodeMsg}}
</van-button>
</van-field>
<view style="width: 520rpx;height: 1rpx;background: #EEEEEE;"></view>
<!-- 取消 确认充值按钮 -->
<view class="BtngGoup">
<view class="" @click="close()">
取消
</view>
<view class="" @click="ExchangeRecharge">
确认充值
充值
</view>
</view>
</view>
......@@ -179,7 +173,6 @@
var businessNo = '',
otpOrderNo = '',
mobileNo = '';
var msCount = 60; //定时器
var MyTimer = null;
var fromType = 0; //0转账 1提现
var opeType = 0; //0充值 1提现 手机号验证
......@@ -244,7 +237,7 @@
MoneyList: Array(5).fill(1).map((v, index) => {
return {
lable: index == 4 ? '其他金额' : '',
value: index == 4 ? '' : 50 * (index + 1) +50,
value: index == 4 ? '' : 50 * (index + 1) + 50,
tips: index == 1 ? "推荐充值" : null
}
}),
......@@ -252,7 +245,23 @@
tempFiles1: '../../static/img/idCardBg1.png', //上传身份证临时选择文件
tempFiles2: '../../static/img/idCardBg0.png',
//绑定的一类卡列表
bindcardList: []
bindcardList: [],
// 20211126 银行账户类型
accountType: '2',
// 银行账户类型名称枚举
accountEnum: {
'1': "平安银行",
'2': "工商银行",
'3': "交通银行",
},
/**
* 20211129新增
*/
// 充值手机号码
openCardPhon: "",
openCardPhonSms: "",
msCount: 60, //定时器
RechargeSmsorderNoInfo: {} //第三方合作交易标识
}
},
onLoad: function(options) {
......@@ -271,56 +280,14 @@
},
methods: {
async ChangeBankPay(){
uni.showLoading({ mask:true });
let status = await this.accountCloseacceptStatusQuery();
uni.hideLoading();
if( status !== 0 ) return false;
// 更换银行卡
async ChangeBankPay() {
uni.showLoading({
mask: true,
title: "请稍后...."
});
this.BackToMini('AssignAddCard')
},
accountCloseacceptStatusQuery(){
return new Promise(( resolve,reject) => {
$.ajax({ //查询是否提交销户
url:gHost + "/bank-wechat/icbc/account/manager/accountCloseacceptStatusQuery",
type:'post',
data:{
schoolId:this.PersonalInfo.schoolid,
userId:this.PersonalInfo.id,
wechattype: 1,
'sessionid': sessionID,
},
contentType: "application/x-www-form-urlencoded",
headers: {
'sessionid': sessionID,
},
success:( { code , message , results } ) => {
let status = results && results.status ; // 0表示未申请,1申请中,2已销户,3销户申请失败
if(code === '10000' && status == '0'){
}else if(code === '10000' && status == '1'){
uni.showToast({
title: "您已提交销户申请,银行正在审核中。",
icon:'none',
})
}else{
uni.showToast({
title: message,
icon:'none',
})
}
resolve(status)
},
error: function(err) {
uni.showToast({
title: err.message || '请求失败',
icon:'none',
});
reject(-1)
},
});
})
},
// 验证码弹出框开启
toDeposit() {
if (this.isOtherMoney) {
......@@ -348,6 +315,12 @@
return
}
}
if (MyTimer) {
window.clearInterval(MyTimer); //停止计时器
MyTimer = null
this.CodeMsg = "获取验证码"
this.msCount = 60;
}
this.$refs.popup.open('top')
},
// 验证码弹出框关闭
......@@ -398,6 +371,72 @@
document.scrollingElement.scrollTo(0, this.scrollTop);
})
},
//定时器
IntervalFun() {
if (this.msCount == 1) {
window.clearInterval(MyTimer); //停止计时器
MyTimer = null
this.CodeMsg = "获取验证码"
this.msCount = 60;
} else {
this.msCount--;
this.CodeMsg = this.msCount + "s后获取"
}
},
// 充值验证获取验证码
async SendSms() {
if (MyTimer) {
return
}
if (!this.openCardPhon || this.openCardPhon.length !== 11) {
Dialog({
title: '系统提示',
message: '请收入正确的手机号码!'
});
return
}
let this_ = this;
let loading = Toast.loading({
message: '加载中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
});
$.ajax({
url: gHost + '/bank-wechat/bocom/exchange/rechargeSms',
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: {
amount: (this.Money * 1).toFixed(2), //充值金额,单位元
schoolId: bankInfo.schoolId, //学校id
userId: userID, //用户id
sessionid: sessionID,
wechattype: 1,
},
headers: {
'sessionid': sessionID,
},
success: function(res5) {
loading.clear();
if (res5.code == "10000") {
this_.IntervalFun();
MyTimer = window.setInterval(this_.IntervalFun, 1000);
this_.RechargeSmsorderNoInfo = res5.results ? res5.results : {}
} else {
weui.topTips(res5.message)
uni.showModal({
title: "系统提示",
content: res5.message
})
}
},
error: function(err) {
loading.clear();
},
});
},
// 充值
async ExchangeRecharge() {
let amount,
......@@ -423,31 +462,43 @@
amount = this.Money * 1
}
let this_ = this;
if (!this.openCardPhon || this.openCardPhon.length !== 11) {
Dialog({
title: '系统提示',
message: '请收入正确的手机号码!'
});
return
}
if (!this.RechargeSmsorderNoInfo.orderNo) {
Dialog({
title: '系统提示',
message: '请获取验证码!'
});
return
}
if (!this.openCardPhonSms) {
Dialog({
title: '系统提示',
message: '请收入验证码!'
});
return
}
uni.showLoading({
mask: true,
title: "处理中......"
})
try{
let status = await this.accountCloseacceptStatusQuery();
if(status !== 0) { uni.hideLoading(); return false };
}catch(e){
uni.hideLoading();
return false
}
$.ajax({
url: gHost + '/bank-wechat/icbc/account/exchange/recharge',
url: gHost + '/bank-wechat/bocom/exchange/recharge',
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: {
schoolId: bankInfo.schoolId,
userId: userID,
amount: (amount * 1).toFixed(2), //充值金额,单位元
mobileCode: this.openCardPhonSms, //短信验证码
orderNo: this_.RechargeSmsorderNoInfo.orderNo, //第三方合作交易标识,取充值短信返回的orderNo值
schoolId: bankInfo.schoolId, //学校id
userId: userID, //用户id
sessionid: sessionID,
wechattype: 1,
amount: amount,
bindMedium: this.bankInfo_.bindCardNo,
summary: "充值",
},
headers: {
'sessionid': sessionID,
......@@ -458,16 +509,18 @@
this_.close();
setTimeout(() => {
this_.queryBankInfo();
},3000);
}, 3000);
wx.showModal({
title:'充值申请已提交',
content:'银行处理需要1-5分钟时间,充值结果以余额查询为准。',
showCancel:false
title: '充值申请已提交',
content: '银行处理需要1-5分钟时间,充值结果以余额查询为准。',
showCancel: false
})
// 20211129
this_.RechargeSmsorderNoInfo = {}
} else {
weui.topTips(res5.message)
}
},
error: function(err) {
uni.hideLoading();
......@@ -649,7 +702,7 @@
let this_ = this;
// let loading = weui.loading('请稍后');
$.ajax({
url: gHost + '/bank-wechat/icbc/account/balance/balanceQuery',
url: gHost + '/bank-wechat/bocom/balance/getBankBlanceAndSyncLocal',
type: "POST",
timeout: 8000,
contentType: "application/x-www-form-urlencoded",
......@@ -713,7 +766,8 @@
bankInfo.sessionid = sessionID;
this_.queryBankInfo(); //查余额
this_.bankInfo_ = bankInfo;
// this_.getBindingList(bankInfo.accountNo,bankInfo.schoolId,bankInfo.id);
// 20211129
this_.openCardPhon = bankInfo.mobileNo
} else {
weui.topTips(res2.message)
}
......@@ -779,6 +833,7 @@
background: linear-gradient(180deg, #FFFFFF 0%, #FAFAFA 100%);
}
.showBindCardList {
.choiceBox {
text-align: center;
......@@ -806,7 +861,7 @@
background: #000000;
opacity: 0.8;
border-radius: 8rpx;
}
.cardNum {
......@@ -931,7 +986,7 @@
}
.headview .schoolname {
width: 252rpx;
// width: 252rpx;
height: 50rpx;
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
......@@ -1134,20 +1189,47 @@
right: 0;
top: 400rpx;
width: 618rpx;
height: 478rpx;
height: 520rpx;
background: #FFFFFF;
border-radius: 8rpx;
margin: 0 auto;
.RechargeInfo {
width: 520rpx;
width: 560rpx;
height: 100%;
margin: 0 auto;
/deep/ .openCardPhonTxt {
font-weight: bold;
color: #000000;
width: auto;
}
/deep/ .openCardPhonSmsTxt {
font-weight: bold;
color: #000000;
width: auto;
}
/deep/ .van-cell {
padding-left: 0;
padding-right: 0;
height: 100rpx;
}
/deep/ .van-button {
background: #1CC48B;
border-radius: 8rpx;
font-size: 10rpx;
}
.RechargeInfo1 {
height: 124rpx;
line-height: 124rpx;
font-size: 36rpx;
height: 120rpx;
line-height: 88rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
......@@ -1175,19 +1257,19 @@
margin-top: 40rpx;
view {
width: 250rpx;
height: 88rpx;
width: 100%;
height: 68rpx;
border-radius: 8rpx;
text-align: center;
line-height: 88rpx;
line-height: 68rpx;
}
view:nth-child(1) {
background: #EBEBEB;
font-size: 36rpx;
background: #1CC48B;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #1CC48B;
color: #EBEBEB;
}
view:nth-child(2) {
......@@ -1212,9 +1294,10 @@
text-align: right;
image {
width: 40rpx;
height: 40rpx;
width: 35rpx;
height: 35rpx;
position: relative;
right: 10rpx;
}
}
......
......@@ -179,9 +179,9 @@
if (res5.code == "10000") {
// this_.ExchangeWithdrawQuery(res5.results.flowId, res5.results.corpSerno);
wx.showModal({
title:'提现申请已提交',
content:'银行处理需要1-5分钟时间,充值结果以余额查询为准。',
showCancel:false
title: '提现申请已提交',
content: '银行处理需要1-5分钟时间,充值结果以余额查询为准。',
showCancel: false
})
} else {
weui.topTips(res5.message)
......@@ -356,7 +356,7 @@
let this_ = this;
let loading = weui.loading('请稍后');
$.ajax({
url: gHost + '/bank-wechat/icbc/account/balance/balanceQuery',
url: gHost + '/bank-wechat/bocom/balance/getBankBlanceAndSyncLocal',
type: "POST",
timeout: 8000,
contentType: "application/x-www-form-urlencoded",
......
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