Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2373e2f2
authored
Aug 15, 2025
by
孙美琪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录修改
parent
6e2e1291
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/views/login.vue
+7
-7
No files found.
src/views/login.vue
View file @
2373e2f2
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<h3
class=
"title"
>
面向科创园区的普惠算力公共服务平台
</h3>
<h3
class=
"title"
>
面向科创园区的普惠算力公共服务平台
</h3>
<el-tabs
v-model=
"activeName"
class=
"demo-tabs"
@
tab-click=
"handleClick"
>
<el-tabs
v-model=
"activeName"
class=
"demo-tabs"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"手机号登录"
:name=
"0"
style=
"padding-top: 10px;"
>
<el-tab-pane
label=
"手机号登录"
:name=
"0"
style=
"padding-top: 10px;"
>
<el-form-item
prop=
"phoneNumber"
>
<el-form-item
prop=
"phoneNumber"
v-if=
"activeName === 0"
>
<el-input
<el-input
v-model=
"loginForm.phoneNumber"
v-model=
"loginForm.phoneNumber"
type=
"text"
type=
"text"
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
</
template
>
</
template
>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"code"
>
<el-form-item
prop=
"code"
v-if=
"activeName === 0"
>
<el-input
<el-input
v-model=
"loginForm.code"
v-model=
"loginForm.code"
type=
"text"
type=
"text"
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<
/el-form-item
>
<
/el-form-item
>
<
/el-tab-pane
>
<
/el-tab-pane
>
<
el
-
tab
-
pane
label
=
"账号登录"
:
name
=
"1"
style
=
"padding-top: 10px;"
>
<
el
-
tab
-
pane
label
=
"账号登录"
:
name
=
"1"
style
=
"padding-top: 10px;"
>
<
el
-
form
-
item
prop
=
"mobile"
>
<
el
-
form
-
item
prop
=
"mobile"
v
-
if
=
"activeName === 1"
>
<
el
-
input
<
el
-
input
v
-
model
=
"loginForm.mobile"
v
-
model
=
"loginForm.mobile"
type
=
"text"
type
=
"text"
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
<
/template
>
<
/template
>
<
/el-input
>
<
/el-input
>
<
/el-form-item
>
<
/el-form-item
>
<
el
-
form
-
item
prop
=
"password"
>
<
el
-
form
-
item
prop
=
"password"
v
-
if
=
"activeName === 1"
>
<
el
-
input
<
el
-
input
v
-
model
=
"loginForm.password"
v
-
model
=
"loginForm.password"
type
=
"password"
type
=
"password"
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
size
=
"large"
size
=
"large"
type
=
"primary"
type
=
"primary"
style
=
"width:100%;"
style
=
"width:100%;"
@
click
.
prevent
=
"handleLogin
(activeName)
"
>
@
click
.
prevent
=
"handleLogin"
>
<
span
v
-
if
=
"!loading"
>
登
录
<
/span
>
<
span
v
-
if
=
"!loading"
>
登
录
<
/span
>
<
span
v
-
else
>
登
录
中
...
<
/span
>
<
span
v
-
else
>
登
录
中
...
<
/span
>
<
/el-button
>
<
/el-button
>
...
@@ -178,11 +178,11 @@ function handleClick() {
...
@@ -178,11 +178,11 @@ function handleClick() {
proxy
.
$refs
.
loginRef
.
resetFields
()
proxy
.
$refs
.
loginRef
.
resetFields
()
}
}
function
handleLogin
(
num
)
{
function
handleLogin
()
{
proxy
.
$refs
.
loginRef
.
validate
(
valid
=>
{
proxy
.
$refs
.
loginRef
.
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
loading
.
value
=
true
loading
.
value
=
true
if
(
num
===
1
)
{
if
(
activeName
.
value
===
1
)
{
// 勾选了需要记住密码设置在 cookie 中设置记住用户名和密码
// 勾选了需要记住密码设置在 cookie 中设置记住用户名和密码
if
(
loginForm
.
value
.
rememberMe
)
{
if
(
loginForm
.
value
.
rememberMe
)
{
Cookies
.
set
(
'mobile'
,
loginForm
.
value
.
mobile
,
{
expires
:
30
}
)
Cookies
.
set
(
'mobile'
,
loginForm
.
value
.
mobile
,
{
expires
:
30
}
)
...
...
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