Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Q
qualityTesting_studentHome
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
tobacco
qualityTesting_studentHome
Commits
b354214f
提交
b354214f
authored
10月 22, 2024
作者:
zfl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
等保要求整改
上级
57c205ca
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
43 行增加
和
2 行删除
+43
-2
user.js
src/api/user.js
+9
-0
main.js
src/main.js
+3
-1
account.vue
src/views/login/components/account.vue
+26
-0
index.vue
src/views/login/index.vue
+5
-1
没有找到文件。
src/api/user.js
浏览文件 @
b354214f
...
@@ -159,3 +159,11 @@ export function getUserAnalysisTrend() {
...
@@ -159,3 +159,11 @@ export function getUserAnalysisTrend() {
method
:
'get'
,
method
:
'get'
,
})
})
}
}
//获取邮箱验证码
export
function
getCaptcha
()
{
return
request
({
url
:
'/api/getCaptcha'
,
method
:
'get'
})
}
\ No newline at end of file
src/main.js
浏览文件 @
b354214f
...
@@ -31,7 +31,9 @@ import echarts from 'echarts';
...
@@ -31,7 +31,9 @@ import echarts from 'echarts';
//引入加密函数,并将其封装
//引入加密函数,并将其封装
import
{
handleParams
,
Aesdecrypt
,
removeProperty
}
from
'@/utils/cryptoJS'
;
import
{
Aesencrypt
,
Aesdecrypt
,
removeProperty
,
handleParams
}
from
'@/utils/cryptoJS'
;
Vue
.
prototype
.
$Aesencrypt
=
Aesencrypt
;
//加密
Vue
.
prototype
.
$handleParams
=
handleParams
;
//封装机密格式的参数
Vue
.
prototype
.
$handleParams
=
handleParams
;
//封装机密格式的参数
Vue
.
prototype
.
$Aesdecrypt
=
Aesdecrypt
;
//封装机密格式的参数
Vue
.
prototype
.
$Aesdecrypt
=
Aesdecrypt
;
//封装机密格式的参数
Vue
.
prototype
.
$removeProperty
=
removeProperty
;
//去除空值
Vue
.
prototype
.
$removeProperty
=
removeProperty
;
//去除空值
...
...
src/views/login/components/account.vue
浏览文件 @
b354214f
...
@@ -30,6 +30,16 @@
...
@@ -30,6 +30,16 @@
</div>
</div>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
>
<el-row
style=
"padding-top:10px"
>
<el-col
:span=
"14"
>
<el-input
type=
"text"
v-model=
"loginForm.code"
placeholder=
"输入验证码"
></el-input>
</el-col>
<el-col
:span=
"10"
style=
"text-align: right; padding:2px 4px"
>
<img
@
click=
"getCaptcha_fun()"
:loading=
"Captcha_l"
:src=
"loginForm.image"
style=
"width: 98%;"
alt=
""
>
</el-col>
</el-row>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-form-item
prop=
"password"
>
<div>
<div>
<p
style=
"font-weight: bold; line-height: 25px"
class=
"pointer"
>
<p
style=
"font-weight: bold; line-height: 25px"
class=
"pointer"
>
...
@@ -57,6 +67,7 @@
...
@@ -57,6 +67,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getCaptcha
}
from
'@/api/user'
;
export
default
{
export
default
{
name
:
''
,
name
:
''
,
...
@@ -80,7 +91,11 @@ export default {
...
@@ -80,7 +91,11 @@ export default {
loginForm
:
{
loginForm
:
{
name
:
null
,
name
:
null
,
password
:
null
,
password
:
null
,
code
:
''
,
image
:
''
,
key
:
''
,
},
},
Captcha_l
:
false
,
passwordType
:
'password'
,
passwordType
:
'password'
,
loginRules
:
{
loginRules
:
{
name
:
[{
required
:
true
,
trigger
:
'blur'
,
validator
:
validateAccount
}],
name
:
[{
required
:
true
,
trigger
:
'blur'
,
validator
:
validateAccount
}],
...
@@ -91,6 +106,7 @@ export default {
...
@@ -91,6 +106,7 @@ export default {
};
};
},
},
mounted
()
{
mounted
()
{
this
.
getCaptcha_fun
()
// if (!this.loginForm.name) {
// if (!this.loginForm.name) {
// this.$refs.account_input.focus();
// this.$refs.account_input.focus();
// } else if (!this.loginForm.password) {
// } else if (!this.loginForm.password) {
...
@@ -98,6 +114,16 @@ export default {
...
@@ -98,6 +114,16 @@ export default {
// }
// }
},
},
methods
:
{
methods
:
{
getCaptcha_fun
(){
this
.
Captcha_l
=
true
getCaptcha
().
then
(
res
=>
{
if
(
res
.
img
){
this
.
loginForm
.
image
=
res
.
img
this
.
loginForm
.
key
=
res
.
key
this
.
Captcha_l
=
false
}
})
},
checkCapslock
(
e
)
{
checkCapslock
(
e
)
{
const
{
key
}
=
e
;
const
{
key
}
=
e
;
this
.
capsTooltip
=
key
&&
key
.
length
===
1
&&
key
>=
'A'
&&
key
<=
'Z'
;
this
.
capsTooltip
=
key
&&
key
.
length
===
1
&&
key
>=
'A'
&&
key
<=
'Z'
;
...
...
src/views/login/index.vue
浏览文件 @
b354214f
...
@@ -296,8 +296,12 @@ export default {
...
@@ -296,8 +296,12 @@ export default {
if
(
this
.
activeName
==
'account'
)
{
if
(
this
.
activeName
==
'account'
)
{
this
.
loading
=
true
;
this
.
loading
=
true
;
let
data
=
{
...
this
.
$refs
.
user_login
.
loginForm
,
password
:
this
.
$Aesencrypt
(
this
.
$refs
.
user_login
.
loginForm
.
password
)
}
this
.
$store
this
.
$store
.
dispatch
(
'user/AccountLogin'
,
this
.
$refs
.
user_login
.
loginForm
)
.
dispatch
(
'user/AccountLogin'
,
data
)
.
then
((
response
)
=>
{
.
then
((
response
)
=>
{
console
.
log
(
'登录返回值'
+
response
);
console
.
log
(
'登录返回值'
+
response
);
this
.
loading
=
false
;
this
.
loading
=
false
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论