|
@@ -1,7 +1,7 @@
|
|
/**
|
|
/**
|
|
- * 各个公司企业微信的配置, 更具域名来解析
|
|
|
|
|
|
+ * 各个公司企业微信的配置, 根据域名来解析
|
|
* @path 完整域名
|
|
* @path 完整域名
|
|
- * @appId 企业微信的appId
|
|
|
|
|
|
+ * @appId 企业微信的appId,针对私有化部署的情况appId就是corpId
|
|
*/
|
|
*/
|
|
const config = {
|
|
const config = {
|
|
"worktime.ttkuaiban.com": {
|
|
"worktime.ttkuaiban.com": {
|
|
@@ -16,6 +16,12 @@ const config = {
|
|
appId: "wwb12ec40df8c35139",
|
|
appId: "wwb12ec40df8c35139",
|
|
agentId: "1000075",
|
|
agentId: "1000075",
|
|
},
|
|
},
|
|
|
|
+ "privatewx.ttkuaiban.com": {
|
|
|
|
+ // 火石闪信-企业微信私有化
|
|
|
|
+ path: "http://privatewx.ttkuaiban.com",
|
|
|
|
+ appId: "wwf11426cf618e1703",
|
|
|
|
+ agentId: "1000069",
|
|
|
|
+ },
|
|
};
|
|
};
|
|
|
|
|
|
const fixedPath = `/api/corpWXAuth`; // 授权回调页面 (需要拼接)
|
|
const fixedPath = `/api/corpWXAuth`; // 授权回调页面 (需要拼接)
|
|
@@ -29,7 +35,7 @@ export function obtainCorrespondingConfigurationInformation() {
|
|
const tokenUrl = `${row.path}${fixedPath}`;
|
|
const tokenUrl = `${row.path}${fixedPath}`;
|
|
const tokenUrlAgentId = `${row.path}${fixedPathAgentId}`;
|
|
const tokenUrlAgentId = `${row.path}${fixedPathAgentId}`;
|
|
const authorizationCallback = agentId
|
|
const authorizationCallback = agentId
|
|
- ? `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(tokenUrlAgentId)}&response_type=code&scope=snsapi_base&state=0&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,
|