Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
804c6c4b
Commit
804c6c4b
authored
Feb 21, 2020
by
季圣华
Browse files
规范登录接口
parent
7450eab5
Changes
2
Hide whitespace changes
Inline
Side-by-side
erp_web/js/modules/sys/sysLogin.js
View file @
804c6c4b
...
...
@@ -77,7 +77,7 @@ function loginFun() {
url
:
"
/user/login
"
,
dataType
:
"
json
"
,
data
:
({
loginame
:
username
,
login
N
ame
:
username
,
password
:
hex_md5
(
password
)
}),
success
:
function
(
res
)
{
...
...
src/main/java/com/jsh/erp/controller/UserController.java
View file @
804c6c4b
...
...
@@ -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
=
"login
N
ame"
,
required
=
false
)
String
login
N
ame
,
@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
=
login
N
ame
.
trim
();
password
=
password
.
trim
();
//判断用户是否已经登录过,登录过不再处理
Object
userInfo
=
request
.
getSession
().
getAttribute
(
"user"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment