Commit 41979340 by 徐高华

host

parent 18363526
......@@ -94,11 +94,12 @@ public class LoginController extends WebBaseController {
@IgnoreLogin
public HaobanResponse login(String auth_code, HttpServletResponse response) {
String userJson = qywxCorpApiService.getLoginUserInfo(config.getCorpid(), auth_code);
String host = GlobalVar.ctxPropertiesMap.get("haoban_service_host") ;
if (StringUtils.isBlank(userJson)) {
logger.info("企微登录失败auth_code={}", auth_code);
String code = "1000" ;
try {
response.sendRedirect("/haoban-3/#/gic-error?errorCode="+code);
response.sendRedirect(host+"/haoban-3/#/gic-error?errorCode="+code);
} catch (IOException e) {
e.printStackTrace();
}
......@@ -111,7 +112,7 @@ public class LoginController extends WebBaseController {
logger.info("企微登录失败auth_code={}", auth_code);
String code = "1000" ;
try {
response.sendRedirect("/haoban-3/#/gic-error?errorCode="+code);
response.sendRedirect(host+"/haoban-3/#/gic-error?errorCode="+code);
} catch (IOException e) {
e.printStackTrace();
}
......@@ -122,7 +123,7 @@ public class LoginController extends WebBaseController {
logger.info("微信企业不存在corpId={}", corpId);
String code = "1000" ;
try {
response.sendRedirect("/haoban-3/#/gic-error?errorCode="+code);
response.sendRedirect(host+"/haoban-3/#/gic-error?errorCode="+code);
} catch (IOException e) {
e.printStackTrace();
}
......@@ -141,7 +142,7 @@ public class LoginController extends WebBaseController {
logger.info("登录失败,好办管理员不存在");
String code = "1000" ;
try {
response.sendRedirect("/haoban-3/#/gic-error?errorCode="+code);
response.sendRedirect(host+"/haoban-3/#/gic-error?errorCode="+code);
} catch (IOException e) {
e.printStackTrace();
}
......@@ -152,7 +153,7 @@ public class LoginController extends WebBaseController {
logger.info("未配置手机号,staffId ={}", loginStaff.getStaffId());
String code = "1000" ;
try {
response.sendRedirect("/haoban-3/#/gic-error?errorCode="+code);
response.sendRedirect(host+"/haoban-3/#/gic-error?errorCode="+code);
} catch (IOException e) {
e.printStackTrace();
}
......@@ -183,7 +184,7 @@ public class LoginController extends WebBaseController {
String code = this.doLogin(wxEnterpriseId, gicEnterpriseId, loginPhoneNumber, "gic", response);
if (StringUtils.isNotBlank(code)) {
try {
response.sendRedirect("/haoban-3/#/gic-error?errorCode="+code);
response.sendRedirect(host+"/haoban-3/#/gic-error?errorCode="+code);
} catch (IOException e) {
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