Commit 34eeaf4a authored by 袁玲利's avatar 袁玲利

浦发银行银行卡添加,解绑

parent 5c2ce960
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
</view> </view>
<!-- 弹出层 --> <!-- 弹出层 -->
<uni-popup ref="popup" :mask-click="false"> <uni-popup ref="popup" :mask-click="false">
<!-- 充值确认 --> <!-- 充值,解绑银行卡(浦发银行)确认 -->
<view class="RechargeConfirmationBox"> <view class="RechargeConfirmationBox">
<view class="RechargeInfo"> <view class="RechargeInfo">
<view class="closePhoneBox" @click="close()"> <view class="closePhoneBox" @click="close()">
...@@ -228,7 +228,8 @@ ...@@ -228,7 +228,8 @@
<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="" @click="ExchangeRecharge"> 充值 </view> <view class="" @click="unattachedCard" v-if="unbindFlag">去解绑</view>
<view class="" @click="ExchangeRecharge" v-else> 充值 </view>
</view> </view>
</view> </view>
</view> </view>
...@@ -242,14 +243,19 @@ ...@@ -242,14 +243,19 @@
<view class="showBindCardList"> <view class="showBindCardList">
<view class="choiceBox">选择付款账户</view> <view class="choiceBox">选择付款账户</view>
<view class="cardsList"> <view class="cardsList">
<view class="ListItem" @click="ChangeCardPay(item)" v-for="(item, index) in bindcardList" <view class="ListItem" v-for="(item, index) in bindcardList" :key="index">
:key="index"> <span class="BankListImgSpan" @click="ChangeCardPay(item)">
<span style="padding-right: 10px">{{ item.bindCardName }} <image class="BankListImg" src="../../../static/img/choiceBank.png"
v-if="item.bindCardNo == bankInfo_.bindCardNo"></image>
</span> </span>
<span>尾号:{{ <span style="padding-right: 10px" @click="ChangeCardPay(item)">{{ item.bindCardName }}
</span>
<span @click="ChangeCardPay(item)">尾号:{{
item.bindCardNo.slice(item.bindCardNo.length - 4) item.bindCardNo.slice(item.bindCardNo.length - 4)
}}</span> }}</span>
<!-- <image class="BankListImg" src="../../../static/img/choiceBank.png"></image> --> <!-- <image class="BankListImg" src="../../../static/img/choiceBank.png"></image> -->
<van-icon name="delete" class="delete" v-if="bankInfo_.typeCode == 'SPDB'"
@click="unattachedCardBefore(item)" />
</view> </view>
</view> </view>
<view class="changeCard" @click="ChangeBankPay">我要换卡支付</view> <view class="changeCard" @click="ChangeBankPay">我要换卡支付</view>
...@@ -425,6 +431,8 @@ ...@@ -425,6 +431,8 @@
msCount: 60, //定时器 msCount: 60, //定时器
RechargeSmsorderNoInfo: {}, //第三方合作交易标识 RechargeSmsorderNoInfo: {}, //第三方合作交易标识
typeCode: "", typeCode: "",
unbindFlag: false, // 解绑标志
unattachedCardItem: {}
}; };
}, },
onLoad: function(options) { onLoad: function(options) {
...@@ -466,6 +474,71 @@ ...@@ -466,6 +474,71 @@
await this.signStatusQuery(); await this.signStatusQuery();
} }
}, },
// 解绑银行卡提示 浦发银行
unattachedCardBefore(item) {
this.unattachedCardItem = item;
console.log(item, 'itemm')
// this.$refs.popup.open("top");
const self = this;
let bankno = item.bindCardNo.slice(item.bindCardNo.length - 4);
Dialog.confirm({
title: "提示",
message: `确定解绑${item.bindCardName}${bankno}吗?`,
confirmButtonText: "去解绑",
cancelButtonText: "取消",
})
.then(() => {
self.popshow = false;
self.$refs.popup.open("top");
self.unbindFlag = true;
})
.catch(() => {
// on cancel
});
},
// 解绑银行卡
unattachedCard() {
const self = this;
let loading = Toast.loading({
message: "解绑中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
$.ajax({
url: gHost + "/bank-wechat/spdb/unattachedCard",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: {
schoolId: bankInfo.schoolId, //学校id
userId: userID, //用户id
sessionid: sessionID,
wechattype: 1,
cardNum: this.unattachedCardItem.bindCardNo,
mobileNum: this.unattachedCardItem.mobileNo,
randomPassword: this.openCardPhonSms, //短信验证码
},
headers: {
sessionid: sessionID,
},
success: function(respes) {
loading.clear();
if (respes.code == "10000") {
console.log(respes, "respes");
Toast('解绑成功');
self.$refs.popup.close();
} else {
Toast(respes.message || "解绑银行卡失败,请重试!");
throw new Error("解绑银行卡失败,请重试!");
}
},
error: function(err) {
loading.clear();
Toast(err || "解绑银行卡失败,请重试!");
throw new Error("解绑银行卡失败,请重试!");
},
});
},
// 更换银行卡 // 更换银行卡
async ChangeBankPay() { async ChangeBankPay() {
// uni.showModal({ // uni.showModal({
...@@ -524,7 +597,7 @@ ...@@ -524,7 +597,7 @@
} }
if (bankInfo.typeCode != 'SPDB') { if (bankInfo.typeCode != 'SPDB') {
this.$refs.popup.open("top"); this.$refs.popup.open("top");
}else { } else {
this.ExchangeRecharge(); this.ExchangeRecharge();
} }
}, },
...@@ -715,6 +788,7 @@ ...@@ -715,6 +788,7 @@
msg: "充值", msg: "充值",
} }
let params1 = { let params1 = {
bizScene: '105322',
mobileNum: this.openCardPhon, mobileNum: this.openCardPhon,
schoolId: bankInfo.schoolId, //学校id schoolId: bankInfo.schoolId, //学校id
userId: userID, //用户id userId: userID, //用户id
...@@ -834,8 +908,8 @@ ...@@ -834,8 +908,8 @@
console.log(bankInfo.bindCardNo, 'bindCardNobindCardNobindCardNobindCardNo') console.log(bankInfo.bindCardNo, 'bindCardNobindCardNobindCardNobindCardNo')
if (this.bindcardList.length) { if (this.bindcardList.length) {
let arr = this.bindcardList.filter(x => x.bindCardNo == bankInfo.bindCardNo); let arr = this.bindcardList.filter(x => x.bindCardNo == bankInfo.bindCardNo);
console.log(arr[0],'绑定卡绑定卡') console.log(arr[0], '绑定卡绑定卡')
if(arr.length){ if (arr.length) {
bindingCardId = arr[0].bindCardId; bindingCardId = arr[0].bindCardId;
} }
} }
...@@ -1295,6 +1369,33 @@ ...@@ -1295,6 +1369,33 @@
background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%); background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
} }
.BankListImgSpan {
width: 30rpx;
height: 30rpx;
position: relative;
margin-right: 20rpx;
display: inline-block;
}
.delete {
position: absolute;
top: 0;
right: 120rpx;
font-size: 38rpx;
color: #04b871;
padding: 25rpx 0;
padding-top: 28rpx;
z-index: 1;
}
.BankListImg {
width: 30rpx;
height: 30rpx;
position: absolute;
left: 0;
top: 0;
}
.userInfoBox { .userInfoBox {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -1487,6 +1588,13 @@ ...@@ -1487,6 +1588,13 @@
background: #fff; background: #fff;
position: relative; position: relative;
text-align: center; text-align: center;
display: flex;
justify-content: center;
span {
display: inline-block;
align-self: center;
}
} }
.changeCard { .changeCard {
......
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