Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
cloudSystem
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
dbbc0feb
authored
Aug 25, 2025
by
liangjianmin
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
在登录组件中添加方法注释,包括更新验证码、切换密码显示和登录功能,提升代码可读性。
parent
b3ba8573
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
src/views/User/login.vue
src/views/User/login.vue
View file @
dbbc0feb
...
...
@@ -111,6 +111,9 @@
},
computed
:
{},
methods
:
{
/**
* 更新验证码
*/
updateCp
()
{
this
.
$http
(
'get'
,
"/auth/cp"
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
...
...
@@ -121,9 +124,15 @@
console
.
log
(
err
.
message
);
})
},
/**
* 切换密码显示
*/
changePwd
:
function
()
{
this
.
pwdFlag
=
!
this
.
pwdFlag
;
},
/**
* 登录
*/
submit
()
{
var
myreg
=
/^1
(
3
[
0-9
]
|4
[
01456879
]
|5
[
0-35-9
]
|6
[
2567
]
|7
[
0-8
]
|8
[
0-9
]
|9
[
0-35-9
])\d{8}
$/
;
if
(
!
this
.
form
.
mobile
)
{
...
...
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