Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Team6-Digital Insight for Health
Manage
Activity
Members
Labels
Plan
Issues
12
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chen Liang
Team6-Digital Insight for Health
Commits
cd951912
Commit
cd951912
authored
4 months ago
by
Yulong Wang
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Merge branch 'wyl' into 'main'"
This reverts merge request
!37
parent
ad1ba312
No related branches found
No related tags found
1 merge request
!43
Revert "Merge branch 'wyl' into 'main'"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/resources/application-dev.yml
+1
-1
1 addition, 1 deletion
src/main/resources/application-dev.yml
src/main/resources/static/html/superAdminView.html
+56
-0
56 additions, 0 deletions
src/main/resources/static/html/superAdminView.html
with
57 additions
and
1 deletion
src/main/resources/application-dev.yml
+
1
−
1
View file @
cd951912
...
...
@@ -3,4 +3,4 @@ healthcare:
url
:
jdbc:mysql://localhost:3306/health_care
port
:
3306
username
:
root
password
:
root
\ No newline at end of file
password
:
472500
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/resources/static/html/superAdminView.html
+
56
−
0
View file @
cd951912
...
...
@@ -62,5 +62,61 @@
}
})
var
bool
;
// 页面加载后生成验证码
window
.
onload
=
function
()
{
createCode
(
4
);
}
function
createCode
(
length
)
{
var
code
=
""
;
var
checkCode
=
document
.
getElementById
(
"
checkCode
"
);
var
codeChars
=
"
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
"
.
split
(
""
);
for
(
var
i
=
0
;
i
<
length
;
i
++
)
{
var
charNum
=
Math
.
floor
(
Math
.
random
()
*
codeChars
.
length
);
code
+=
codeChars
[
charNum
];
}
if
(
checkCode
)
{
checkCode
.
innerHTML
=
code
;
}
}
function
validateCode
()
{
var
inputCode
=
document
.
getElementById
(
"
inputCode
"
).
value
;
var
checkCode
=
document
.
getElementById
(
"
checkCode
"
).
innerHTML
;
if
(
!
inputCode
)
{
alert
(
"
Please enter the verification code!
"
);
return
false
;
}
if
(
inputCode
.
toUpperCase
()
!==
checkCode
.
toUpperCase
())
{
alert
(
"
Verification code error!
"
);
createCode
(
4
);
return
false
;
}
return
true
;
}
const
form
=
document
.
getElementById
(
'
loginForm
'
);
form
.
addEventListener
(
'
submit
'
,
function
(
event
)
{
event
.
preventDefault
();
// 验证验证码
if
(
!
validateCode
())
{
return
;
}
// 验证用户名和密码
const
username
=
document
.
getElementById
(
'
username
'
).
value
;
const
password
=
document
.
getElementById
(
'
password
'
).
value
;
if
(
username
===
'
2649783657@qq.com
'
&&
password
===
'
admin
'
)
{
alert
(
"
Login successful! Redirecting...
"
);
window
.
location
.
href
=
"
superAdminView.html
"
;
// 成功后跳转
}
else
{
alert
(
"
Invalid email or password. Please try again.
"
);
}
});
</script>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment