Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.portalStaticPage
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
b813b09b
authored
2020-12-29 17:20:39 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:身份认证
1 parent
0f3893ee
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
29 deletions
staticCss/sfrz.css
staticJs/common.js
staticJs/onlineApply/identityAuthentication.js
staticViews/onlineApply/identityAuthentication.html
staticCss/sfrz.css
View file @
b813b09
...
...
@@ -47,16 +47,18 @@
.phone
input
{
width
:
65%
!important
;
}
.captcha
,
.num
{
.captcha
{
border
:
1px
solid
#dedede
;
border-radius
:
23px
;
cursor
:
pointer
;
font-size
:
12px
;
color
:
#6e7172
;
width
:
100px
;
display
:
inline-block
;
text-align
:
center
;
line-height
:
23px
;
display
:
inline-block
;
font-style
:
normal
;
}
.
num
{
display
:
none
;
.
code_input
input
{
width
:
130px
!important
;
}
\ No newline at end of file
...
...
staticJs/common.js
View file @
b813b09
...
...
@@ -34,27 +34,35 @@ function GetRootPath() {
}
function
GetQueryString
(
name
)
{
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
,
"i"
);
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
,
"i"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
return
(
r
[
2
]);
return
null
;
}
if
(
r
!=
null
)
return
(
r
[
2
]);
return
null
;
}
// 存储cookie
function
setCookie
(
name
,
resdata
,
duration
)
{
function
setCookie
(
name
,
resdata
,
duration
)
{
var
date
=
new
Date
();
date
.
setTime
(
date
.
getTime
()
+
duration
*
24
*
3600
*
1000
);
document
.
cookie
=
name
+
"="
+
JSON
.
stringify
(
resdata
)
+
";expires="
+
date
.
toGMTString
()
+
"; path=/"
;
date
.
setTime
(
date
.
getTime
()
+
duration
*
24
*
3600
*
1000
);
document
.
cookie
=
name
+
"="
+
JSON
.
stringify
(
resdata
)
+
";expires="
+
date
.
toGMTString
()
+
"; path=/"
;
// document.cookie = "myCookie=" + JSON.stringify(resdata) + "; expires=" +date.toGMTString() + "; path=/";
};
//获取cookie
function
getCookie
(){
function
getCookie
()
{
var
str
=
document
.
cookie
;
if
(
str
==
''
)
{
if
(
str
==
''
)
{
return
false
}
else
{
}
else
{
var
arr
=
str
.
split
(
';'
)
var
arr1
=
arr
[
0
].
replace
(
/
(\s)
+/g
,
''
).
split
(
'='
);
var
arr1
=
arr
[
0
].
replace
(
/
(\s)
+/g
,
''
).
split
(
'='
);
return
JSON
.
parse
(
arr1
[
1
]);
}
};
// 设置最小高度
/*
* 验证手机号码
*/
function
validatorTel
(
content
)
{
// 正则验证格式
eval
(
"var reg = /^1[34578]\\d{9}$/;"
);
return
RegExp
(
reg
).
test
(
content
);
}
\ No newline at end of file
...
...
staticJs/onlineApply/identityAuthentication.js
View file @
b813b09
layui
.
use
(
'element'
,
function
()
{
});
$
(
function
()
{
layui
.
use
(
'element'
,
function
()
{
});
addTabs
(
'#wssq'
)
setAcceptFlow
(
GetQueryString
(
'bsm_slsq'
),
GetQueryString
(
'businessno'
));
list
=
getApplyRecord
(
GetQueryString
(
'bsm_slsq'
),
GetQueryString
(
'businessno'
));
...
...
@@ -30,18 +29,22 @@ function skipClick() {
// 验证码
$
(
".captcha"
).
click
(
function
()
{
$
(
".captcha"
).
hide
()
$
(
".num"
).
show
()
console
.
log
(
$
(
'.phoneInput'
).
val
())
let
value
=
$
(
'.phoneInput'
).
val
()
if
(
validatorTel
(
value
))
{
var
second
=
30
$
(
".num"
).
text
((
second
)
+
"秒
"
)
$
(
".captcha"
).
text
((
second
)
+
"秒后再发送
"
)
var
interval
=
setInterval
(
function
()
{
second
--
$
(
".num"
).
text
((
second
)
+
"秒
"
)
$
(
".captcha"
).
text
((
second
)
+
"秒后再发送
"
)
if
(
second
===
-
1
)
{
$
(
".captcha"
).
text
(
"重发验证码"
)
clearInterval
(
interval
)
$
(
".num"
).
hide
()
$
(
".captcha"
).
show
()
}
},
1000
)
}
else
{
layui
.
use
(
'layer'
,
function
()
{
layer
.
msg
(
'请输入正确手机号!'
);
})
}
})
\ No newline at end of file
...
...
staticViews/onlineApply/identityAuthentication.html
View file @
b813b09
...
...
@@ -40,13 +40,12 @@
<h5>
短信认证
</h5>
<div
class=
"phone"
>
<span>
手机号
</span>
<input
type=
"tel"
id=
"phone"
name=
"phone"
placeholder=
"请输入手机号"
class=
"layui-input"
>
<span
class=
"captcha"
>
获取验证码
</span>
<span
class=
"num"
></span>
<input
type=
"tel"
maxlength=
"11"
id=
"phone"
name=
"phone"
placeholder=
"请输入手机号"
class=
"layui-input phoneInput"
>
<em
class=
"captcha"
>
获取验证码
</em>
</div>
<div>
<div
class=
"code_input"
>
<span>
验证码
</span>
<input
type=
"tel"
id=
"code"
name=
"code"
placeholder=
"请输入验证码"
class=
"layui-input"
>
<input
type=
"tel"
maxlength=
"6"
id=
"code"
name=
"code"
placeholder=
"请输入验证码"
class=
"layui-input"
>
</div>
</div>
...
...
Please
register
or
sign in
to post a comment