Yansen 2 年之前
父節點
當前提交
91b2ca4ce9
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      src/utils/wx.js

+ 2
- 1
src/utils/wx.js 查看文件

@@ -90,7 +90,8 @@ function wxsdk() {
90 90
 
91 91
     const appid = APPID || 'wx5d0c5a7f210d872f';
92 92
     const local = encodeURIComponent(location.origin + location.pathname)
93
-    const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${local}&response_type=code&scope=snsapi_base&state=123#wechat_redirect`
93
+    const scope = 'snsapi_userinfo'; // snsapi_base
94
+    const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${local}&response_type=code&scope=${scope}&state=123#wechat_redirect`
94 95
     window.location.href = url;
95 96
   }
96 97