Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
allCampaign
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
Administrator
allCampaign
Commits
5918b925
Commit
5918b925
authored
Nov 29, 2019
by
Chao Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加姓名判断
parent
c6253af5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
7 deletions
+21
-7
consulting/js/base.js
+11
-7
questionnaire/src/app/live/live.component.ts
+10
-0
No files found.
consulting/js/base.js
View file @
5918b925
...
...
@@ -31,10 +31,15 @@ $(function () {
$
(
'.modalBox'
).
hide
();
goTopay
();
}
else
{
$
(
"#phone"
).
val
(
''
);
$
(
"#code"
).
val
(
''
);
$
(
"#name"
).
val
(
''
);
$
(
'.modalBox'
).
show
();
if
(
getQueryString
(
'campaign'
)
==
'12task1'
)
{
}
else
{
$
(
"#phone"
).
val
(
''
);
$
(
"#code"
).
val
(
''
);
$
(
"#name"
).
val
(
''
);
$
(
'.modalBox'
).
show
();
}
}
})
...
...
@@ -325,13 +330,12 @@ $(function () {
function
goTopay
()
{
if
(
getQueryString
(
'campaign'
)
&&
getQueryString
(
'campaign'
)
!=
'double12'
)
{
param
.
verificationCodeValider
=
true
;
}
else
{
param
.
phone
=
$
(
"#phone"
).
val
();
param
.
name
=
$
(
"#name"
).
val
();
if
(
getQueryString
(
'campaign'
)
==
'double12'
)
{
window
.
sessionStorage
.
setItem
(
'campaignCode'
,
getQueryString
(
'campaign'
))
window
.
sessionStorage
.
setItem
(
'campaignTaskCode'
,
getQueryString
(
'task'
))
window
.
sessionStorage
.
setItem
(
'campaignCode'
,
getQueryString
(
'campaign'
))
;
window
.
sessionStorage
.
setItem
(
'campaignTaskCode'
,
getQueryString
(
'task'
))
;
}
}
if
(
!
REG_CODE
.
test
(
param
.
phone
))
{
...
...
questionnaire/src/app/live/live.component.ts
View file @
5918b925
...
...
@@ -269,6 +269,16 @@ export class LiveComponent implements OnInit {
this
.
errorModal
(
'请输入短信验证码'
);
return
;
}
if
(
!
this
.
loginData
.
name
)
{
this
.
errorModal
(
'姓名不能为空'
);
return
;
}
else
{
const
NAME_REGEXP
=
/
(
^
[\u
4e00-
\u
9fa5
]{1}[\u
4e00-
\u
9fa5
\.
·()()。
]{0,48}[\u
4e00-
\u
9fa5
]{1}
$
)
|
(
^
[
a-zA-Z
]{1}[
a-zA-Z
\s]{0,48}[
a-zA-Z
]{1}
$
)
/
;
if
(
!
NAME_REGEXP
.
test
(
this
.
loginData
.
name
))
{
this
.
errorModal
(
'请输入正确的姓名'
);
return
;
}
}
this
.
commonService
.
compare
({
'mobileNo'
:
this
.
loginData
.
mobileNo
,
'verificationCode'
:
this
.
loginData
.
code
,
...
...
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