Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
techbook
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
front-end-dev
techbook
Commits
8520bbeb
Commit
8520bbeb
authored
Aug 15, 2019
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
找回密码
parent
d7ad45f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
11 deletions
+20
-11
findPasswordCmpt.vue
src/components/register/findPasswordCmpt.vue
+20
-11
No files found.
src/components/register/findPasswordCmpt.vue
View file @
8520bbeb
...
...
@@ -3,11 +3,11 @@
<p>
找回密码
</p>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
class=
"demo-loginForm"
>
<el-form-item
prop=
"email"
required
>
<el-input
v-model
=
"ruleForm.email"
placeholder=
"请输入手机号或邮箱
"
autocomplete
></el-input>
<el-form-item
prop=
"email"
>
<el-input
v-model
.
trim=
"ruleForm.email"
:placeholder=
"lang==1?'请输入手机号':'请输入邮箱'
"
autocomplete
></el-input>
</el-form-item>
<el-form-item
prop=
"code"
class=
"yzcodeItem"
required
>
<el-input
type=
"text"
v-model
=
"ruleForm.code"
placeholder=
"请输入手机/邮箱验证码
"
style=
"float: left;"
<el-input
type=
"text"
v-model
.
trim=
"ruleForm.code"
:placeholder=
"lang==1?'请输入手机验证码':'请输入邮箱验证码'
"
style=
"float: left;"
autocomplete
></el-input>
<!--
<span
class=
"getyzcodeBtn"
>
{{
codehtml
}}
</span>
-->
<span
class=
"getdyzcodeBtn"
@
click=
"handleGetCode"
>
{{
codehtml
}}
</span>
...
...
@@ -24,9 +24,12 @@
</
template
>
<
script
>
import
validate
from
'../../common/validate'
;
import
publicFunc
from
'../../common/public'
;
export
default
{
name
:
"findPasswordCmpt"
,
data
(){
const
that
=
this
;
return
{
codehtml
:
"获取验证码"
,
lang
:
window
.
localStorage
.
getItem
(
"lang"
)
==
"zh-CN"
?
1
:
2
,
...
...
@@ -34,24 +37,31 @@
email
:
""
,
code
:
""
},
validateWhich
:
null
,
rules
:{
email
:
[
{
required
:
true
,
message
:
'请输入手机号'
,
trigger
:
'blur'
},
{
max
:
11
,
message
:
'长度在 11 个字符'
,
trigger
:
'blur'
}
{
required
:
false
,
validator
:
window
.
localStorage
.
getItem
(
"lang"
)
==
"zh-CN"
?
validate
.
checkMobile
:
validate
.
checkEmail
,
trigger
:
'blur'
}
],
pass
:[
{
required
:
true
,
message
:
'请输入密码'
,
trigger
:
'blur'
},
{
min
:
6
,
max
:
18
,
message
:
'长度在 6 到 18 个字符'
,
trigger
:
'blur'
}
{
required
:
true
,
validator
:
validate
.
checkPassWord
,
trigger
:
'blur'
},
{
min
:
6
,
max
:
18
,
message
:
'
密码
长度在 6 到 18 个字符'
,
trigger
:
'blur'
}
],
code
:
[{
required
:
true
,
message
:
'请输入验证码'
,
trigger
:
'blur'
},
{
m
ax
:
4
,
message
:
'长度在 4
个字符'
,
trigger
:
'blur'
}]
code
:
[{
required
:
true
,
validator
:
validate
.
checkCode
,
trigger
:
'blur'
},
{
m
in
:
4
,
max
:
6
,
message
:
'长度在 4 到 6
个字符'
,
trigger
:
'blur'
}]
}
}
},
methods
:{
//确认
handleSubmit
(
formName
){
this
.
$router
.
replace
(
"/modifyPasswordCmpt"
)
const
that
=
this
;
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
that
.
$router
.
replace
(
"/modifyPasswordCmpt"
)
}
else
{
return
false
;
}
});
},
//获取验证码
...
...
@@ -66,7 +76,6 @@
}
},
mounted
(){
}
}
</
script
>
...
...
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