Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
folacin-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ynby
folacin-front
Commits
efa0acbb
Commit
efa0acbb
authored
Jul 16, 2021
by
罗成兵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分配记录
parent
1c20918c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
7 deletions
+26
-7
Login.vue
src/views/Login.vue
+26
-7
No files found.
src/views/Login.vue
View file @
efa0acbb
...
...
@@ -8,9 +8,14 @@
</div>
<a-form-model
:model=
"formData"
:rules=
"formRules"
class=
"login_form"
ref=
"formRef"
>
<a-form-model-item
prop=
"username"
>
<a-input
placeholder=
"请输入用户名"
v-model=
"formData.username"
size=
"large"
@
keyup
.
enter=
"login"
>
<a-icon
slot=
"prefix"
type=
"user"
/>
</a-input>
<!--
<a-input
placeholder=
"请输入用户名"
v-model=
"formData.username"
size=
"large"
@
keyup
.
enter=
"login"
>
-->
<!--
<a-icon
slot=
"prefix"
type=
"user"
/>
-->
<!--
</a-input>
-->
<a-select
v-model=
"formData.username"
size=
"large"
@
change=
"userChange"
>
<a-select-option
v-for=
"(i,index) in userList"
:key=
"i.userName"
:value=
"index"
>
{{
i
.
unitName
+
"("
+
i
.
userName
+
")"
}}
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item
prop=
"password"
>
<a-input-password
placeholder=
"请输入密码"
v-model=
"formData.password"
size=
"large"
...
...
@@ -55,7 +60,8 @@
components
:
{
Verify
},
data
()
{
return
{
formData
:
{
username
:
"530000yyb"
,
password
:
"ynby2020"
},
userList
:
[],
formData
:
{},
formRules
:
{},
captchaVerificationVis
:
true
,
captchaVerification
:
{},
...
...
@@ -63,13 +69,26 @@
}
},
created
()
{
let
unitNames
=
[
"云南省妇幼保健院"
,
"昆明市妇幼保健院"
,
"五华区妇幼保健院"
,
"五华区普吉大普吉社区卫生服务中心"
,
"五华区普吉新村社区卫生服务站"
,
"五华区普吉林家院社区卫生服务站"
,
"五华区大观社区卫生服务中心"
,
"五华区护国南通街社区卫生服务站"
,
"五华区大观新闻里社区卫生服务中心"
];
let
userNames
=
[
"3163915418"
,
"3458022605"
,
"4040050358"
,
"0892676849"
,
"7381485204"
,
"4681975615"
,
"0580382354"
,
"2409311755"
,
"7531945226"
];
let
passwords
=
[
"079231"
,
"078730"
,
"073657"
,
"07473X"
,
"072179"
,
"074991"
,
"076479"
,
"079813"
,
"076831"
];
unitNames
.
forEach
((
x
,
index
)
=>
{
this
.
userList
.
push
({
unitName
:
x
,
userName
:
userNames
[
index
],
password
:
passwords
[
index
]});
})
},
methods
:
{
userChange
(
value
)
{
this
.
formData
.
username
=
this
.
userList
[
value
].
userName
;
this
.
formData
.
password
=
this
.
userList
[
value
].
password
;
},
login
()
{
this
.
loading
=
true
;
let
fromData
=
new
FormData
();
fromData
.
append
(
"username"
,
aesEncrypt
(
this
.
formData
.
username
));
fromData
.
append
(
"password"
,
aesEncrypt
(
this
.
formData
.
password
));
fromData
.
append
(
"username"
,
aesEncrypt
(
"9028584165"
));
fromData
.
append
(
"password"
,
aesEncrypt
(
"074332"
));
fromData
.
append
(
"captchaVerification"
,
this
.
captchaVerification
.
captchaVerification
...
...
@@ -80,7 +99,7 @@
sessionStorage
.
setItem
(
'token'
,
'bearer'
+
' '
+
res
.
data
.
data
.
token
);
this
.
$router
.
push
(
'/'
)
this
.
$message
.
success
(
res
.
data
.
msg
)
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
data
.
msg
)
}
this
.
loading
=
false
;
...
...
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