Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
php
/
pingan-promise
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
adfc9ba0
authored
Mar 11, 2020
by
doszhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
deb61181
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
Public/static/js/common.js
+18
-8
No files found.
Public/static/js/common.js
View file @
adfc9ba0
...
...
@@ -95,7 +95,6 @@ preloadimages(preloadImageList, function () {
}
},
60
);
$
(
'input[name=name]'
).
attr
(
'placeholder'
,
'姓名'
).
attr
(
'id'
,
'name'
);;
$
(
'input[name=business]'
).
attr
(
'placeholder'
,
'业务号'
).
attr
(
'type'
,
'tel'
).
attr
(
'maxlength'
,
10
);
$
(
'.page1 .num'
).
html
(
'已有<span class="numbig">'
+
window
.
num
+
'</span>人发起承诺'
);
...
...
@@ -143,8 +142,6 @@ $(document).ready(function () {
$
(
'.btn-retry'
).
on
(
'click'
,
()
=>
{
$
(
'input[name=btn-upload]'
).
click
()
});
//署名输入框限制长度事件
$
(
'.page1 input[name=name]'
).
on
(
'input propertychange'
,
inputLength
);
//上传头像确认
$
(
'.page1 .btn-ok'
).
on
(
'click'
,
confirmAvatar
);
//检查用户输入后生成海报
...
...
@@ -212,6 +209,18 @@ function checkInfo() {
createPosterLock
=
false
;
return
false
;
}
if
(
name
.
checkIt
(
'name'
,
8
))
{
$
(
'#notification_area'
).
remove
();
my_notify
(
'姓名最长为4位哦'
);
createPosterLock
=
false
;
return
false
;
}
if
(
business
==
''
)
{
$
(
'#notification_area'
).
remove
();
my_notify
(
'请填写业务号'
);
createPosterLock
=
false
;
return
false
;
}
if
(
!
business
.
match
(
/^
\d{10}
$/
))
{
$
(
'#notification_area'
).
remove
();
my_notify
(
'业务号填写有误'
);
...
...
@@ -286,9 +295,7 @@ function confirmAvatar() {
$
(
'.regulate-block'
).
hide
();
}
function
inputLength
()
{
checkIt
(
'name'
,
8
);
}
function
inputLength
()
{}
function
bindMc
(
mc
,
ctx
,
myCanvas
,
img
,
imgInfo
)
{
mc
.
get
(
'pan'
).
set
({
...
...
@@ -536,9 +543,11 @@ function checkIt(bind, maxNum) {
}
if
(
len
>=
maxNum
)
{
if
(
i
!=
v
.
length
-
1
)
{
$
(
"#"
+
bind
).
val
(
v
.
substr
(
0
,
i
+
1
))
break
;
return
false
;
}
else
{
return
true
;
}
}
}
}
\ No newline at end of file
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