Browse Source

手机注册登录,邮箱发送验证。

zzy.zhiyuan.foxmail 8 years ago
parent
commit
e736a42b45
2 changed files with 33 additions and 36 deletions
  1. 32 35
      src/main/webapp/js/register.js
  2. 1 1
      src/main/webapp/register.html

+ 32 - 35
src/main/webapp/js/register.js

198
 }
198
 }
199
});
199
});
200
function loginagain(){
200
function loginagain(){
201

202
		$.ajax("/ajax/login",{
203
				type:"POST",
204
				 async: false,
205
				success:function(data){  
206

207
					if(data.success){
208
						if(data.data != "null" && data.data != null){
209
							if(data.data.auth){
210
								location.href="index.html";
211
							}else{
212
								location.href="login-first.html";
213
							}
214
						}else{
215
							$(".msg5").text("登录账号和密码不匹配!");
216
						}
217
					}else{
218
						$(".msg5").text("系统异常!");
219
						// alert("系统异常!");
220
					}
221
				},
222
				error:function(){$.MsgBox.Alert('message','fail')},
223
				data:{"pw":$("#phone_password").val(),"lk":$("#lp_phone").val()},
224
			 	dataType: 'json'
225
			});
226

227

201
	$.ajax("/ajax/login",{
202
		type:"POST",
203
		async: false,
204
		success:function(data){  
205
		},
206
		error:function(){$.MsgBox.Alert('message','fail')},
207
		data:{"pw":$("#phone_password").val(),"lk":$("#lp_phone").val()},
208
		dataType: 'json'
209
	});
228
}
210
}
229

211

230
//邮箱注册模块
212
//邮箱注册模块
292
	valNew();
274
	valNew();
293
})
275
})
294
//邮箱注册提交
276
//邮箱注册提交
277
//$("#btnn1").click(function(){
278
// if(isPass&& emailPass)
279
// {
280
//		$.ajax("/ajax/reg",{
281
//			type:"POST",
282
//			 async: false,
283
//			success:function(data){  
284
//				location.href="information-add.html?id="+data.data;
285
//			},
286
//			error:function(){$.MsgBox.Alert('message','fail')},
287
//			data:{"email":$("#lp_email").val(),"password":$("#mail_password1").val()},		
288
//		 	dataType: 'json'}
289
//		);
290
// }
291
//});
295
$("#btnn1").click(function(){
292
$("#btnn1").click(function(){
296
 if(isPass&& emailPass)
297
 {
298
		$.ajax("/ajax/reg",{
299
			type:"POST",
300
			 async: false,
293
	if(isPass&& emailPass)
294
	{
295
		$.ajax("/ajax/regmail",{
296
			type:"GET",
297
			async: false,
301
			success:function(data){  
298
			success:function(data){  
302
				location.href="information-add.html?id="+data.data;
299
				location.href="bind-mail.html";
303
			},
300
			},
304
			error:function(){$.MsgBox.Alert('message','fail')},
301
			error:function(){$.MsgBox.Alert('message','fail')},
305
			data:{"email":$("#lp_email").val(),"password":$("#mail_password1").val()},		
302
			data:{"mail":$("#lp_email").val()},		
306
		 	dataType: 'json'}
303
		 	dataType: 'json'}
307
		);
304
		);
308
 }
305
	 }
309
});
306
});

+ 1 - 1
src/main/webapp/register.html

86
                                        <form id="mail_form" method="post" action="javascript:;" >
86
                                        <form id="mail_form" method="post" action="javascript:;" >
87
                                            <ul>
87
                                            <ul>
88
                                                <li>
88
                                                <li>
89
                                                    <input class="inputtxt" type="text" placeholder="请输入常用邮箱地址" id="lp_email" name="email" autocomplete="off">
89
                                                    <input class="inputtxt" type="text" placeholder="请输入常用邮箱地址" id="lp_email" name="mail" autocomplete="off">
90
                                                </li>
90
                                                </li>
91
                                                <li><div class="msg msgema1"><span></span></div></li>
91
                                                <li><div class="msg msgema1"><span></span></div></li>
92
                                                <li>
92
                                                <li>