Commit d1b50bb3 by 程默

add 第三方sso wxpay

parent c0a7907a
...@@ -21,6 +21,8 @@ export default { ...@@ -21,6 +21,8 @@ export default {
options_isCardTitle: "", options_isCardTitle: "",
batchNumber: "", batchNumber: "",
totalMoney: "", totalMoney: "",
scene: "", //sso
backUrl: "",
}; };
}, },
onLoad(options) { onLoad(options) {
...@@ -40,12 +42,18 @@ export default { ...@@ -40,12 +42,18 @@ export default {
this.totalMoney = Number( this.totalMoney = Number(
JSON.parse(options.ordercode).orderSn.totalAmount JSON.parse(options.ordercode).orderSn.totalAmount
).toFixed(2); ).toFixed(2);
} else {
this.totalMoney = Number(
JSON.parse(options.ordercode).totalAmount
).toFixed(2);
} }
// } // }
console.log(this.totalMoney, "totalMoney"); console.log(this.totalMoney, "totalMoney");
} else { } else {
this.options = JSON.parse(options.ordercode); this.options = JSON.parse(options.ordercode);
options.scene && (this.scene = options.scene);
options.backUrl && (this.backUrl = options.backUrl);
} }
this.options_orderType = options.orderType; this.options_orderType = options.orderType;
...@@ -148,6 +156,13 @@ export default { ...@@ -148,6 +156,13 @@ export default {
orderSn: _this.options.orderSn, orderSn: _this.options.orderSn,
}; };
} }
// sso场景(跳转第三方url)
if (_this.scene == "sso") {
wx.redirectTo({
url: `../wxArticle/main?from=sso&link=${_this.backUrl}`,
});
return;
}
wx.redirectTo({ wx.redirectTo({
url: `../index/main?from=wxPay&backpath=/pay/paySuccess&params=${JSON.stringify( url: `../index/main?from=wxPay&backpath=/pay/paySuccess&params=${JSON.stringify(
...@@ -194,7 +209,18 @@ export default { ...@@ -194,7 +209,18 @@ export default {
}); });
}, },
toPage() { toPage() {
console.log("支付失败来这里了", this.batchNumber); console.log(
"支付失败来这里了",
this.backUrl,
this.batchNumber,
this.scene == "sso",
this.scene
);
if (this.scene == "sso") {
//sso模式(嵌入第三方)
wx.navigateBack()
return
}
if (this.batchNumber) { if (this.batchNumber) {
let query = { let query = {
multiMerchantsFlag: 1, multiMerchantsFlag: 1,
......
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