切换导航条
此项目
正在载入...
登录
李涵
/
integral
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
lihan
6 years ago
提交
5250c1051dd66ee43f87fa1ad74978fd47a8206c
1 个父辈
2f5c77d2
1 个管道 的构建
通过
耗费 2 秒
赠送积分和角色管理
变更
1
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
232 行增加
和
0 行删除
public/themes/simpleboot3/friendship/password_manager.html
public/themes/simpleboot3/friendship/password_manager.html
查看文件 @
5250c10
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"
/>
<link
rel=
"stylesheet"
href=
"https://at.alicdn.com/t/font_834805_0ml90wdq5hzm.css"
>
<link
rel=
"stylesheet"
href=
"__INDEX__/css/base.css"
>
<link
rel=
"stylesheet"
href=
"__INDEX__/css/swiper.min.css"
>
<script
type=
"text/javascript"
src=
"__INDEX__/js/base.js"
></script>
<title>
密码管理
</title>
<style>
body
,
html
{
width
:
100%
;
height
:
100%
;
background
:
RGBA
(
245
,
246
,
250
,
1
);
}
.phone
{
width
:
6.96rem
;
margin
:
0
auto
;
height
:
1rem
;
background
:
#fff
;
border-radius
:
0.5rem
;
font-size
:
0.28rem
;
color
:
RGBA
(
151
,
160
,
168
,
1
);
/*padding: 0.37rem 0.52rem;*/
margin-top
:
0.32rem
;
}
.enterphone
{
width
:
6.96rem
;
margin
:
0
auto
;
height
:
1rem
;
background
:
#fff
;
border-radius
:
0.5rem
;
font-size
:
0.28rem
;
color
:
RGBA
(
151
,
160
,
168
,
1
);
padding
:
0.37rem
0.52rem
;
border
:
none
;
outline
:
none
;
}
.code
{
font-size
:
0
;
display
:
flex
;
justify-content
:
space-between
;
align-content
:
center
;
width
:
6.96rem
;
margin
:
0
auto
;
height
:
1rem
;
background
:
#fff
;
border-radius
:
0.5rem
;
color
:
RGBA
(
151
,
160
,
168
,
1
);
margin-top
:
0.32rem
;
}
.code_num
{
height
:
1rem
;
line-height
:
1rem
;
font-size
:
0.28rem
;
margin-left
:
0.52rem
;
}
.entercode
{
height
:
1rem
;
line-height
:
1rem
;
font-size
:
0.28rem
;
outline
:
none
;
border
:
none
;
border-radius
:
0.5rem
;
color
:
RGBA
(
151
,
160
,
168
,
1
);
}
.sendcode
{
width
:
2.44rem
;
font-size
:
0.28rem
;
height
:
0.72rem
;
background
:
RGBA
(
254
,
10
,
1
,
1
);
color
:
#fff
;
border-radius
:
0.36rem
;
line-height
:
0.72rem
;
text-align
:
center
;
margin-top
:
0.15rem
;
margin-right
:
0.37rem
;
border
:
none
;
outline
:
none
;
}
.nextstep
{
display
:
block
;
width
:
6.86rem
;
height
:
0.88rem
;
text-align
:
center
;
line-height
:
0.88rem
;
background
:
RGBA
(
254
,
10
,
1
,
1
);
font-size
:
0.32rem
;
color
:
#fff
;
border-radius
:
0.44rem
;
position
:
fixed
;
bottom
:
0.55rem
;
left
:
0
;
right
:
0
;
margin
:
0
auto
;
box-shadow
:
0px
15px
30px
0px
rgba
(
254
,
10
,
1
,
0.24
);
border
:
none
;
outline
:
none
;
}
</style>
</head>
<body>
<div
class=
"container"
>
<div
class=
"phone"
>
<input
type=
"text"
class=
"enterphone"
placeholder=
"手机号"
>
</div>
</div>
<div
class=
"code"
>
<p
class=
"code_num"
>
<input
type=
"text"
class=
"entercode"
placeholder=
"验证码"
>
</p>
<button
class=
"sendcode"
></button>
</div>
<button
class=
"nextstep"
>
下一步
</button>
</body>
<script
src=
"__INDEX__/js/jquery.min.js"
></script>
<script>
$
(
".sendcode"
).
click
(
function
()
{
var
mobile
=
$
(
".enterphone"
).
val
();
var
pattern
=
/^1
[
34578
]\d{9}
$/
;
if
(
pattern
.
test
(
mobile
))
{
$
.
ajax
({
url
:
"{:url('sms/Sms/sendSms')}"
,
data
:
{
mobile
:
mobile
},
type
:
"POST"
,
dataType
:
"JSON"
,
})
}
else
{
alert
(
'请输入正确的手机号'
);
}
})
$
(
".nextstep"
).
click
(
function
(){
var
mobile
=
$
(
".enterphone"
).
val
();
var
code
=
$
(
".entercode"
).
val
();
if
(
mobile
==
''
)
{
alert
(
'请输入手机号'
);
}
else
{
if
(
code
==
''
)
{
alert
(
'请输入验证码'
);
}
else
{
$
.
ajax
({
url
:
"{:url('sms/Sms/checkCode')}"
,
data
:{
mobile
:
mobile
,
code
:
code
},
type
:
"POST"
,
dataType
:
"JSON"
,
success
:
function
(
data
)
{
if
(
data
.
data
===
true
)
{
localStorage
.
clear
();
window
.
location
.
href
=
"{:url('user/Center/editPhone2')}"
}
else
{
alert
(
data
.
msg
);
}
}
})
}
}
})
var
InterValObj
;
//timer变量,控制时间
var
count
=
60
;
//间隔函数,1秒执行
var
curCount
;
//当前剩余秒数
var
t
=
localStorage
.
getItem
(
"time"
);
InterValObj
=
window
.
setInterval
(
SetRemainTime
,
1000
);
if
(
t
!=
null
){
curCount
=
t
;
//$(".nextstep").attr("disabled",true);
$
(
".sendcode"
).
attr
(
"disabled"
,
true
)
var
phone
=
localStorage
.
getItem
(
"mobile"
);
$
(
".enterphone"
).
val
(
phone
)
}
else
{
curCount
=
60
;
window
.
clearInterval
(
InterValObj
);
$
(
".sendcode"
).
html
(
"获取验证码"
);
}
$
(
".sendcode"
).
click
(
function
(){
curCount
=
count
;
var
tel
=
$
(
".enterphone"
).
val
();
if
(
tel
==
""
){
return
false
;
}
var
reg
=
/^1
[
34578
]\d{9}
$/
;
if
(
!
reg
.
test
(
tel
)){
return
false
;
}
localStorage
.
setItem
(
"mobile"
,
tel
)
//设置button效果,开始计时
$
(
".sendcode"
).
attr
(
"disabled"
,
true
);
//$(".nextstep").attr("disabled",true);
// $(".sendcode").unbind()
$
(
".sendcode"
).
html
(
curCount
+
"秒"
);
$
(
".sendcode"
).
css
(
"color"
,
"#fff"
);
InterValObj
=
window
.
setInterval
(
SetRemainTime
,
1000
);
//启动计时器,1秒执行一次
});
//timer处理函数
function
SetRemainTime
()
{
if
(
curCount
==
0
)
{
window
.
clearInterval
(
InterValObj
);
//停止计时器
$
(
".sendcode"
).
removeAttr
(
"disabled"
);
//启用按钮
//$(".nextstep").removeAttr("disabled");
$
(
".sendcode"
).
html
(
"重新发送验证码"
);
$
(
".sendcode"
).
css
(
"color"
,
"#fff"
);
localStorage
.
clear
();
}
else
{
curCount
--
;
localStorage
.
setItem
(
"time"
,
curCount
);
$
(
".sendcode"
).
html
(
curCount
+
"秒"
);
$
(
".sendcode"
).
css
(
"color"
,
"#fff"
);
}
}
</script>
</html>
...
...
请
注册
或
登录
后发表评论