@gingkoo/base-server 0.0.2-alpha.34 → 0.0.2-alpha.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
var httpclient = require('node-httpclient');
|
|
2
2
|
var util = require('../../../utils/util');
|
|
3
3
|
const jwt = require('../../../utils/jwt');
|
|
4
|
+
const config = require('../../../config/index');
|
|
4
5
|
const { logger } = require('../../logger');
|
|
5
6
|
const userService = require('../../services/user');
|
|
6
7
|
const configService = require('../../services/generalConfig');
|
|
@@ -16,7 +17,10 @@ const ginfoServices = require('../../ginfo/index');
|
|
|
16
17
|
const getRedirectUrl = async (userAgent) => {
|
|
17
18
|
let auth_redirect_url = '';
|
|
18
19
|
let data = await configService.getFromConfig({ GROUP_ID: 'qywx' });
|
|
19
|
-
let { qywx_AgentID, qywx_APPID
|
|
20
|
+
let { qywx_AgentID, qywx_APPID } = data;
|
|
21
|
+
|
|
22
|
+
let qywx_REDIRECT = config.app.qywx_redirect_uri || data.qywx_REDIRECT;
|
|
23
|
+
|
|
20
24
|
// qywx_REDIRECT = http://gingkoo.com/teams
|
|
21
25
|
let redirect_uri = `${qywx_REDIRECT}/wechat/auth/oauth/qywx/callback`;
|
|
22
26
|
|
package/backend/config/index.js
CHANGED