aa1d56629fdef6ba310b0a8ef79949a7.php
12.4 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:68:"/www/wwwroot/menhu/public/../application/index/view/login/login.html";i:1576718625;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="/statis/css/base.css">
<link rel="stylesheet" href="/statis/css/index.css">
<script src="/statis/js/jquery.js"></script>
<script src="/statis/js/include.js"></script>
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
<title><?php echo $title; ?></title>
<style>
.top_bg {
width: 100%;
height: 202px;
overflow: hidden;
background-size: 100% 100%;
background-image: url('/statis/image/bg_img.png')
}
.login_Con {
width: 100%;
height: 722px;
position: relative;
background-size: 100% 100%;
background-image: url('/statis/image/icon7.png')
}
</style>
</head>
<body>
<div class="loginBox">
<div class="top_bg">
<div class="login_topBoX">
<div class="top_item2L clearfix">
<!-- logo -->
<div class="top_item2Img"><img src="/statis/image/logo_icon.png" alt=""></div>
<div class="top_item2Box">
<h2>中关村国联绿色产业服务创新联盟</h2>
<p>Zhongguancun Green Industry Alliance</p>
</div>
</div>
</div>
</div>
<!-- 内容 -->
<div class="login_Con">
<!-- 用户登陆 -->
<div class="login_Box clearfix" style=<?php echo $style!=1?'display:none':''; ?>>
<h1 class="login_Txt">用户登录</h1>
<form id="formLog">
<input type="hidden" name="location" id="location2"/>
<div class="login_form">
<div class="login_Img"><img src="/statis/image/icon8.png" alt=""></div>
<input type="text" placeholder="请输入手机号" name="tel">
</div>
<div class="login_form">
<div class="login_Img"><img src="/statis/image/icon9.png" alt=""></div>
<input type="text" placeholder="请输入密码" name="user_password">
</div>
<button type="button" class="login_sub login">登录</button>
</form>
<div class="login_Box2">
<span><a href="/index/login/password">找回密码</a></span>|<span><a href="/index/login/register">立即注册</a></span>
</div>
<div class="login_Txt2">OR</div>
<div class="login_Box3">
<p class="login_Txt3">第三方登录</p>
<div class="login_Box4 clearfix">
<div class="login_Img2">
<a href=""><img src="/statis/image/icon10.png" alt=""></a>
</div>
<div class="login_Img2">
<a href=""><img src="/statis/image/icon11.png" alt=""></a>
</div>
</div>
</div>
</div>
<!-- 用户注册 -->
<div class="login_Box" style=<?php echo $style!=2?'display:none':''; ?>>
<h1 class="login_Txt">用户注册</h1>
<form id="formRes">
<div class="login_form login_form2">
<input type="text" placeholder="请输入用户名" name="user_name">
</div>
<div class="login_form login_form2">
<input type="text" placeholder="请输入密码" name="user_password">
</div>
<div class="login_form login_form2">
<input type="text" placeholder="请输入手机号" name="tel" id="phone">
</div>
<div class="login_form login_form2 clearfix">
<input type="text" placeholder="请输入验证码" name="code">
<span class="login_formCode">获取验证码</span>
</div>
<div class="registeredBox clearfix">
<div class="regist_Img"><img src="/statis/image/icon12.png" alt="" data-bool="false"></div>
<p class="regist_Txt">我已阅读并同意条款</p>
</div>
<button type="button" class="login_sub register_sub register">注册</button>
</form>
<a href="/index/login/login" class="regist_Txt2">已有账号?返回登录</a>
</div>
<!-- 找回密码 -->
<div class="login_Box" style=<?php echo $style!=3?'display:none':''; ?>>
<form id="formPas">
<h1 class="login_Txt">忘记密码</h1>
<div class="login_form login_form2">
<input type="text" placeholder="请输入手机号" name="tel" id="tel">
</div>
<div class="login_form login_form2 clearfix">
<input type="text" placeholder="请输入验证码" name="code">
<span class="login_formCode">获取验证码</span>
</div>
</form>
<button class="login_sub register_sub next">下一步</button>
</div>
<div class="login_Box" style=<?php echo $style!=4?'display:none':''; ?>>
<form id="formNex">
<input type="hidden" name="tel" value=<?php echo (isset($tel) && ($tel !== '')?$tel:''); ?>>
<h1 class="login_Txt">忘记密码</h1>
<div class="login_form login_form2">
<input type="text" placeholder="请输入密码" name="password">
</div>
<div class="login_form login_form2">
<input type="text" placeholder="请再次输入密码" name="two_password">
</div>
</form>
<button class="login_sub register_sub success">完成</button>
</div>
</div>
<!-- footer -->
<footer class="footer">
<div class="footer_top">
<div class="footer_width">
<div class="footer_Txt">
<span>关于我们</span>|<span>政策·要闻</span>|<span>国际交流</span>|<span>招商招标</span>|<span>网上展厅</span>|<span>专家在线</span>|<span>人才服务</span>|<span>绿色价值排行榜</span>
</div>
<p class="footer_Txt2">版权所有:<span>中关村国联绿色产业服务创新联盟</span></p>
<p class="footer_Txt2">北京市大兴区同济中路甲7号院</p>
<p class="footer_Txt2">京ICP备05052419号</p>
</div>
</div>
<div class="footer_bot"></div>
</footer>
</div>
<script>
$("#location2").val(returnCitySN["cname"]);
</script>
<script>
// 同意条款
$('.regist_Img').click(function() {
if ($(this).find('img').attr('data-bool') == 'false') {
$(this).find('img').attr('src', '/statis/image/icon13.png');
$(this).find('img').attr('data-bool', 'true')
} else {
$(this).find('img').attr('src', '/statis/image/icon12.png');
$(this).find('img').attr('data-bool', 'false')
}
});
// 手机号
var send = document.getElementsByClassName('login_formCode')[0];
var phone = document.getElementById('phone');
var time = 60;
var res = /^[0-9]{11}$/;
var Timeout;
var isclick = true;
send.onclick = function() {
if (isclick) {
time = 60;
if (res.test(phone.value)) {
isclick = false;
var time2 = send.innerHTML = 60 + 's';
var data={'tel':phone.value};
setCode(data);
Timeout = setInterval(function() {
if (time > 0) {
time--;
send.innerHTML = time + 's';
} else {
isclick = true;
clearInterval(Timeout);
send.innerHTML = '发送验证码';
}
}, 1000)
} else {
alert('请输入正确手机号')
}
}
};
// 手机号
var send2 = document.getElementsByClassName('login_formCode')[1];
var phone1 = document.getElementById('tel');
var time = 60;
var res = /^[0-9]{11}$/;
var Timeout1;
var isclick = true;
send2.onclick = function() {
console.log(send2)
if (isclick) {
console.log(11)
time = 60;
if (res.test(phone1.value)) {
console.log(222)
isclick = false;
var time2 = send2.innerHTML = 60 + 's';
var data={'tel':phone1.value};
setCode(data);
Timeout1 = setInterval(function() {
if (time > 0) {
time--;
send2.innerHTML = time + 's';
} else {
isclick = true;
clearInterval(Timeout1);
send2.innerHTML = '发送验证码';
}
}, 1000)
} else {
alert('请输入正确手机号')
}
}
};
$(".register").on("click",function () {
var data=$("#formRes").serialize();
ajax("/index/login/register",data,"post",function (res) {
w(res.msg);
if(res.code==200){
setTimeout(function () {
location.href="/index/login/login";
},500)
}
},"false");
})
$(".login").on("click",function () {
var data=$("#formLog").serialize();
ajax("/index/login/login",data,"post",function (res) {
w(res.msg);
if(res.code==200){
setTimeout(function () {
location.href="/index/index/index";
},500)
}
},"false");
})
$(".next").on("click",function () {
var data=$("#formPas").serialize();
ajax("/index/login/password",data,"post",function (res) {
if(res.code==200){
setTimeout(function () {
location.href="/index/login/next?tel="+res.msg;
},500)
}else{
w(res.msg);
}
},"false");
})
$(".success").on("click",function () {
var data=$("#formNex").serialize();
ajax("/index/login/next",data,"post",function (res) {
w(res.msg);
if(res.code==200){
setTimeout(function () {
location.href="/index/login/login";
},500)
}
},"false");
})
$("#phone1").on("click",function () {
var data=$("#formNex").serialize();
ajax("/index/login/next",data,"post",function (res) {
w(res.msg);
if(res.code==200){
setTimeout(function () {
location.href="/index/login/login";
},500)
}
},"false");
})
function setCode(data) {
console.log(data);
ajax("/index/login/getCode",data,"post",function (res) {
w(res.msg);
},"false");
}
</script>
</body>