张延森 před 3 roky
rodič
revize
07fb560964
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1
    1
      src/utils/wx.js

+ 1
- 1
src/utils/wx.js Zobrazit soubor

@@ -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
   }