Commit 717fae2a authored by 李智书's avatar 李智书

1.提交更新;

parent a681e933
......@@ -122,6 +122,7 @@
}, {
"path": "pages/IcbcModule/Reflect/Reflect",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "提现",
"enablePullDownRefresh": false
}
......
......@@ -67,7 +67,8 @@
<!-- 支付方式 -->
<view class="payType" @click="queryBindCardList">
<view>付款方式</view>
<view>招商银行(5947) <span class="arrow"></span></view>
<view>{{bankInfo_.accountName}}({{bankInfo_.accountNo.slice(bankInfo_.accountNo.length-4)}}) <span
class="arrow"></span></view>
</view>
<!-- <view class="" style="height: 1rpx;background-color: #DFDFDF;"></view> -->
<!-- 充值生活费 -->
......@@ -117,7 +118,7 @@
充值金额:{{Money}}
</view>
<view class="">
付款账户:浦发银行(6926)
付款账户:{{bankInfo_.accountName}}({{bankInfo_.accountNo.slice(bankInfo_.accountNo.length-4)}})
</view>
</view>
<view style="width: 520rpx;height: 1rpx;background: #EEEEEE;"></view>
......@@ -133,12 +134,31 @@
</view>
</view>
</uni-popup>
<!-- 选择银行卡 -->
<view class="selectCard">
<van-popup v-model="popshow" round position="bottom" :style="{ height: '30%' }">
<!-- 银行卡列表 -->
<view class="accountlist">
<!-- 切换绑定的一类卡列表 -->
<view class="showBindCardList">
<view class="choiceBox">选择付款账户</view>
<view class="ListItem" @click="ChangeCardPay('bankName','bindCardNo')"
v-for="(item,index) in bindcardList" :key="index">
<span>{{item.bankName}}</span>
<span>{{item.bindCardNo}}</span>
<image class='BankListImg' src='../../../static/img/choiceBank.png'></image>
</view>
</view>
</view>
</van-popup>
</view>
</view>
</template>
<script>
import {
Dialog
Dialog,
Toast
} from 'vant';
import keyboardPackage from "@/components/keyboard-package/keyboard-package.vue"
import cityData from "@/common/js/city.js"
......@@ -192,6 +212,7 @@
name: "Recharge",
data() {
return {
popshow: false,
// 输入其它金额
isOtherMoney: false,
inputOtherM: '',
......@@ -223,7 +244,9 @@
}),
numberList: [],
tempFiles1: '../../static/img/idCardBg1.png', //上传身份证临时选择文件
tempFiles2: '../../static/img/idCardBg0.png'
tempFiles2: '../../static/img/idCardBg0.png',
//绑定的一类卡列表
bindcardList: []
}
},
onLoad: function(options) {
......@@ -321,6 +344,10 @@
},
// 充值
async ExchangeRecharge() {
Toast({
message: '自定义图片',
icon: 'https://img.yzcdn.cn/vant/logo.png',
});
let amount,
bindMedium,
summary;
......@@ -344,7 +371,12 @@
amount = this.Money * 1
}
let this_ = this;
let loading = weui.loading('请稍后');
let loading = Toast.loading({
message: '加载中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
});
$.ajax({
url: gHost + '/bank-wechat/icbc/account/exchange/recharge',
type: "POST",
......@@ -355,29 +387,35 @@
sessionid: sessionID,
wechattype: 1,
amount: amount,
bindMedium: "6217002920110643831",
bindMedium: this.bankInfo_.bindCardNo,
summary: "充值",
},
headers: {
'sessionid': sessionID,
},
success: function(res5) {
loading.hide();
loading.clear();
if (res5.code == "10000") {
this_.close();
this_.ExchangeRechargeQuery(res5.results.flowId, res5.results.corpSerno);
} else {
weui.topTips(res5.message)
}
},
error: function(err) {
loading.hide();
loading.clear();
},
});
},
// 充值结果查询
async ExchangeRechargeQuery(flowId, oriCorpSerno) {
let this_ = this;
let loading = weui.loading('请稍后');
let loading = Toast.loading({
message: '加载中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
});
$.ajax({
url: gHost + '/bank-wechat/icbc/account/exchange/rechargeQuery',
type: "POST",
......@@ -394,12 +432,13 @@
'sessionid': sessionID,
},
success: function(res5) {
loading.hide();
loading.clear();
if (res5.code == "10000") {
uni.showModal({
title: "系统提示",
content: "充值成功!"
})
this_.queryBankInfo();
} else {
weui.topTips(res5.message)
uni.showModal({
......@@ -409,7 +448,7 @@
}
},
error: function(err) {
loading.hide();
loading.clear();
},
});
},
......@@ -447,11 +486,13 @@
},
//按钮操作
HideHTML(dom, type) {
this.$nextTick(function() {
if (type == 0) {
$('.' + dom).css('display', 'none');
} else {
$('.' + dom).css('display', 'block');
}
})
},
//返回小程序 跳转指定页面
BackToMini(page) {
......@@ -487,7 +528,6 @@
success: function(res5) {
loading.hide();
if (res5.code == "10000") {
this_.HideHTML('showBindCardList', 0);
this_.queryUserBankInfo();
} else {
weui.topTips(res5.message)
......@@ -515,21 +555,8 @@
success: function(res4) {
loading.hide();
if (res4.code == "10000") {
var divList = '';
var choiceIndex = 0;
for (let i = 0; i < res4.results.accountList[0].bindcardList.length; i++) {
divList += `<div onclick=ChangeCardPay('${res4.results.accountList[0].bindcardList[i].bankName}','${res4.results.accountList[0].bindcardList[i].bindCardNo}')>
<p>${res4.results.accountList[0].bindcardList[i].bankName}</p>
<p>${res4.results.accountList[0].bindcardList[i].bindCardNo.substr(0,4)+" **** **** "+res4.results.accountList[0].bindcardList[i].bindCardNo.substr(-4)}</p>
<img class='myImg${i} BankListImg' src='img/choiceBank.png'>
</div>`
if (res4.results.accountList[0].bindcardList[i].bindCardNo == payCardNumber) {
choiceIndex = i;
}
}
$('.hideListCover').html(divList);
$(`.myImg${choiceIndex}`).css('display', 'block');
$('.showBindCardList').css('display', 'block');
this_.bindcardList = res4.results.accountList[0].bindcardList
this_.popshow = true
} else {
weui.topTips(res4.message)
}
......@@ -544,26 +571,29 @@
let this_ = this;
let loading = weui.loading('请稍后');
$.ajax({
url: gHost + '/bank-wechat/query/balance',
url: gHost + '/bank-wechat/icbc/account/balance/balanceQuery',
type: "POST",
timeout: 8000,
contentType: "application/x-www-form-urlencoded",
data: bankInfo,
data: {
mediumId: bankInfo.accountNo || '',
schoolId: bankInfo.schoolId || '',
userId: bankInfo.userId || '',
sessionid: sessionID,
wechattype: 1,
},
success: function(res3) {
loading.hide();
if (res3.code == "10000") {
if (res3.results.acctInfoList == null) {
if (res3.results.accountBalance == null) {
weui.topTips("账户信息为空,余额查询失败");
} else {
this_.cardBalanceTx = ((res3.results.acctInfoList[0].hqBalanceDTOList[0]
.balance *
1).toFixed(2));
this_.cardBalanceTx = (res3.results.accountBalance * 1).toFixed(2);
$('.TxClsTx').attr('placeholder',
`可提现金额${(res3.results.acctInfoList[0].hqBalanceDTOList[0].balance*1).toFixed(2)}元`
`可提现金额${(res3.results.accountBalance * 1).toFixed(2)}元`
)
this_.RechargeMax = ((2000 - ((res3.results.acctInfoList[0]
.hqBalanceDTOList[0]
.balance * 1).toFixed(2) * 1)).toFixed(2));
this_.RechargeMax = ((2000 - ((res3.results.accountBalance * 1).toFixed(2) *
1)).toFixed(2));
}
} else {
weui.topTips(res3.message)
......@@ -616,7 +646,12 @@
//查询用户信息
QueryUserInfo() {
let this_ = this;
let loading = weui.loading('请稍后');
let loading = Toast.loading({
message: '加载中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
});
$.ajax({
url: gHost + '/wechat/svweapp/QueryPersonalInfo',
type: "POST",
......@@ -627,7 +662,7 @@
wechattype: 1
},
success: function(res1) {
loading.hide();
loading.clear();
if (res1.code == "10000") {
bankInfo.schoolId = res1.results.schoolid;
bankInfo.userId = res1.results.id;
......@@ -648,7 +683,7 @@
}
},
error: function(err) {
loading.hide();
loading.clear();
},
});
},
......@@ -1010,13 +1045,14 @@
width: 383rpx;
height: 159rpx;
margin: 0 auto;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #010101;
line-height: 60rpx;
view {
line-height: 75rpx;
}
}
.BtngGoup {
......@@ -1291,4 +1327,29 @@
position: relative;
top: -29px;
}
.BgCoverBox {
width: 100vw;
height: 100vh;
position: fixed;
left: 0;
top: 0;
z-index: 10;
background: #000000;
opacity: 0.5;
}
.hideListCover {
max-height: 50vh;
overflow-y: auto;
padding: 0;
}
.bottomDiv {
font-weight: bold;
height: 50px;
line-height: 50px;
border-bottom: 1px solid #e6e6e6;
}
</style>
......@@ -10,6 +10,12 @@
:placeholder="placeholder" placeholder-class="placeholderinputOtherM" type="text" maxlength="6" />
<span class="ALL" @click="TxAllFun">全部</span>
</view>
<!-- 提现账户 -->
<view class="payType" @click="queryBindCardList">
<view>提现账户</view>
<view>{{bankInfo_.accountName}}({{bankInfo_.accountNo.slice(bankInfo_.accountNo.length-4)}}) <span
class="arrow"></span></view>
</view>
<view class="OtherMoney" v-if="false" style="color: #BFBFBF;font-weight: 500;">
每日仅可提现一次,请明日再来。
</view>
......@@ -66,7 +72,10 @@
ImgUrl: this.$ImgUrl,
ReflectMoney: 3,
cardBalanceTx: '',
placeholder: "可提现金额3.00元"
placeholder: "可提现金额0.00元",
bankInfo_: {
accountNo: '**** **** **** 1234'
},
}
},
onLoad: function(options) {
......@@ -97,7 +106,35 @@
}
})
},
//
//查询一类卡绑定列表
queryBindCardList() {
let this_ = this;
let loading = weui.loading('请稍后');
$.ajax({
url: gHost + '/bank-wechat/query/account',
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: {
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1
},
success: function(res4) {
loading.hide();
if (res4.code == "10000") {
this_.bindcardList = res4.results.accountList[0].bindcardList
this_.popshow = true
} else {
weui.topTips(res4.message)
}
},
error: function(err) {
loading.hide();
},
});
},
// 提现
async toDeposit() {
if (!this.inputOtherM) {
uni.showModal({
......@@ -114,7 +151,6 @@
weui.topTips(`提现金额不可大于账户余额`);
return
}
await this.ExchangeWithdraw()
},
// 提现
......@@ -130,8 +166,8 @@
userId: userID,
sessionid: sessionID,
wechattype: 1,
amount: this.inputOtherM * 1,
bindMedium: "6217002920110643831",
amount: this_.inputOtherM * 1,
bindMedium: this_.bankInfo_.bindCardNo,
summary: "提现",
},
headers: {
......@@ -176,6 +212,7 @@
title: "系统提示",
content: "提现成功!"
})
uni.navigateBack({})
} else {
weui.topTips(res5.message)
uni.showModal({
......@@ -299,71 +336,36 @@
},
});
},
//查询一类卡绑定列表
queryBindCardList() {
let this_ = this;
let loading = weui.loading('请稍后');
$.ajax({
url: gHost + '/bank-wechat/query/account',
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: {
schoolId: bankInfo.schoolId,
userId: userID,
sessionid: sessionID,
wechattype: 1
},
success: function(res4) {
loading.hide();
if (res4.code == "10000") {
var divList = '';
var choiceIndex = 0;
for (let i = 0; i < res4.results.accountList[0].bindcardList.length; i++) {
divList += `<div onclick=ChangeCardPay('${res4.results.accountList[0].bindcardList[i].bankName}','${res4.results.accountList[0].bindcardList[i].bindCardNo}')>
<p>${res4.results.accountList[0].bindcardList[i].bankName}</p>
<p>${res4.results.accountList[0].bindcardList[i].bindCardNo.substr(0,4)+" **** **** "+res4.results.accountList[0].bindcardList[i].bindCardNo.substr(-4)}</p>
<img class='myImg${i} BankListImg' src='img/choiceBank.png'>
</div>`
if (res4.results.accountList[0].bindcardList[i].bindCardNo == payCardNumber) {
choiceIndex = i;
}
}
$('.hideListCover').html(divList);
$(`.myImg${choiceIndex}`).css('display', 'block');
$('.showBindCardList').css('display', 'block');
} else {
weui.topTips(res4.message)
}
},
error: function(err) {
loading.hide();
},
});
},
//获取银行余额
queryBankInfo() {
let this_ = this;
let loading = weui.loading('请稍后');
$.ajax({
url: gHost + '/bank-wechat/query/balance',
url: gHost + '/bank-wechat/icbc/account/balance/balanceQuery',
type: "POST",
timeout: 8000,
contentType: "application/x-www-form-urlencoded",
data: bankInfo,
data: {
mediumId: bankInfo.accountNo || '',
schoolId: bankInfo.schoolId || '',
userId: bankInfo.userId || '',
sessionid: sessionID,
wechattype: 1,
},
success: function(res3) {
loading.hide();
if (res3.code == "10000") {
if (res3.results.acctInfoList == null) {
if (res3.results.accountBalance == null) {
weui.topTips("账户信息为空,余额查询失败");
} else {
this_.cardBalanceTx = ((res3.results.acctInfoList[0].hqBalanceDTOList[0]
.balance *
1).toFixed(2));
this_.placeholder =
`可提现金额${(res3.results.acctInfoList[0].hqBalanceDTOList[0].balance*1).toFixed(2)}元`
this_.RechargeMax = ((2000 - ((res3.results.acctInfoList[0]
.hqBalanceDTOList[0]
.balance * 1).toFixed(2) * 1)).toFixed(2));
this_.ReflectMoney = res3.results.accountBalance * 1
this_.cardBalanceTx = (res3.results.accountBalance * 1).toFixed(2);
$('.TxClsTx').attr('placeholder',
`可提现金额${(res3.results.accountBalance * 1).toFixed(2)}元`
)
this_.RechargeMax = ((2000 - ((res3.results.accountBalance * 1).toFixed(2) *
1)).toFixed(2));
this_.placeholder = `可提现金额${(res3.results.accountBalance * 1).toFixed(2)}元`
}
} else {
weui.topTips(res3.message)
......@@ -397,7 +399,8 @@
success: function(res2) {
if (res2.code == "10000") {
bankInfo = res2.results;
bankInfo.sessionid = sessionID,
bankInfo.sessionid = sessionID;
this_.bankInfo_ = bankInfo
this_.queryBankInfo();
} else {
weui.topTips(res2.message)
......@@ -562,4 +565,43 @@
color: #268EF8;
margin-top: 23rpx;
}
.payType {
width: 654rpx;
margin: 0 auto;
height: 98rpx;
line-height: 98rpx;
display: flex;
justify-content: space-between;
}
.payType view:nth-child(1) {
// width: 120rpx;
height: 42rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #888888;
line-height: 98rpx;
}
.payType view::nth-child(2) {
width: 225rpx;
height: 45rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
line-height: 45rpx;
}
.arrow {
transform: rotate(-45deg);
top: -3rpx;
border: solid #999999;
border-width: 0 1rpx 1rpx 0;
display: inline-block;
padding: 8rpx;
position: relative;
}
</style>
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