Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gjjs
Overview
Overview
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
fukai
vue-gjjs
Commits
281009cd
Commit
281009cd
authored
May 14, 2021
by
fukai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
还原login
parent
6cf0a9a9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
93 additions
and
0 deletions
+93
-0
index.vue
src/views/Login/index.vue
+93
-0
No files found.
src/views/Login/index.vue
0 → 100644
View file @
281009cd
<
template
>
<div
class=
"loginContainer"
>
<div
id=
"loginForamWrapper"
>
<h2>
欢迎银行国际结算系统
</h2>
<div
id=
"loginForm"
>
<p
style=
"text-align:left;font-size:1.2em;color:#888"
>
用户登录 / LOGIN IN
</p>
<el-form
:model=
"loginForm"
status-icon
:rules=
"rules"
ref=
"loginForm"
size=
"small"
>
<el-form-item
prop=
"username"
>
<el-input
prefix-icon=
"el-icon-user"
placeholder=
"请输入登录名"
v-model=
"loginForm.username"
></el-input>
</el-form-item>
<el-form-item
prop=
"password"
>
<el-input
prefix-icon=
"el-icon-lock"
placeholder=
"请输入密码"
type=
"password"
v-model=
"loginForm.password"
autocomplete=
"off"
></el-input>
</el-form-item>
<el-form-item>
<el-button
style=
"width:100%;margin-top:1em;"
type=
"primary"
@
click=
"submitForm('loginForm')"
>
登录
</el-button>
</el-form-item>
</el-form>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
createNamespacedHelpers
}
from
'vuex'
const
{
mapState
,
mapMutations
,
mapActions
}
=
createNamespacedHelpers
(
'UserContext'
)
const
{
setLoginInfo
}
=
mapMutations
([
"setLoginInfo"
])
export
default
{
data
()
{
return
{
loginForm
:
{
password
:
''
,
username
:
''
},
rules
:{
username
:[
{
type
:
"string"
,
required
:
true
,
message
:
"请填写用户名"
}
],
password
:[
{
type
:
"string"
,
required
:
true
,
message
:
"请填写密码"
}
]
}
};
},
methods
:
{
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
setLoginInfo
({
userId
:
this
.
loginForm
.
username
})
this
.
$router
.
push
(
"/business/office"
);
}
else
{
console
.
log
(
'error submit!!'
);
return
false
;
}
});
},
resetForm
(
formName
)
{
this
.
$refs
[
formName
].
resetFields
();
},
setLoginInfo
}
}
</
script
>
<
style
>
.loginContainer
{
flex
:
1
;
background-image
:
url("../../assets/login_bg.png")
;
background-size
:
cover
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
#loginForamWrapper
{
width
:
340px
;
/* height:280px; */
}
#loginForm
{
background-color
:
white
;
padding
:
1em
2em
;
border
:
1px
solid
#d9d9d9
;
box-shadow
:
5px
5px
5px
0px
#d9d9d9
;
border-radius
:
3px
;
}
#loginForamWrapper
h2
{
color
:
#d9d9d9
;
font-family
:
宋体
;
}
</
style
>
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