张延森 hace 3 años
padre
commit
07fb560964
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      src/utils/wx.js

+ 1
- 1
src/utils/wx.js Ver fichero

@@ -72,7 +72,7 @@ export function redirect() {
72 72
   localStorage.setItem('wxcode', queryCode)
73 73
 
74 74
   if (!queryCode || queryCode !== originCode) {
75
-    const local = encodeURIComponent(location.href)
75
+    const local = encodeURIComponent(location.origin + location.pathname)
76 76
     const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd3bab568bc42d1de&redirect_uri=${local}&response_type=code&scope=snsapi_base&state=123#wechat_redirect`
77 77
     window.location.href = url
78 78
   }