Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
674be137
Commit
674be137
authored
Dec 04, 2019
by
李宏达
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注册页面
parent
6e5ce53b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
290 additions
and
20 deletions
+290
-20
igirl-web/app/front/vues/pages/register/register.html
+3
-20
igirl-web/app/front/vues/pages/register/register.js
+287
-0
No files found.
igirl-web/app/front/vues/pages/register/register.html
View file @
674be137
<div
id=
"bychpage"
class=
"login"
v-if=
"companyinfo.company.siteTheme == \'policy\'"
>
<gsb-pcpage>
<div
id=
"bychpage"
class=
"login"
v-if=
"companyinfo.company.siteTheme == \'policy\'"
>
<div
style=
"width:100%;margin: 0 auto;"
>
<div
style=
"width:100%;margin: 0 auto;"
>
<div
style=
"z-index:1;position:relative;background-color:#31373b"
>
<div
style=
"z-index:1;position:relative;background-color:#31373b"
>
<img
style=
"width:100%;height:auto"
:src=
"loginUrl"
/>
<img
style=
"width:100%;height:auto"
:src=
"loginUrl"
/>
...
@@ -8,19 +6,6 @@
...
@@ -8,19 +6,6 @@
<span
class=
"tong"
>
政企通
</span>
<span
class=
"tong"
>
政企通
</span>
<span
class=
"shujuzi"
>
政策大数据服务平台
</span>
<span
class=
"shujuzi"
>
政策大数据服务平台
</span>
</div>
</div>
<div
style=
"padding-bottom:20px"
>
<!-- <el-radio-group v-model="actname" @change="rdochange">
<el-radio label="person">个人用户注册</el-radio>
<el-radio label="ent">企业用户注册</el-radio>
</el-radio-group> -->
<div
style=
"border-bottom:solid 1px #eee;margin-top:20px;margin-bottom:15px"
></div>
<gsb-form
key=
"pregisterFrm"
style=
"width:50%;margin: auto;"
ref=
"pregisterFrm"
@
btnclick=
"btnclick"
:metaData=
"mds"
:refvalidatemethod=
"validmethod"
>
<h2
slot=
"title"
>
欢迎注册{{ this.$root.currentCompany?this.$root.currentCompany.sitename:"知圈圈"}}
</h2>
<el-button
slot=
"buttonarea"
type=
"primary"
style=
"width:60%"
@
click=
"sbhandler"
>
提交
</el-button>
</gsb-form>
</div>
<div
class=
"login-div"
v-if=
"a"
>
<div
class=
"login-div"
v-if=
"a"
>
<div
class=
"login-content"
style=
"width: 380px;
<div
class=
"login-content"
style=
"width: 380px;
height: 508px;
height: 508px;
...
@@ -154,8 +139,8 @@
...
@@ -154,8 +139,8 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
v-else
>
<gsb-pcpage
v-else
>
<div
style=
"padding-bottom:20px"
>
<div
style=
"padding-bottom:20px"
>
<!-- <el-radio-group v-model="actname" @change="rdochange">
<!-- <el-radio-group v-model="actname" @change="rdochange">
<el-radio label="person">个人用户注册</el-radio>
<el-radio label="person">个人用户注册</el-radio>
...
@@ -168,5 +153,4 @@
...
@@ -168,5 +153,4 @@
<el-button
slot=
"buttonarea"
type=
"primary"
style=
"width:60%"
@
click=
"sbhandler"
>
提交
</el-button>
<el-button
slot=
"buttonarea"
type=
"primary"
style=
"width:60%"
@
click=
"sbhandler"
>
提交
</el-button>
</gsb-form>
</gsb-form>
</div>
</div>
</div>
</gsb-pcpage>
</gsb-pcpage>
\ No newline at end of file
igirl-web/app/front/vues/pages/register/register.js
View file @
674be137
...
@@ -19,6 +19,11 @@
...
@@ -19,6 +19,11 @@
return
callback
();
return
callback
();
};
};
return
{
return
{
mds
:[],
emds
:[],
vcode
:
""
,
actname
:
"person"
,
currentFrm
:
null
,
ldms
:[],
ldms
:[],
activeIndex
:
"1"
,
activeIndex
:
"1"
,
loginUrl
:
""
,
loginUrl
:
""
,
...
@@ -102,6 +107,80 @@
...
@@ -102,6 +107,80 @@
}
}
},
},
mounted
:
function
(){
mounted
:
function
(){
this
.
mds
=
[
{
"title"
:
"用户名"
,
"validProp"
:
"userName"
,
"rule"
:
[
{
"required"
:
true
,
"message"
:
'请输入用户名'
,
"trigger"
:
'blur'
},
],
"ctls"
:[
{
"type"
:
"input"
,
"label"
:
"用户名"
,
"prop"
:
"userName"
,
"placeHolder"
:
"请输入用户名"
,
"style"
:
""
},
]
},
{
"title"
:
"用户密码"
,
"validProp"
:
"password"
,
"rule"
:
[
{
"required"
:
true
,
"message"
:
'请输入用户密码'
,
"trigger"
:
'blur'
},
],
ctls
:[
{
"type"
:
"input"
,
"label"
:
"用户密码"
,
"prop"
:
"password"
,
"placeHolder"
:
"请输入用户密码"
,
"style"
:
""
},
]
},
{
"title"
:
"确认密码"
,
"validProp"
:
"cfmpwd"
,
"rule"
:
[
{
"validator"
:
"validatex"
,
"trigger"
:
'blur'
},
{
"required"
:
true
,
"message"
:
'请输入确认密码'
,
"trigger"
:
'blur'
},
],
ctls
:[
{
"type"
:
"input"
,
"label"
:
"确认密码"
,
"prop"
:
"cfmpwd"
,
"placeHolder"
:
"请输入确认密码"
,
"style"
:
""
},
]
},
{
"title"
:
"姓名"
,
"validProp"
:
"nickName"
,
"rule"
:
[
{
"required"
:
true
,
"message"
:
'请输入姓名'
,
"trigger"
:
'blur'
},
],
"ctls"
:[
{
"type"
:
"input"
,
"label"
:
"用户名"
,
"prop"
:
"nickName"
,
"placeHolder"
:
"请输入姓名"
,
"style"
:
""
},
]
},
{
"title"
:
"手机号"
,
"validProp"
:
"mobile"
,
"rule"
:
[
{
"required"
:
true
,
"message"
:
'请输入手机号'
,
"trigger"
:
'blur'
},
],
"ctls"
:[
{
"type"
:
"input"
,
"label"
:
"手机号"
,
"prop"
:
"mobile"
,
"placeHolder"
:
"请输入手机号"
,
"style"
:
""
},
{
"type"
:
"btn"
,
"label"
:
"获取验证码"
,
"prop"
:
"vcodeget"
,
"placeHolder"
:
"请输入手机号"
,
"style"
:{
"margin-left"
:
"8px"
},
"face"
:
"primary"
},
]
},
{
"title"
:
"验证码"
,
"validProp"
:
"vcode"
,
"rule"
:
[
{
"validator"
:
"validatex"
,
"trigger"
:
'blur'
},
{
"required"
:
true
,
"message"
:
'请输入验证码'
,
"trigger"
:
'blur'
},
],
"ctls"
:[
{
"type"
:
"input"
,
"label"
:
"手机号"
,
"prop"
:
"vcode"
,
"placeHolder"
:
"请输入收到的手机验证码"
,
"style"
:
""
},
]
},
{
"title"
:
"身份证号"
,
"ctls"
:[
{
"type"
:
"input"
,
"label"
:
"用户名"
,
"prop"
:
"onlyCode"
,
"placeHolder"
:
"请输入身份证号"
,
"style"
:
""
},
]
},
];
this
.
currentFrm
=
this
.
$refs
.
pregisterFrm
;
},
},
created
:
function
(){
created
:
function
(){
...
@@ -113,6 +192,214 @@
...
@@ -113,6 +192,214 @@
}
}
},
},
methods
:{
methods
:{
rdochange
:
function
(
nv
){
if
(
nv
==
"person"
){
this
.
mds
=
[
{
"title"
:
"用户名"
,
"validProp"
:
"userName"
,
"rule"
:
[
{
"required"
:
true
,
"message"
:
'请输入用户名'
,
"trigger"
:
'blur'
},
],
"ctls"
:[
{
"type"
:
"input"
,
"label"
:
"用户名"
,
"prop"
:
"userName"
,
"placeHolder"
:
"请输入用户名"
,
"style"
:
""
},
]
},
{
"title"
:
"用户密码"
,
"validProp"
:
"password"
,
"rule"
:
[
{
"required"
:
true
,
"message"
:
'请输入用户密码'
,
"trigger"
:
'blur'
},
],
ctls
:[
{
"type"
:
"input"
,
"label"
:
"用户密码"
,
"prop"
:
"password"
,
"placeHolder"
:
"请输入用户密码"
,
"style"
:
""
},
]
},
{
"title"
:
"确认密码"
,
"validProp"
:
"cfmpwd"
,
"rule"
:
[
{
"validator"
:
"validatex"
,
"trigger"
:
'blur'
},
{
"required"
:
true
,
"message"
:
'请输入确认密码'
,
"trigger"
:
'blur'
},
],
ctls
:[
{
"type"
:
"input"
,
"label"
:
"确认密码"
,
"prop"
:
"cfmpwd"
,
"placeHolder"
:
"请输入确认密码"
,
"style"
:
""
},
]
},
{
"title"
:
"姓名"
,
"validProp"
:
"nickName"
,
"rule"
:
[
{
"required"
:
true
,
"message"
:
'请输入姓名'
,
"trigger"
:
'blur'
},
],
"ctls"
:[
{
"type"
:
"input"
,
"label"
:
"用户名"
,
"prop"
:
"nickName"
,
"placeHolder"
:
"请输入姓名"
,
"style"
:
""
},
]
},
{
"title"
:
"手机号"
,
"validProp"
:
"mobile"
,
"rule"
:
[
{
"required"
:
true
,
"message"
:
'请输入手机号'
,
"trigger"
:
'blur'
},
],
"ctls"
:[
{
"type"
:
"input"
,
"label"
:
"手机号"
,
"prop"
:
"mobile"
,
"placeHolder"
:
"请输入手机号"
,
"style"
:
""
},
{
"type"
:
"btn"
,
"label"
:
"获取验证码"
,
"prop"
:
"vcodeget"
,
"placeHolder"
:
"请输入手机号"
,
"style"
:{
"margin-left"
:
"8px"
},
"face"
:
"primary"
},
]
},
{
"title"
:
"验证码"
,
"validProp"
:
"vcode"
,
"rule"
:
[
{
"validator"
:
"validatex"
,
"trigger"
:
'blur'
},
{
"required"
:
true
,
"message"
:
'请输入验证码'
,
"trigger"
:
'blur'
},
],
"ctls"
:[
{
"type"
:
"input"
,
"label"
:
"手机号"
,
"prop"
:
"vcode"
,
"placeHolder"
:
"请输入收到的手机验证码"
,
"style"
:
""
},
]
},
{
"title"
:
"身份证号"
,
"ctls"
:[
{
"type"
:
"input"
,
"label"
:
"用户名"
,
"prop"
:
"onlyCode"
,
"placeHolder"
:
"请输入身份证号"
,
"style"
:
""
},
]
},
];
this
.
currentFrm
=
this
.
$refs
.
pregisterFrm
;
}
else
{
this
.
emds
=
[
{
"title"
:
"用户名"
,
"validProp"
:
"userName"
,
"rule"
:
[
{
"required"
:
true
,
"message"
:
'请输入用户名'
,
"trigger"
:
'blur'
},
],
"ctls"
:[
{
"type"
:
"input"
,
"label"
:
"用户名"
,
"prop"
:
"userName"
,
"placeHolder"
:
"请输入用户名"
,
"style"
:
""
},
]
},
{
"title"
:
"用户密码"
,
"validProp"
:
"password"
,
"rule"
:
[
{
"required"
:
true
,
"message"
:
'请输入用户密码'
,
"trigger"
:
'blur'
},
],
ctls
:[
{
"type"
:
"input"
,
"label"
:
"用户密码"
,
"prop"
:
"password"
,
"placeHolder"
:
"请输入用户密码"
,
"style"
:
""
},
]
},
{
"title"
:
"确认密码"
,
"validProp"
:
"cfmpwd"
,
"rule"
:
[
{
"validator"
:
"validatex"
,
"trigger"
:
'blur'
},
{
"required"
:
true
,
"message"
:
'请输入确认密码'
,
"trigger"
:
'blur'
},
],
ctls
:[
{
"type"
:
"input"
,
"label"
:
"确认密码"
,
"prop"
:
"cfmpwd"
,
"placeHolder"
:
"请输入确认密码"
,
"style"
:
""
},
]
},
{
"title"
:
"企业名称"
,
"validProp"
:
"companyName"
,
"rule"
:
[
{
"required"
:
true
,
"message"
:
'请输入企业名称'
,
"trigger"
:
'blur'
},
],
"ctls"
:[
{
"type"
:
"input"
,
"label"
:
"用户名"
,
"prop"
:
"companyName"
,
"placeHolder"
:
"请输入企业名称"
,
"style"
:
""
},
]
},
{
"title"
:
"联系人"
,
"ctls"
:[
{
"type"
:
"input"
,
"label"
:
"用户名"
,
"prop"
:
"nickName"
,
"placeHolder"
:
"请输入联系人姓名"
,
"style"
:
""
},
]
},
{
"title"
:
"手机号"
,
"validProp"
:
"mobile"
,
"rule"
:
[
{
"required"
:
true
,
"message"
:
'请输入手机号'
,
"trigger"
:
'blur'
},
],
"ctls"
:[
{
"type"
:
"input"
,
"label"
:
"手机号"
,
"prop"
:
"mobile"
,
"placeHolder"
:
"请输入手机号"
,
"style"
:
""
},
{
"type"
:
"btn"
,
"label"
:
"获取验证码"
,
"prop"
:
"vcodeget"
,
"placeHolder"
:
"请输入手机号"
,
"style"
:{
"margin-left"
:
"8px"
},
"face"
:
"primary"
},
]
},
{
"title"
:
"验证码"
,
"validProp"
:
"vcode"
,
"rule"
:
[
{
"validator"
:
"validatex"
,
"trigger"
:
'blur'
},
{
"required"
:
true
,
"message"
:
'请输入验证码'
,
"trigger"
:
'blur'
},
],
"ctls"
:[
{
"type"
:
"input"
,
"label"
:
"手机号"
,
"prop"
:
"vcode"
,
"placeHolder"
:
"请输入收到的手机验证码"
,
"style"
:
""
},
]
},
];
this
.
currentFrm
=
this
.
$refs
.
eregisterFrm
;
}
},
validmethod
:
function
(
rule
,
value
,
callback
)
{
console
.
log
(
"code validdate"
);
var
self
=
this
;
var
fm
=
this
.
currentFrm
.
getFormModel
();
if
(
rule
.
field
==
"cfmpwd"
){
if
(
fm
.
password
!=
value
){
return
callback
(
new
Error
(
"两次输入的密码不一致,请重新输入!"
));
}
}
if
(
rule
.
field
==
"vcode"
){
if
(
self
.
vcode
!=
value
){
return
callback
(
new
Error
(
"验证码输入错误,请重新输入或重新获取后输入!"
));
}
}
return
callback
();
},
sbhandler
:
function
()
{
var
self
=
this
;
var
fm
=
this
.
currentFrm
.
getFormModel
();
this
.
currentFrm
.
validate
(
function
(
v
){
if
(
v
){
self
.
$root
.
postReq
(
"/web/userCtl/register"
,{
u
:
fm
}).
then
(
function
(
d
){
if
(
d
.
status
==
0
){
self
.
$root
.
removetab
(
"/register"
);
self
.
$root
.
pushx
({
title
:
"登录"
,
name
:
"/login"
});
}
});
}
});
},
btnclick
:
function
(
pfm
,
code
){
var
fm
=
pfm
;
if
(
code
==
"vcodeget"
){
var
that
=
this
;
if
(
/^1
[
23456789
]\d{9}
$/
.
test
(
fm
.
mobile
)
==
false
){
this
.
$alert
(
'请输入正确格式的手机号码'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
callback
:
action
=>
{
}
});
return
;
}
this
.
$root
.
showMask
();
/*ajax 调用获取手机验证码,并存储到*/
this
.
$root
.
postReq
(
"/web/userCtl/fetchVcode"
,{
mobile
:
fm
.
mobile
}).
then
(
function
(
d
){
if
(
d
.
status
==
0
){
that
.
vcode
=
d
.
data
.
vcodestr
;
setTimeout
(()
=>
{
that
.
$root
.
hideMask
();
},
3000
);
}
});
}
},
handleSelect
(
key
,
keyPath
)
{
handleSelect
(
key
,
keyPath
)
{
console
.
log
(
key
,
keyPath
);
console
.
log
(
key
,
keyPath
);
this
.
activeIndex
=
key
;
this
.
activeIndex
=
key
;
...
...
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