|
@@ -444,8 +444,8 @@ module.exports = app => {
|
|
|
}
|
|
|
const result = await ctx.service.project.verifyManagementProject(ctx.helper.createJWT({ code }));
|
|
|
const token = ctx.helper.createJWT({ code, account })
|
|
|
- const redirect = `${app.config.env === 'local' ? 'http://pmqa.smartcost.com.cn/auth' : 'http://pm.6jlzf.cn/auth'}?token=${token}`
|
|
|
- response.data = { ...result, is_admin: ctx.session.sessionUser.account === ctx.session.sessionProject.userAccount, redirect};
|
|
|
+ const redirect = `${app.config.managementPath}/auth?token=${token}`
|
|
|
+ response.data = { ...result, is_admin: ctx.session.sessionUser.account === ctx.session.sessionProject.userAccount, redirect, env: app.config.env};
|
|
|
} catch (error) {
|
|
|
response.code = -1;
|
|
|
response.msg = error.toString();
|
|
@@ -471,7 +471,7 @@ module.exports = app => {
|
|
|
const { code = -1, data: { token = ''} = { token: ''}, msg = '请求失败' } = result
|
|
|
if ( code === 0 && token) {
|
|
|
response.data = {
|
|
|
- redirect: `${app.config.env === 'prod' ? 'http://pmqa.smartcost.com.cn' : 'http://pm.6jlzf.cn'}?token=${token}`
|
|
|
+ redirect: `${app.config.managementPath}/auth?token=${token}`,
|
|
|
}
|
|
|
} else {
|
|
|
throw new Error(msg)
|