Commit 31105cba authored by yyh's avatar yyh

fix 微信支付回调问题

parent 484faa9b
...@@ -140,9 +140,8 @@ export default class Recharge extends Vue { ...@@ -140,9 +140,8 @@ export default class Recharge extends Vue {
private async payHandler() { private async payHandler() {
const { protocol, host } = location; const { protocol, host } = location;
const { pay_url } = await this.$api.order.pay(this.orderId, this.method); const { pay_url } = await this.$api.order.pay(this.orderId, this.method);
// location.href = pay_url; const redirectUrl = encodeURIComponent(`${protocol}//${host}/#/rechargeSuccess`);
location.href = this.method === 0 ? pay_url : `${pay_url}&redirect_url=${protocol}//${host}/#/rechargeSuccess`; location.href = this.method === 0 ? pay_url : `${pay_url}&redirect_url=${redirectUrl}`;
// &redirect_url=https%3A%2F%2Fwww.wechatpay.com.cn
} }
} }
</script> </script>
......
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