Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
15a431e7
Commit
15a431e7
authored
Nov 02, 2019
by
季圣华
Browse files
给注册的账户限制为只能用手机号码
parent
89372357
Changes
2
Hide whitespace changes
Inline
Side-by-side
erp_web/js/common/common.js
View file @
15a431e7
...
...
@@ -334,4 +334,18 @@
function
turnBillDetailPage
(
number
,
type
)
{
js
.
addTabPage
(
null
,
"
单据明细
"
,
"
/pages/materials/bill_detail.html?n=
"
+
number
+
"
&type=
"
+
type
);
}
/**
* 验证手机号码
* @param phoneInput
* @returns {boolean}
*/
function
isPhoneAvailable
(
phoneInput
)
{
var
myreg
=
/^
[
1
][
3,4,5,7,8,9
][
0-9
]{9}
$/
;
if
(
!
myreg
.
test
(
phoneInput
.
val
()))
{
return
false
;
}
else
{
return
true
;
}
}
\ No newline at end of file
erp_web/register.html
View file @
15a431e7
...
...
@@ -48,9 +48,9 @@
</div>
<div
class=
"register-box-body"
>
<div
class=
"form-group has-feedback"
>
<span
class=
"glyphicon glyphicon-user form-control-feedback"
title=
"登录账
号
"
></span>
<span
class=
"glyphicon glyphicon-user form-control-feedback"
title=
"登录账
户
"
></span>
<input
type=
"text"
id=
"username"
name=
"username"
class=
"form-control required"
data-msg-required=
"请填写登录账号."
placeholder=
"登录账
号
"
/>
data-msg-required=
"请填写登录账号."
placeholder=
"登录账
户(请输入手机号码)
"
/>
</div>
<div
class=
"form-group has-feedback"
>
<span
class=
"glyphicon glyphicon-lock form-control-feedback"
...
...
@@ -127,10 +127,13 @@
if
(
$
(
"
#validCode
"
).
val
())
{
var
res
=
verifyCode
.
validate
(
$
(
"
#validCode
"
).
val
());
if
(
res
){
if
(
!
$
(
"
#username
"
).
val
())
{
alert
(
"
用户名不能为空!
"
);
var
userName
=
$
(
"
#username
"
);
if
(
!
userName
.
val
())
{
alert
(
"
登录账户不能为空!
"
);
}
else
if
(
!
isPhoneAvailable
(
userName
))
{
alert
(
"
请输入正确的手机号码!
"
);
}
else
if
(
!
$
(
"
#password
"
).
val
())
{
alert
(
"
密码不能为空!
"
);
alert
(
"
登录
密码不能为空!
"
);
}
else
if
(
!
$
(
"
#confirmPassword
"
).
val
())
{
alert
(
"
确认密码不能为空!
"
);
}
else
if
(
$
(
"
#password
"
).
val
()
!=
$
(
"
#confirmPassword
"
).
val
())
{
...
...
Write
Preview
Supports
Markdown
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