Commit 5cf92c36 by qwmqiuwenmin

fix

parent 94394695
......@@ -21,6 +21,9 @@ import com.gic.wechat.api.service.qywx.QywxCorpApiService;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletResponse;
@RestController
public class LoginController extends WebBaseController{
......@@ -37,7 +40,7 @@ public class LoginController extends WebBaseController{
private Config config;
@RequestMapping("login")
public String login(String auth_code) {
public void login(String auth_code,HttpServletResponse response) {
String siteId = config.getSuiteId();
String userId = qywxCorpApiService.getUserInfoSimple(siteId,auth_code);
logger.info("【企业微信登录】userId={},auth_code={}",userId,auth_code);
......@@ -49,8 +52,9 @@ public class LoginController extends WebBaseController{
loginVO.setWxEnterpriseId(staff.getWxEnterpriseId());
loginVO.setStaffDTO(staff);
AuthRequestUtil.setSessionUser(loginVO);
return "redirect:https://www.gicdev.com/haoban-3/#/index";
String redirectUri = config.getHost() + "index";
redirectUri.replace("haoban-manage3-web", "haoban-3/#/");
response.encodeRedirectUrl(redirectUri);
}
......
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