Commit 491299f7 authored by 郭志伟's avatar 郭志伟

fix(pay.service): 微信支付完善

parent 670a96f4
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Description: 支付微信h5, jsapi, 第三方收银台,跳转) * @Description: 支付微信h5, jsapi, 第三方收银台,跳转)
* @Date: 2020-07-28 15:03:52 * @Date: 2020-07-28 15:03:52
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2021-08-11 10:33:50 * @LastEditTime: 2021-11-08 16:19:15
*/ */
import qs from 'qs'; import qs from 'qs';
...@@ -65,8 +65,9 @@ function payByWeixinH5(info) { ...@@ -65,8 +65,9 @@ function payByWeixinH5(info) {
info.params.vccToken = vccToken; info.params.vccToken = vccToken;
info.params.orderNo = orderNo; info.params.orderNo = orderNo;
info.params.isWx = true; info.params.isWx = true;
const redirectUrl = localStorage.get('redirectUrl') || window.location.origin;
const currentPath = encodeURIComponent( const currentPath = encodeURIComponent(
window.location.origin + redirectUrl +
// eslint-disable-next-line prettier/prettier // eslint-disable-next-line prettier/prettier
'/payWaiting' + '/payWaiting' +
qs.stringify(info.params, { encode: true, addQueryPrefix: true }) qs.stringify(info.params, { encode: true, addQueryPrefix: true })
......
...@@ -227,7 +227,7 @@ export default { ...@@ -227,7 +227,7 @@ export default {
this.getQuery(); this.getQuery();
this.setIsOrder(); this.setIsOrder();
if (this.$route.query.redirectUrl) { if (this.$route.query.redirectUrl) {
localStorage.set('redirectUrl', this.redirectUrl); localStorage.set('redirectUrl', this.$route.query.redirectUrl);
this.redirectUrl = this.$route.query.redirectUrl; this.redirectUrl = this.$route.query.redirectUrl;
} else { } else {
this.redirectUrl = localStorage.get('redirectUrl'); this.redirectUrl = localStorage.get('redirectUrl');
......
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