Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FLIPPED-AURORA
gin-vue-admin
提交
1844d13b
G
gin-vue-admin
项目概览
FLIPPED-AURORA
/
gin-vue-admin
大约 1 年 前同步成功
通知
333
Star
18155
Fork
5506
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
1844d13b
编写于
11月 09, 2021
作者:
Mr.奇淼(
提交者:
GitHub
11月 09, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #795 from flipped-aurora/update
调整验证码校验规则保证前后端配置一致 #794
上级
df8c1e63
ef67dded
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
148 deletion
+20
-148
server/api/v1/system/sys_captcha.go
server/api/v1/system/sys_captcha.go
+3
-2
server/model/system/response/sys_captcha.go
server/model/system/response/sys_captcha.go
+3
-2
web/src/style/login.scss
web/src/style/login.scss
+0
-128
web/src/view/login/index.vue
web/src/view/login/index.vue
+14
-16
未找到文件。
server/api/v1/system/sys_captcha.go
浏览文件 @
1844d13b
...
...
@@ -34,8 +34,9 @@ func (b *BaseApi) Captcha(c *gin.Context) {
response
.
FailWithMessage
(
"验证码获取失败"
,
c
)
}
else
{
response
.
OkWithDetailed
(
systemRes
.
SysCaptchaResponse
{
CaptchaId
:
id
,
PicPath
:
b64s
,
CaptchaId
:
id
,
PicPath
:
b64s
,
CaptchaLength
:
global
.
GVA_CONFIG
.
Captcha
.
KeyLong
,
},
"验证码获取成功"
,
c
)
}
}
server/model/system/response/sys_captcha.go
浏览文件 @
1844d13b
package
response
type
SysCaptchaResponse
struct
{
CaptchaId
string
`json:"captchaId"`
PicPath
string
`json:"picPath"`
CaptchaId
string
`json:"captchaId"`
PicPath
string
`json:"picPath"`
CaptchaLength
int
`json:"captchaLength""`
}
web/src/style/login.scss
已删除
100644 → 0
浏览文件 @
df8c1e63
.login-register-box
{
height
:
100vh
;
.login-box
{
width
:
40vw
;
position
:
absolute
;
left
:
50%
;
margin-left
:
-22vw
;
top
:
5vh
;
.logo
{
height
:
35vh
;
width
:
35vh
;
}
}
}
.link-icon
{
width
:
20px
;
min-width
:
20px
;
height
:
20px
;
border-radius
:
10px
;
}
.vPic
{
width
:
33%
;
height
:
38px
;
float
:
right
!
important
;
background
:
#ccc
;
img
{
cursor
:
pointer
;
vertical-align
:
middle
;
}
}
.logo_login
{
width
:
100px
;
}
#userLayout
.user-layout-wrapper
{
height
:
100%
;
position
:
relative
;
&
.mobile
{
.container
{
.main
{
max-width
:
368px
;
width
:
98%
;
}
}
}
.container
{
position
:
relative
;
overflow
:
auto
;
width
:
100%
;
min-height
:
100%
;
background
:
#f0f2f5
url(@/assets/background.svg)
no-repeat
50%
;
background-size
:
100%
;
padding
:
110px
0
144px
;
a
{
text-decoration
:
none
;
}
.top
{
text-align
:
center
;
margin-top
:
-40px
;
.header
{
height
:
44px
;
line-height
:
44px
;
margin-bottom
:
30px
;
.badge
{
position
:
absolute
;
display
:
inline-block
;
line-height
:
1
;
vertical-align
:
middle
;
margin-left
:
-12px
;
margin-top
:
-10px
;
opacity
:
0
.8
;
}
.logo
{
height
:
44px
;
vertical-align
:
top
;
margin-right
:
16px
;
border-style
:
none
;
}
.title
{
font-size
:
33px
;
color
:
rgba
(
0
,
0
,
0
,
0
.85
);
font-family
:
Avenir
,
"Helvetica Neue"
,
Arial
,
Helvetica
,
sans-serif
;
font-weight
:
600
;
position
:
relative
;
top
:
2px
;
}
}
.desc
{
font-size
:
14px
;
color
:
rgba
(
0
,
0
,
0
,
0
.45
);
margin-top
:
12px
;
}
}
.main
{
min-width
:
260px
;
width
:
368px
;
margin
:
0
auto
;
}
.footer
{
position
:
relative
;
width
:
100%
;
padding
:
0
20px
;
margin
:
40px
0
10px
;
text-align
:
center
;
.links
{
margin-bottom
:
8px
;
font-size
:
14px
;
width
:
330px
;
display
:
inline-flex
;
flex-direction
:
row
;
justify-content
:
space-between
;
padding-right
:
40px
;
a
{
color
:
rgba
(
0
,
0
,
0
,
0
.45
);
transition
:
all
0
.3s
;
}
}
.copyright
{
color
:
rgba
(
0
,
0
,
0
,
0
.45
);
font-size
:
14px
;
padding-right
:
40px
;
}
}
}
}
\ No newline at end of file
web/src/view/login/index.vue
浏览文件 @
1844d13b
...
...
@@ -7,7 +7,7 @@
class=
"login_panle_form_title_logo"
:src=
"$GIN_VUE_ADMIN.appLogo"
alt
/
>
>
<p
class=
"login_panle_form_title_p"
>
{{
$GIN_VUE_ADMIN
.
appName
}}
</p>
</div>
<el-form
...
...
@@ -50,19 +50,20 @@
:src=
"picPath"
alt=
"请输入验证码"
@
click=
"loginVerify()"
/
>
>
</div>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
style=
"width: 46%"
@
click=
"checkInit"
>
前往初始化
</el-button
>
<el-button
type=
"primary"
style=
"width: 46%"
@
click=
"checkInit"
>
前往初始化
</el-button>
<el-button
type=
"primary"
style=
"width: 46%; margin-left: 8%"
@
click=
"submitForm"
>
登 录
</el-button
>
>
登 录
</el-button>
</el-form-item>
</el-form>
</div>
...
...
@@ -70,16 +71,16 @@
<div
class=
"login_panle_foot"
>
<div
class=
"links"
>
<a
href=
"http://doc.henrongyi.top/"
>
<img
src=
"@/assets/docs.png"
class=
"link-icon"
/
>
<img
src=
"@/assets/docs.png"
class=
"link-icon"
>
</a>
<a
href=
"https://www.yuque.com/flipped-aurora/"
>
<img
src=
"@/assets/yuque.png"
class=
"link-icon"
/
>
<img
src=
"@/assets/yuque.png"
class=
"link-icon"
>
</a>
<a
href=
"https://github.com/flipped-aurora/gin-vue-admin"
>
<img
src=
"@/assets/github.png"
class=
"link-icon"
/
>
<img
src=
"@/assets/github.png"
class=
"link-icon"
>
</a>
<a
href=
"https://space.bilibili.com/322210472"
>
<img
src=
"@/assets/video.png"
class=
"link-icon"
/
>
<img
src=
"@/assets/video.png"
class=
"link-icon"
>
</a>
</div>
<div
class=
"copyright"
>
...
...
@@ -124,8 +125,6 @@ export default {
password
:
[{
validator
:
checkPassword
,
trigger
:
'
blur
'
}],
captcha
:
[{
required
:
true
,
message
:
'
请输入验证码
'
,
trigger
:
'
blur
'
},
{
min
:
5
,
max
:
6
,
message
:
'
验证码格式不正确
'
,
trigger
:
'
blur
'
,
}]
...
...
@@ -180,6 +179,8 @@ export default {
},
loginVerify
()
{
captcha
({}).
then
((
ele
)
=>
{
this
.
rules
.
captcha
[
1
].
max
=
ele
.
data
.
captchaLength
this
.
rules
.
captcha
[
1
].
min
=
ele
.
data
.
captchaLength
this
.
picPath
=
ele
.
data
.
picPath
this
.
loginForm
.
captchaId
=
ele
.
data
.
captchaId
})
...
...
@@ -189,9 +190,6 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
@import
"@/style/newLogin.scss"
;
</
style
>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录