1.对接解除绑定卡号

yj-dev
杨杰 3 years ago
parent bbc689ada9
commit d34e9db37b
  1. 4
      pages/user/bindingCard/bindingCard.vue
  2. 41
      pages/user/unionCard/unionCard.vue

@ -109,8 +109,8 @@
getHuiLianTongCardByCardNo(params).then(res => { getHuiLianTongCardByCardNo(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.phoneNumber = res.return_data.userMobile; // this.phoneNumber = res.return_data.userMobile;
// this.phoneNumber = 15583658692; this.phoneNumber = 15583658692;
this.disStute = true this.disStute = true
} else { } else {
uni.showToast({ uni.showToast({

@ -38,6 +38,7 @@
</view> </view>
</view> </view>
<view class="btnw94" @click="getHuiLianTongCardConsumeOpen()">立即查询</view> <view class="btnw94" @click="getHuiLianTongCardConsumeOpen()">立即查询</view>
<view class="font14 fcor666 mart15 fotct" @click="delUserCard()">解除绑定</view>
<view class="height22 backcorfff width100"></view> <view class="height22 backcorfff width100"></view>
</view> </view>
<view class="width100 backcorfff mart10"> <view class="width100 backcorfff mart10">
@ -64,7 +65,8 @@
import { import {
getUserCardList, getUserCardList,
getHuiLianTongCardBalance, getHuiLianTongCardBalance,
getHuiLianTongCardConsume getHuiLianTongCardConsume,
delUserCard
} from '../../../Utils/Api.js'; } from '../../../Utils/Api.js';
let app = getApp(); let app = getApp();
export default { export default {
@ -181,6 +183,43 @@
this.UserCard = ''; this.UserCard = '';
}); });
}, },
//
delUserCard() {
let that = this;
uni.showModal({
content: '是否确定解除当前绑定卡号?',
success: (res) => {
if (res.confirm) {
let params = {
cardNo: that.user.hltCardNo.cardNo
}
delUserCard(params).then(res => {
if (res.return_code == '000000') {
uni.showToast({
title:'解除成功',
duration:2000,
icon:'success',
success() {
setTimeout(() => {
uni.navigateBack({
})
}, 1000)
}
})
}else{
uni.showToast({
title: res.return_msg,
duration:2000,
icon:'none'
})
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
// //
getHuiLianTongCardBalance() { getHuiLianTongCardBalance() {
let params = { let params = {

Loading…
Cancel
Save