Commit 804c6c4b authored by 季圣华's avatar 季圣华
Browse files

规范登录接口

parent 7450eab5
......@@ -77,7 +77,7 @@ function loginFun() {
url: "/user/login",
dataType: "json",
data: ({
loginame: username,
loginName: username,
password: hex_md5(password)
}),
success: function (res) {
......
......@@ -59,7 +59,7 @@ public class UserController {
private static final String CODE_OK = "200";
@PostMapping(value = "/login")
public BaseResponseInfo login(@RequestParam(value = "loginame", required = false) String loginame,
public BaseResponseInfo login(@RequestParam(value = "loginName", required = false) String loginName,
@RequestParam(value = "password", required = false) String password,
HttpServletRequest request)throws Exception {
logger.info("============用户登录 login 方法调用开始==============");
......@@ -67,7 +67,7 @@ public class UserController {
User user=null;
BaseResponseInfo res = new BaseResponseInfo();
try {
String username = loginame.trim();
String username = loginName.trim();
password = password.trim();
//判断用户是否已经登录过,登录过不再处理
Object userInfo = request.getSession().getAttribute("user");
......
Supports Markdown
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