Commit 0c6204a1 by 李嘉林

会员卡支付成功页加判断

parent c4b5e895
...@@ -14,7 +14,10 @@ export default { ...@@ -14,7 +14,10 @@ export default {
message: "正在支付中", message: "正在支付中",
shopmixid: "", shopmixid: "",
openId: "", openId: "",
options: {} options: {},
// 购买会员卡新页面
options_isCard:'',
options_isCardTitle:'',
}; };
}, },
onLoad(options) { onLoad(options) {
...@@ -24,6 +27,8 @@ export default { ...@@ -24,6 +27,8 @@ export default {
Object.assign(this.$data, this.$options.data()); //mpvue 的混合周期 使用小程序生命周期数据未初始化 Object.assign(this.$data, this.$options.data()); //mpvue 的混合周期 使用小程序生命周期数据未初始化
console.log("onload//"); console.log("onload//");
this.options = JSON.parse(options.ordercode); this.options = JSON.parse(options.ordercode);
this.options_isCard= options.isCard;
this.options_isCardTitle= options.isCardTit;
let that = this; let that = this;
wx.getStorage({ wx.getStorage({
key: "openid", key: "openid",
...@@ -48,6 +53,7 @@ export default { ...@@ -48,6 +53,7 @@ export default {
payData.success = res => { payData.success = res => {
console.log("支付成功", res, this.options); console.log("支付成功", res, this.options);
this.message = "支付成功"; this.message = "支付成功";
if(!this.options_isCard){
let query = { let query = {
orderSn: this.options.orderSn orderSn: this.options.orderSn
}; };
...@@ -56,6 +62,16 @@ export default { ...@@ -56,6 +62,16 @@ export default {
query query
)}` )}`
}); });
}else{
let query = {
cardTitle: this.options_isCardTitle
};
wx.redirectTo({
url: `../index/main?from=wxPay&backpath=/pay/payCardSuccess&params=${JSON.stringify(
query
)}`
});
}
}; };
payData.fail = res => { payData.fail = res => {
console.log("支付失败", res, this.options.orderSn); console.log("支付失败", res, this.options.orderSn);
......
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