Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
cxt104926
Stusystem
提交
2bdc2be4
S
Stusystem
项目概览
cxt104926
/
Stusystem
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Stusystem
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2bdc2be4
编写于
3月 04, 2021
作者:
cxt104926
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug
上级
073c4f93
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
101 addition
and
12 deletion
+101
-12
src/main/resources/templates/login.html
src/main/resources/templates/login.html
+1
-1
src/main/resources/webapps/index.html
src/main/resources/webapps/index.html
+100
-11
未找到文件。
src/main/resources/templates/login.html
浏览文件 @
2bdc2be4
...
...
@@ -92,7 +92,7 @@
})
</script>
<style
lang=
"less"
>
<style>
.but
{
font-size
:
.14rem
;
color
:
#3c8dbc
...
...
src/main/resources/webapps/index.html
浏览文件 @
2bdc2be4
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<title>
stusystem
</title>
</head>
<body>
<div
id=
"app"
></div>
<h2>
这是首页
</h2>
<!-- built files will be auto injected -->
</body>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<title>
stusystem
</title>
</head>
<body>
<div
id=
"index"
>
<el-form
:model=
"addAndEditFormData"
:rules=
"addAndEditRules"
class=
"form"
>
<el-form-item
prop=
"account"
label=
"账号:"
:label-width=
"formLabelWidth"
>
<el-input
v-model=
"addAndEditFormData.account"
placeholder=
"请输入账号"
style=
"width:80%"
></el-input>
</el-form-item>
<el-form-item
prop=
"password"
label=
"密码:"
:label-width=
"formLabelWidth"
>
<el-input
v-model=
"addAndEditFormData.password"
placeholder=
"请输入密码"
style=
"width:80%"
></el-input>
</el-form-item>
<el-form-item
prop=
"verification"
label=
"验证码:"
:label-width=
"formLabelWidth"
>
<el-input
v-model=
"addAndEditFormData.verification"
placeholder=
"请输入验证码"
style=
"width:40%"
></el-input>
<img
id=
"img"
@
click=
"getVerification"
:src=
"imgSrc"
alt=
"验证码"
title=
"点击更换验证码"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"handleConfirmEvent"
><i
class=
"el-icon-upload"
></i>
登 录
</el-button>
</div>
<div>
<span>
还没有账号?
<a
href=
"/register"
>
去注册
</a></span>
</div>
</div>
<script>
export
default
{
name
:
'
index
'
,
data
()
{
return
{
addAndEditFormData
:
{
account
:
''
,
password
:
''
,
verification
:
''
},
imgSrc
:
'
/getVerify
'
,
message
:
''
,
addAndEditRules
:
{
account
:
{
required
:
true
,
message
:
'
账号不能为空
'
,
trigger
:
'
blur
'
},
password
:
{
required
:
true
,
message
:
'
密码不能为空
'
,
trigger
:
'
blur
'
},
verification
:
{
required
:
true
,
message
:
'
验证码不能为空
'
,
trigger
:
'
blur
'
},
},
// 样式数据
formLabelWidth
:
'
120px
'
,
}
},
created
()
{
},
methods
:
{
getVerification
()
{
let
number
=
Math
.
ceil
(
Math
.
random
()
*
10
);
this
.
imgSrc
=
'
/getVerify?
'
+
number
;
},
handleConfirmEvent
()
{
let
params
=
{
"
account
"
:
this
.
addAndEditFormData
.
account
,
"
password
"
:
this
.
addAndEditFormData
.
password
,
"
verification
"
:
this
.
addAndEditFormData
.
verification
};
this
.
$api
.
post
(
'
/login
'
,
params
).
then
(
e
=>
{
this
.
message
=
e
.
data
.
msg
;
if
(
e
.
data
.
code
===
200
)
{
this
.
$notify
({
title
:
'
成功
'
,
message
:
this
.
message
,
showClose
:
false
,
type
:
'
success
'
});
// 登录成功后跳转页面,1、请求后端返回页面;2、前端路由转发
}
else
{
this
.
$notify
({
title
:
'
失败
'
,
message
:
this
.
message
,
showClose
:
false
,
type
:
'
warning
'
});
}
});
},
}
}
</script>
<style>
.but
{
font-size
:
.14rem
;
color
:
#3c8dbc
}
</style>
</body>
</html>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录