Lijy 7 ヶ月 前
コミット
7a4d468722

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

@@ -19,6 +19,7 @@ const config = {
 };
 
 const fixedPath = `/api/corpWXAuth`; // 授权回调页面 (需要拼接)
+const fixedPathAgentId = `/api/corpInsideWXAuth`
 
 export function obtainCorrespondingConfigurationInformation() {
   const hostname = window.location.hostname; // 获取域名和端口,(不包括http 和 https)
@@ -26,8 +27,9 @@ export function obtainCorrespondingConfigurationInformation() {
   const agentId = row.agentId;
   const appId = row.appId;
   const tokenUrl = `${row.path}${fixedPath}`;
+  const tokenUrlAgentId = `${row.path}${fixedPathAgentId}`;
   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`;
   return {
     appId,