Commit 41979340 by 徐高华

host

parent 18363526
...@@ -94,11 +94,12 @@ public class LoginController extends WebBaseController { ...@@ -94,11 +94,12 @@ public class LoginController extends WebBaseController {
@IgnoreLogin @IgnoreLogin
public HaobanResponse login(String auth_code, HttpServletResponse response) { public HaobanResponse login(String auth_code, HttpServletResponse response) {
String userJson = qywxCorpApiService.getLoginUserInfo(config.getCorpid(), auth_code); String userJson = qywxCorpApiService.getLoginUserInfo(config.getCorpid(), auth_code);
String host = GlobalVar.ctxPropertiesMap.get("haoban_service_host") ;
if (StringUtils.isBlank(userJson)) { if (StringUtils.isBlank(userJson)) {
logger.info("企微登录失败auth_code={}", auth_code); logger.info("企微登录失败auth_code={}", auth_code);
String code = "1000" ; String code = "1000" ;
try { try {
response.sendRedirect("/haoban-3/#/gic-error?errorCode="+code); response.sendRedirect(host+"/haoban-3/#/gic-error?errorCode="+code);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
...@@ -111,7 +112,7 @@ public class LoginController extends WebBaseController { ...@@ -111,7 +112,7 @@ public class LoginController extends WebBaseController {
logger.info("企微登录失败auth_code={}", auth_code); logger.info("企微登录失败auth_code={}", auth_code);
String code = "1000" ; String code = "1000" ;
try { try {
response.sendRedirect("/haoban-3/#/gic-error?errorCode="+code); response.sendRedirect(host+"/haoban-3/#/gic-error?errorCode="+code);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
...@@ -122,7 +123,7 @@ public class LoginController extends WebBaseController { ...@@ -122,7 +123,7 @@ public class LoginController extends WebBaseController {
logger.info("微信企业不存在corpId={}", corpId); logger.info("微信企业不存在corpId={}", corpId);
String code = "1000" ; String code = "1000" ;
try { try {
response.sendRedirect("/haoban-3/#/gic-error?errorCode="+code); response.sendRedirect(host+"/haoban-3/#/gic-error?errorCode="+code);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
...@@ -141,7 +142,7 @@ public class LoginController extends WebBaseController { ...@@ -141,7 +142,7 @@ public class LoginController extends WebBaseController {
logger.info("登录失败,好办管理员不存在"); logger.info("登录失败,好办管理员不存在");
String code = "1000" ; String code = "1000" ;
try { try {
response.sendRedirect("/haoban-3/#/gic-error?errorCode="+code); response.sendRedirect(host+"/haoban-3/#/gic-error?errorCode="+code);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
...@@ -152,7 +153,7 @@ public class LoginController extends WebBaseController { ...@@ -152,7 +153,7 @@ public class LoginController extends WebBaseController {
logger.info("未配置手机号,staffId ={}", loginStaff.getStaffId()); logger.info("未配置手机号,staffId ={}", loginStaff.getStaffId());
String code = "1000" ; String code = "1000" ;
try { try {
response.sendRedirect("/haoban-3/#/gic-error?errorCode="+code); response.sendRedirect(host+"/haoban-3/#/gic-error?errorCode="+code);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
...@@ -183,7 +184,7 @@ public class LoginController extends WebBaseController { ...@@ -183,7 +184,7 @@ public class LoginController extends WebBaseController {
String code = this.doLogin(wxEnterpriseId, gicEnterpriseId, loginPhoneNumber, "gic", response); String code = this.doLogin(wxEnterpriseId, gicEnterpriseId, loginPhoneNumber, "gic", response);
if (StringUtils.isNotBlank(code)) { if (StringUtils.isNotBlank(code)) {
try { try {
response.sendRedirect("/haoban-3/#/gic-error?errorCode="+code); response.sendRedirect(host+"/haoban-3/#/gic-error?errorCode="+code);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment