|
|
|
|
@ -20,6 +20,7 @@
|
|
|
|
|
return {
|
|
|
|
|
appId: this.$route.query.appId,
|
|
|
|
|
orderId: this.$route.query.orderId,
|
|
|
|
|
returnUrl: this.$route.query.returnUrl,
|
|
|
|
|
transaction: {},
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -34,13 +35,27 @@
|
|
|
|
|
methods: {
|
|
|
|
|
submit(payChannel) {
|
|
|
|
|
let that = this;
|
|
|
|
|
debugger;
|
|
|
|
|
submitTransaction(this.appId, this.orderId, payChannel).then(data => {
|
|
|
|
|
pingpp.createPayment(data.invokeResponse, function(result, err) {
|
|
|
|
|
debugger;
|
|
|
|
|
console.log(result);
|
|
|
|
|
console.log(err.msg);
|
|
|
|
|
console.log(err.extra);
|
|
|
|
|
if (result === 'success') {
|
|
|
|
|
Dialog.alert({
|
|
|
|
|
title: '系统提示',
|
|
|
|
|
message: '支付成功',
|
|
|
|
|
beforeClose: function (action, done) {
|
|
|
|
|
// 关闭弹窗
|
|
|
|
|
done();
|
|
|
|
|
// 跳转到我的优惠劵
|
|
|
|
|
that.$router.push(decodeURI(that.returnUrl));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
// console.log(err.msg);
|
|
|
|
|
// console.log(err.extra);
|
|
|
|
|
Dialog.alert({
|
|
|
|
|
title: '系统提示',
|
|
|
|
|
message: '支付失败:' + err.msg,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|