liuyu 4 lat temu
rodzic
commit
6255ed4aea
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      app/controller/weixin.js

+ 1 - 1
app/controller/weixin.js

@@ -48,7 +48,7 @@ class WeixinController extends Controller {
 
     // TODO: 生成回调地址
     const { wxapi, authUrl = this.ctx.path } = this.app.config;
-    const backUrl = encodeURI(`${this.app.config.baseUrl}${this.config.authUrl}?state=${state}/`);
+    const backUrl = encodeURI(`${this.app.config.baseUrl}${this.config.authUrl}?state=${state}`);
     // const to_uri = `${wxapi.baseUrl}/api/auth?appid=${wxapi.appid}&response_type=code&redirect_uri=${backUrl}&connect_redirect=1#wechat`;
     // const backUrl = encodeURI(`${this.app.config.baseUrl}${this.config.authUrl}/`);
     const to_uri = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${wxapi.appid}&response_type=code&scope=snsapi_base&redirect_uri=${backUrl}&state=${state}&connect_redirect=1#wechat_redirect`;