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
2292c330
authored
Mar 10, 2020
by
doszhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dos
parent
5d6de3d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
Public/static/js/common.js
+23
-23
No files found.
Public/static/js/common.js
View file @
2292c330
...
...
@@ -121,6 +121,11 @@ function checkInfo() {
my_notify
(
'业务号填写有误'
);
return
false
;
}
if
(
$
(
'input[name=btn-upload]'
).
val
()
==
''
)
{
$
(
'#notification_area'
).
remove
();
my_notify
(
'请上传头像'
);
return
false
;
}
createPoster
(
name
,
business
);
}
...
...
@@ -319,30 +324,26 @@ function RandomNumBoth(Min, Max, exclude = '') {
}
function
checkIt
(
bind
,
maxNum
)
{
if
(
agreeSuggestion
)
{
var
v
=
document
.
getElementById
(
bind
).
value
;
if
(
v
==
""
)
{
return
[];
var
v
=
document
.
getElementById
(
bind
).
value
;
if
(
v
==
""
)
{
return
[];
}
var
len
=
0
;
//中英字符长度计数
//计算
for
(
i
=
0
;
i
<
v
.
length
;
i
++
)
{
var
c
=
v
.
charCodeAt
(
i
);
if
((
c
>=
0x0001
&&
c
<=
0x007e
)
||
(
0xff60
<=
c
&&
c
<=
0xff9f
))
//英文字母状态
{
len
++
;
}
else
//中文状态
{
len
+=
2
;
}
var
len
=
0
;
//中英字符长度计数
//计算
for
(
i
=
0
;
i
<
v
.
length
;
i
++
)
{
var
c
=
v
.
charCodeAt
(
i
);
if
((
c
>=
0x0001
&&
c
<=
0x007e
)
||
(
0xff60
<=
c
&&
c
<=
0xff9f
))
//英文字母状态
{
len
++
;
}
else
//中文状态
{
len
+=
2
;
}
if
(
len
>=
maxNum
)
{
if
(
i
!=
v
.
length
-
1
)
{
$
(
"#"
+
bind
).
val
(
v
.
substr
(
0
,
i
+
1
))
break
;
}
if
(
len
>=
maxNum
)
{
if
(
i
!=
v
.
length
-
1
)
{
$
(
"#"
+
bind
).
val
(
v
.
substr
(
0
,
i
+
1
))
break
;
}
}
}
else
{
$
(
"#"
+
bind
).
val
(
''
);
}
}
\ 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