1.修改话费充值 选择支付方式问题

yj-dev
杨杰 3 years ago
parent c1a2a75363
commit 5641584485
  1. 61
      subPages/recharge-centre/recharge-centre.vue
  2. 5
      subPages/unionComfirmation/unionComfirmation.vue

@ -303,66 +303,7 @@
} }
}) })
}, }
//
payRequest: function(self) {
uni.showLoading({
title: '支付中...'
})
jweixin.config({
// debug: false, // ,apialertpclogpc
appId: self.return_data.appId, //
timestamp: self.return_data.timeStamp, //
nonceStr: self.return_data.nonceStr, //
signature: self.return_data.sign, // 1
jsApiList: ['chooseWXPay'] // 使JSJS2
});
uni.hideLoading();
jweixin.ready(function() {
jweixin.checkJsApi({
jsApiList: ['chooseWXPay'], // JSJS2,
success: function(res) {},
fail: function(res) {}
});
jweixin.chooseWXPay({
appId: self.return_data.appId,
timestamp: self.return_data
.timeStamp, // jssdk使timestamp使timeStampS
nonceStr: self.return_data.nonceStr, // 32
package: self.return_data
.package, // prepay_idprepay_id=***
signType: 'MD5', // 'SHA1'使'MD5'
paySign: self.return_data.sign, //
success: function(res) {
//
uni.showToast({
title: '支付成功'
})
if (that.jumpType == 4) {
uni.reLaunch({
url: '/pages/tabBar/user/user'
});
} else {
uni.reLaunch({
url: '../success/success?id=' + that.couponId
});
}
},
cancel: function(r) {},
fail: function(res) {}
});
});
jweixin.error(function(res) {
uni.showToast({
icon: 'none',
title: '支付失败了',
duration: 4000
});
// configerrorconfigdebugresSPA
/*alert("config信息验证失败");*/
});
},
} }
} }
</script> </script>

@ -323,6 +323,7 @@
// //
radioChanges(item) { radioChanges(item) {
this.paytheprice = this.orderPrice; this.paytheprice = this.orderPrice;
this.rechangeload();
if (this.memDiscountId == item.id) { // if (this.memDiscountId == item.id) { //
this.memDiscountId = ''; this.memDiscountId = '';
this.reload(); this.reload();
@ -381,6 +382,10 @@
.deductionPrice).toFixed(2); .deductionPrice).toFixed(2);
} }
}, },
rechangeload() {
this.isUse = false;
this.$nextTick(() => (this.isUse = true))
},
// //
reload() { reload() {
this.isDiscount = false; this.isDiscount = false;

Loading…
Cancel
Save