Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sup-server
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
sup-server
Commits
71002fef
Commit
71002fef
authored
Nov 11, 2022
by
huangjie122
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://47.105.106.177:66/root/sup-server
parents
e2c09a3a
82cbc3de
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
4 deletions
+15
-4
login.js
dsk-srm-server/src/api/login.js
+1
-1
user-module.js
dsk-srm-server/src/store/modules/user-module.js
+2
-2
SecurityConfig.java
...n/java/com/supServer/framework/config/SecurityConfig.java
+1
-1
UserController.java
...java/com/supServer/project/controller/UserController.java
+11
-0
No files found.
dsk-srm-server/src/api/login.js
View file @
71002fef
...
...
@@ -53,6 +53,6 @@ export const loginOutApi = () => network({
});
export
const
getUserInfoApi
=
()
=>
network
({
url
:
""
,
url
:
"
/getInfo
"
,
method
:
"post"
});
dsk-srm-server/src/store/modules/user-module.js
View file @
71002fef
...
...
@@ -27,8 +27,8 @@ const actions = {
// 登录api调用
loginApi
(
payload
).
then
(
res
=>
{
// 获取token
commit
(
"SET_TOKEN"
,
res
.
data
);
setToken
(
res
.
data
);
commit
(
"SET_TOKEN"
,
res
.
token
);
setToken
(
res
.
token
);
resolve
(
res
);
}).
catch
(
err
=>
{
console
.
log
(
err
);
...
...
src/main/java/com/supServer/framework/config/SecurityConfig.java
View file @
71002fef
...
...
@@ -101,7 +101,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求
.
authorizeRequests
()
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
.
antMatchers
(
"/login"
,
"/register"
,
"/captchaImage"
,
"/resetPwd"
,
"/findAccount"
,
"/smsLogin"
,
"/forgotPassword"
,
"/checkUser"
).
anonymous
()
.
antMatchers
(
"/login"
,
"/register"
,
"/captchaImage"
,
"/resetPwd"
,
"/findAccount"
,
"/smsLogin"
,
"/forgotPassword"
,
"/checkUser"
,
"/category/list/tree"
,
"/validateCaptcha"
,
"/file/uploadFile"
).
anonymous
()
.
antMatchers
(
HttpMethod
.
GET
,
"/"
,
...
...
src/main/java/com/supServer/project/controller/UserController.java
View file @
71002fef
...
...
@@ -3,6 +3,7 @@ package com.supServer.project.controller;
import
com.supServer.common.constant.Constants
;
import
com.supServer.common.constant.UserConstants
;
import
com.supServer.framework.security.mode.LoginBody
;
import
com.supServer.framework.security.mode.LoginUser
;
import
com.supServer.framework.security.mode.RegisterBody
;
import
com.supServer.framework.security.mode.SmsLoginBody
;
import
com.supServer.framework.security.service.TokenService
;
...
...
@@ -178,4 +179,14 @@ public class UserController {
}
/*** 获取用户信息
*@Param:
*@return:
*/
@GetMapping
(
"/getInfo"
)
public
AjaxResult
getInfo
(
HttpServletRequest
request
){
LoginUser
user
=
tokenService
.
getLoginUser
(
request
);
return
AjaxResult
.
success
(
"操作成功"
,
user
);
}
}
Write
Preview
Markdown
is supported
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