Commit d1b50bb3 by 程默

add 第三方sso wxpay

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