set_pwd.html
4.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>用户中心-{$tpshop_config['shop_info_store_title']}</title>
<meta http-equiv="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
<meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />
<link rel="stylesheet" href="__STATIC__/css/index.css" type="text/css">
<link rel="stylesheet" href="__STATIC__/css/security_set.css">
<link rel="stylesheet" href="__STATIC__/css/btn.css">
<script src="__STATIC__/js/jquery-1.10.2.min.js"></script>
<script src="__STATIC__/js/slider.js"></script>
</head>
<body>
<include file="public/header" />
<style type="text/css">
.bread_crumbs {
height: 40px;line-height: 40px;
padding-left: 25px;clear: both;
background-color: #fafafa;
width:1200px;margin:auto;
}
.bread_crumbs .crumbs_font {margin: 0 5px;color: #3c3c3c;}
.bread_crumbs .color { color: #f22e00;}
.bread_crumbs span { margin: 0 5px;}
</style>
<div class="wrap">
<div class="bread_crumbs">
<a href="{:U('Home/User/index')}" class="crumbs_font">用户中心</a>><span class="color">找回密码</span>
</div>
<div class="col_main" style="float: none; width: auto;">
<div class="main security_passwd">
<!-- themes star -->
<!-- themes end -->
<section class="security_passwd">
<div class="wrapper-3">
<div class="pub-step" id="step">
<div class="steps-nav fixed w4">
<p class="step-nav step-nav-1">
1.填写用户名<i></i>
</p>
<p class="step-nav step-nav-2">
2.验证身份<i></i>
</p>
<p class="step-nav step-nav-3 go">
3.设置新密码<i></i>
</p>
<p class="step-nav step-nav-4">4.完成</p>
</div>
<form action="" id="vi_form" method="post">
<input type="hidden" value="" name="">
<div class="steps-con block-02">
<div class="step-col fn-form" data-fn-verify="">
<ul class="pub-ul not-f">
<li class=" verify-group">
<span class="title">新登录密码:</span>
<div class="con">
<input type="password" class="form-control verify-ctrl" onblur="checkpwd()" placeholder="6-16字符,可使用字母、数字或符号的组合" name="password" id="password">
<span class="v-tips verify-tips" data-tips-for="password"><i class="icon"></i><span class="txt"></span></span>
</div>
</li>
<li class="li-02 verify-group">
<span class="title">确认新密码:</span>
<div class="con">
<input type="password" class="form-control verify-ctrl" onblur="checkpwd()" placeholder="请再次输入密码" name="password2" id="password_repeat">
<span class="v-tips verify-tips" data-tips-for="password_repeat"><i class="icon"></i><span class="txt"></span></span>
</div>
</li>
<li>
<button id="submit_fm" type="button" class="btn_120 verify-ctrl" onclick="dosubmit()">
下一步
</button>
</li>
</ul>
</div>
</div>
</form>
</div>
</div>
</section>
</div>
</div>
</div>
<div style="clear: both;"></div>
<include file="public/footer" />
<script>
var flag1 = flag2 = false;
function checkpwd(){
var password = $('#password').val();
var password_repeat = $('#password_repeat').val();
if(password == ''){
show_error('password','密码不能为空');
return false;
}else if(password.length<6 || password.length>16){
show_error('password','密码长度不正确');
return false;
}else{
$('span[data-tips-for="password"]').css('display','inline');
$('span[data-tips-for="password"]').find('i').removeClass('icon-warn');
$('span[data-tips-for="password"]').find('i').addClass('icon-loss');
$('span[data-tips-for="password"]').find('.txt').empty();
flag1 = true;
}
if(password_repeat == ''){
show_error('password_repeat','重复密码不能为空');
return false;
}else if(password!=password_repeat){
show_error('password_repeat','两次密码不一样');
return false;
}else{
$('span[data-tips-for="password_repeat"]').css('display','inline');
$('span[data-tips-for="password_repeat"]').find('i').removeClass('icon-warn');
$('span[data-tips-for="password_repeat"]').find('i').addClass('icon-loss');
$('span[data-tips-for="password_repeat"]').find('.txt').empty();
flag2 = true;
}
return (flag1 && flag2);
}
function show_error(type,msg){
$('span[data-tips-for="'+type+'"]').css('display','inline');
$('span[data-tips-for="'+type+'"]').find('i').removeClass('icon');
$('span[data-tips-for="'+type+'"]').find('i').removeClass('icon-loss');
$('span[data-tips-for="'+type+'"]').find('i').addClass('icon-warn');
$('span[data-tips-for="'+type+'"]').find('.txt').empty().html(msg);
}
function dosubmit(){
if(checkpwd()){
$('#vi_form').submit();
}
}
</script>
</body>
</html>