Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sh-ds
Project
Project
Details
Activity
Releases
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
李良停
sh-ds
Commits
ab664dc3
Commit
ab664dc3
authored
May 07, 2022
by
喻春霖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
前端配置
parent
2530f35f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
24 deletions
+25
-24
LoginController.java
...all/eden/authcenter/agent/controller/LoginController.java
+7
-9
application.yml
eden-authcenter-agent/src/main/resources/application.yml
+3
-0
authclient_list.html
.../src/main/resources/templates/config/authclient_list.html
+12
-12
index.html
...enter-agent/src/main/resources/templates/login/index.html
+2
-2
statistics.html
...center-agent/src/main/resources/templates/statistics.html
+1
-1
No files found.
eden-authcenter-agent/src/main/java/com/chineseall/eden/authcenter/agent/controller/LoginController.java
View file @
ab664dc3
package
com
.
chineseall
.
eden
.
authcenter
.
agent
.
controller
;
import
cn.sh.chineseall.framework.core.util.StringUtils
;
import
com.chineseall.eden.authcenter.agent.account.AdminUser
;
import
com.chineseall.eden.authcenter.agent.utils.JwtUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.Cookie
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -30,15 +28,15 @@ public class LoginController {
@PostMapping
(
"login"
)
public
String
login
(
HttpServletRequest
request
,
HttpServletResponse
response
,
@RequestBody
AdminUser
loginInfo
){
public
String
login
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
account
,
String
password
){
if
(
loginInfo
==
null
){
if
(
StringUtils
.
isEmpty
(
account
)
||
StringUtils
.
isEmpty
(
password
)
){
return
"/login/index"
;
}
if
(
Objects
.
equals
(
adminUser
.
getAccount
(),
loginInfo
.
getAccount
())
&&
Objects
.
equals
(
adminUser
.
getPassword
(),
loginInfo
.
getPassword
()
)){
if
(
Objects
.
equals
(
adminUser
.
getAccount
(),
account
)
&&
Objects
.
equals
(
adminUser
.
getPassword
(),
password
)){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"account"
,
loginInfo
.
getAccount
()
);
map
.
put
(
"password"
,
loginInfo
.
getPassword
()
);
map
.
put
(
"account"
,
account
);
map
.
put
(
"password"
,
password
);
Cookie
cookie
=
new
Cookie
(
"sign"
,
JwtUtils
.
createJWT
(
map
));
cookie
.
setMaxAge
(
24
*
60
*
60
);
cookie
.
setPath
(
"/"
);
...
...
eden-authcenter-agent/src/main/resources/application.yml
View file @
ab664dc3
...
...
@@ -178,4 +178,7 @@ oauthclient:
clientSecret
:
adaptive-learningSecret
admin-user
:
account
:
ac_admin
password
:
AC_PWD_2022
eden-authcenter-agent/src/main/resources/templates/config/authclient_list.html
View file @
ab664dc3
...
...
@@ -17,16 +17,16 @@
<meta
content=
""
name=
"description"
/>
<meta
content=
"width=device-width, initial-scale=1"
name=
"viewport"
/>
<title>
上海市中小学数字教材
</title>
<link
rel=
"stylesheet"
href=
"../../static/css/main_0327.css
"
/>
<link
rel=
"stylesheet"
href=
"../../static/css/statistics.css
"
/>
<link
rel=
"stylesheet"
href=
"../../static/css/bootstrap.min.css
"
/>
<link
rel=
"stylesheet"
href=
"../../static/css/normalize.css
"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../../static/css/iview.css
"
/>
<link
rel=
"shortcut icon"
href=
"../../static/img/favicon.ico
"
>
<script
type=
"text/javascript"
src=
"../../static/js/jquery-1.10.2.min.js
"
></script>
<script
src=
"../../static/js/echarts.min.js
"
></script>
<script
src=
"../../static/js/vue.js
"
></script>
<script
type=
"text/javascript"
src=
"../../static/js/iview.min.js
"
></script>
<link
rel=
"stylesheet"
th:href=
"@{/static/css/main_0327.css}
"
/>
<link
rel=
"stylesheet"
th:href=
"@{/static/css/statistics.css}
"
/>
<link
rel=
"stylesheet"
th:href=
"@{/static/css/bootstrap.min.css}
"
/>
<link
rel=
"stylesheet"
th:href=
"@{/static/css/normalize.css}
"
/>
<link
rel=
"stylesheet"
type=
"text/css"
th:href=
"@{/static/css/iview.css}
"
/>
<link
rel=
"shortcut icon"
th:href=
"@{/static/img/favicon.ico}
"
>
<script
type=
"text/javascript"
th:src=
"@{/static/js/jquery-1.10.2.min.js}
"
></script>
<script
th:src=
"@{/static/js/echarts.min.js}
"
></script>
<script
th:src=
"@{/static/js/vue.js}
"
></script>
<script
type=
"text/javascript"
th:src=
"@{/static/js/iview.min.js}
"
></script>
</head>
<body
style=
"background-color: rgb(244, 245, 245);"
>
...
...
@@ -39,12 +39,12 @@
<div
id=
"app"
class=
"static"
>
<div
class=
"statistics-header"
>
<div
class=
"flex"
style=
"display: flex; align-items: center;"
>
<img
src=
"../static/img/Rlogo.png
"
style=
"margin:5px 0; margin-left: 30px; width: 250px;"
alt=
""
>
<img
th:src=
"@{/static/img/Rlogo.png}
"
style=
"margin:5px 0; margin-left: 30px; width: 250px;"
alt=
""
>
<Divider
type=
"vertical"
style=
"height: 26px;"
></Divider>
<p
style=
"font-size: 14px; font-weight: 700;"
>
发现服务 · 速享之旅
</p>
</div>
<div
class=
"flex"
>
<img
src=
"../static/img/top-title.png
"
style=
"height: 22px;"
alt=
""
>
<img
th:src=
"@{/static/img/top-title.png}
"
style=
"height: 22px;"
alt=
""
>
</div>
<div
class=
"flex"
style=
"width: 33%;"
>
</div>
...
...
eden-authcenter-agent/src/main/resources/templates/login/index.html
View file @
ab664dc3
...
...
@@ -39,13 +39,13 @@
<div
class=
"form-group text-left"
style=
"float: left"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon"
id=
"basic-addon1"
><span
aria-hidden=
"true"
class=
"glyphicon glyphicon-user"
></span></span>
<input
aria-describedby=
"basic-addon1"
autocomplete=
"off"
class=
"form-control"
id=
"
username"
placeholder=
"请输入管理员账号"
size=
"25"
tabindex=
"1"
type=
"text"
name=
"userName
"
value=
""
/>
<input
aria-describedby=
"basic-addon1"
autocomplete=
"off"
class=
"form-control"
id=
"
account"
placeholder=
"请输入管理员账号"
size=
"25"
tabindex=
"1"
type=
"text"
name=
"account
"
value=
""
/>
</div>
</div>
<div
class=
"form-group text-left"
style=
"float: left"
>
<div
class=
"input-group"
>
<span
class=
"input-group-addon "
id=
"basic-addon2"
>
<span
aria-hidden=
"true"
class=
"glyphicon glyphicon-lock"
></span></span>
<input
aria-describedby=
"basic-addon1"
autocomplete=
"off"
class=
"form-control"
id=
"password"
placeholder=
"请输入管理员密码"
size=
"25"
tabindex=
"2"
type=
"password"
name=
"p
w
d"
/>
<input
aria-describedby=
"basic-addon1"
autocomplete=
"off"
class=
"form-control"
id=
"password"
placeholder=
"请输入管理员密码"
size=
"25"
tabindex=
"2"
type=
"password"
name=
"p
asswor
d"
/>
</div>
</div>
<button
accesskey=
"l"
class=
"btn btn-primary btn-block"
id=
"login-button"
style=
"outline: 0"
tabindex=
"6"
type=
"button"
onclick=
"toLogin()"
>
登录
...
...
eden-authcenter-agent/src/main/resources/templates/statistics.html
View file @
ab664dc3
...
...
@@ -172,7 +172,7 @@
</script>
<script
type=
"text/javascript"
>
var
baseUrl
=
"
https://ds-test.etextbook.cn/authcenter
"
;
var
baseUrl
=
"
/
"
;
var
colorList
=
[
'#6c5df1'
,
'#a78bf4'
,
'#fdbf3c'
,
'#ec6367'
,
'#2fcaa8'
,
'#79c161'
...
...
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