浏览代码

提交代码

Lijy 7 月之前
父节点
当前提交
7a4d468722
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      fhKeeper/formulahousekeeper/timesheet/src/common/js/appidConfiguration.js

+ 3 - 1
fhKeeper/formulahousekeeper/timesheet/src/common/js/appidConfiguration.js

@@ -19,6 +19,7 @@ const config = {
 };
 };
 
 
 const fixedPath = `/api/corpWXAuth`; // 授权回调页面 (需要拼接)
 const fixedPath = `/api/corpWXAuth`; // 授权回调页面 (需要拼接)
+const fixedPathAgentId = `/api/corpInsideWXAuth`
 
 
 export function obtainCorrespondingConfigurationInformation() {
 export function obtainCorrespondingConfigurationInformation() {
   const hostname = window.location.hostname; // 获取域名和端口,(不包括http 和 https)
   const hostname = window.location.hostname; // 获取域名和端口,(不包括http 和 https)
@@ -26,8 +27,9 @@ export function obtainCorrespondingConfigurationInformation() {
   const agentId = row.agentId;
   const agentId = row.agentId;
   const appId = row.appId;
   const appId = row.appId;
   const tokenUrl = `${row.path}${fixedPath}`;
   const tokenUrl = `${row.path}${fixedPath}`;
+  const tokenUrlAgentId = `${row.path}${fixedPathAgentId}`;
   const authorizationCallback = agentId
   const authorizationCallback = agentId
-    ? `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${encodeURI(tokenUrl)}&response_type=code&scope=snsapi_base&state=STATE&agentid=${agentId}#wechat_redirect`
+    ? `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${encodeURI(tokenUrlAgentId)}&response_type=code&scope=snsapi_base&state=index&agentid=${agentId}#wechat_redirect`
     : `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${encodeURI(tokenUrl)}&response_type=code&scope=snsapi_base&state=1#wechat_redirect`;
     : `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${encodeURI(tokenUrl)}&response_type=code&scope=snsapi_base&state=1#wechat_redirect`;
   return {
   return {
     appId,
     appId,