Browse Source

--增加邀请人

jiapeng 8 years ago
parent
commit
c566b49a1f
2 changed files with 289 additions and 308 deletions
  1. 26 58
      js/bind-mail.js
  2. 263 250
      js/register.js

+ 26 - 58
js/bind-mail.js

@ -4,67 +4,35 @@
4 4

5 5
//获取邮箱传值
6 6
var mailVal = $.cookie('mailVal');
7
console.log(mailVal);  
8
var userId  = $.cookie('userId');
9 7
var mailCode = GetQueryString('sc');
10 8
//初始化
11
emailSuccess();	
9
emailSuccess();
12 10
//获取邮箱验证码传值注册
13
if(mailCode!=''){
14
    $.ajax("/ajax/regmail/"+mailCode,{
15
			type:"POST",
16
			async: true,
17
			success:function(data){ 
18
			   //$('#completedcover').show(); 
19
			   location.href="bind-mail-ok.html";
20
			},
21
			error:function(){
22
			   //$.MsgBox.Alert('消息提醒','邮箱注册失败')
23
			   location.href="bind-mail-no.html";
24
			},
25
			data:{"mail":mailVal,"userId":userId},			
26
		 	dataType: 'json'}
27
	); 	 
28
 }
29

30
//重新发送验证邮件
31
$("#resend_main").click(function(){
32
	emailResend();
33
});
34
	
35

36
function emailSuccess()
37
{
38
    $('#receiveMail').text(mailVal);
39
	$(".maillink").each(function() {  
40
        var url = mailVal.split('@')[1];
41
        for (var j in hash){  
42
            $(this).attr("href", hash[url]);  
43
        }  
44
     });
45
}
46

47
function goPersonal()
48
{
49
	 location.href="information-add.html?id="+userId;
11
if(mailCode != '') {
12
	$.ajax("/ajax/regmail/" + mailCode, {
13
		type: "GET",
14
		async: true,
15
		success: function(data) {
16
			if(data.success) {
17
				location.href = "bind-mail-ok.html";
18
			} else {
19
				location.href = "bind-mail-no.html";
20
			}
21
		},
22
		error: function() {
23
			//$.MsgBox.Alert('消息提醒','邮箱注册失败')
24
			location.href = "bind-mail-no.html";
25
		},
26
		dataType: 'json'
27
	});
50 28
}
51 29

52
function emailResend()
53
{
54
	
55
    console.log(mailVal); 
56
	$.ajax("/ajax/resendMail",{
57
			type:"GET",
58
			success:function(data){
59
			   // console.log(data);  
60
				$.MsgBox.Alert('消息提醒','验证邮件重新发送成功,点击登录邮箱验证')
61
				
62
			},
63
			error:function(){
64
				$.MsgBox.Alert('消息提醒','邮箱发送失败')
65
				
66
			},
67
			data:{"mail":mailVal},		
68
		 	dataType: 'json'}
69
		);
30
function emailSuccess() {
31
	$('#receiveMail').text(mailVal);
32
	$(".maillink").each(function() {
33
		var url = mailVal.split('@')[1];
34
		for(var j in hash) {
35
			$(this).attr("href", hash[url]);
36
		}
37
	});
70 38
}

+ 263 - 250
js/register.js

@ -3,8 +3,9 @@
3 3
var _height = document.documentElement.clientHeight; //屏幕高
4 4
//var boxWidth = $(".registerbox").width();
5 5
var boxHeight = $(".registerbox").height();
6
$(".registerbox").css({ top:"80px"});
7

6
$(".registerbox").css({
7
	top: "80px"
8
});
8 9

9 10
/**复选框**/
10 11
//  $('.agreeNotice').click(function(){
@ -20,78 +21,83 @@ $(".registerbox").css({ top:"80px"});
20 21
//          
21 22
//      }
22 23
//  });
23
 
24

24 25
//手机、邮箱切换
25
$(".phone").click(function(){
26
  $(this).find("img").attr("src","images/phoneIcon2.png");
27
  $(".mail").find("img").attr("src","images/mailIcon.png");
28
  $(".mail").removeClass("active");
29
  $(this).addClass("active");
30
  $(".styleline").animate({left:"0px"});
31
  $("#mail_form").hide();
32
  $('#phone_form').show();
33
}); 
34
$(".mail").click(function(){
35
  $(this).find("img").attr("src","images/mailIcon2.png");
36
  $(".phone").find("img").attr("src","images/phoneIcon.png");
37
  $(".phone").removeClass("active");
38
  $(this).addClass("active");
39
  $(".styleline").animate({left:"121px"});
40
  $("#phone_form").hide();
41
  $("#mail_form").show();
26
$(".phone").click(function() {
27
	$(this).find("img").attr("src", "images/phoneIcon2.png");
28
	$(".mail").find("img").attr("src", "images/mailIcon.png");
29
	$(".mail").removeClass("active");
30
	$(this).addClass("active");
31
	$(".styleline").animate({
32
		left: "0px"
33
	});
34
	$("#mail_form").hide();
35
	$('#phone_form').show();
36
});
37
$(".mail").click(function() {
38
	$(this).find("img").attr("src", "images/mailIcon2.png");
39
	$(".phone").find("img").attr("src", "images/phoneIcon.png");
40
	$(".phone").removeClass("active");
41
	$(this).addClass("active");
42
	$(".styleline").animate({
43
		left: "121px"
44
	});
45
	$("#phone_form").hide();
46
	$("#mail_form").show();
42 47
});
43 48
//手机注册模块
44 49
//验证手机号
45 50
var phonePass = false;
46
function phoneVal(){
47
	var phone= $("#lp_phone").val();
48
	$.ajax("/ajax/isReg?key="+phone,{
49
		type:"GET",
51

52
function phoneVal() {
53
	var phone = $("#lp_phone").val();
54
	$.ajax("/ajax/isReg?key=" + phone, {
55
		type: "GET",
50 56
		async: true,
51
		success:function($data){ 
52
	    	if(phone.length==0){
53
	            $(".msgphone1").text("请输入您的手机号码");
54
	        }else{
55
	        	var hunPhone=/^1[3|4|5|7|8]\d{9}$/; 
56
	    		if(hunPhone.test(phone.trim())){
57
	    			if($data.data==false){
58
	   		    	  $(".msgphone1").text("您的手机已被注册");
59
	   		    	  
60
	   		        }else{
61
	   		        	$(".msgphone1").text("");
62
		    			phonePass = true;
63
		    			addEvent(btn,"click",handler);//手机必须验证正确,才执行
64
	   		        }
65
	    		}else{
66
	    			phonePass = false;
67
	    			$(".msgphone1").text("手机格式有误,请输入正确的手机号码");
68
	    		}
69
	        }    
57
		success: function($data) {
58
			if(phone.length == 0) {
59
				$(".msgphone1").text("请输入您的手机号码");
60
			} else {
61
				var hunPhone = /^1[3|4|5|7|8]\d{9}$/;
62
				if(hunPhone.test(phone.trim())) {
63
					if($data.data == false) {
64
						$(".msgphone1").text("您的手机已被注册");
65

66
					} else {
67
						$(".msgphone1").text("");
68
						phonePass = true;
69
						addEvent(btn, "click", handler); //手机必须验证正确,才执行
70
					}
71
				} else {
72
					phonePass = false;
73
					$(".msgphone1").text("手机格式有误,请输入正确的手机号码");
74
				}
75
			}
70 76
		},
71
		error:function(){
72
			$.MsgBox.Alert('消息','服务器请求失败')},
73
		});
77
		error: function() {
78
			$.MsgBox.Alert('消息', '服务器请求失败')
79
		},
80
	});
74 81
}
75 82

76
$("#lp_phone").blur(function(){
83
$("#lp_phone").blur(function() {
77 84
	phoneVal();
78 85
});
79 86
//验证随机验证码
80
var phoneCode=false;
81
$("#lp_yzm").blur(function(){
82
	var authCode=$("#lp_yzm").val();
83
	if(authCode.length==0){
87
var phoneCode = false;
88
$("#lp_yzm").blur(function() {
89
	var authCode = $("#lp_yzm").val();
90
	if(authCode.length == 0) {
84 91
		$(".msgphone2").text("请输入您的验证码");
85
		phoneCode=false;
86
	}else{
87
		var d=/^[0-9a-zA-Z]{4}$/;
88
		if(d.test(authCode.trim())){
92
		phoneCode = false;
93
	} else {
94
		var d = /^[0-9a-zA-Z]{4}$/;
95
		if(d.test(authCode.trim())) {
89 96
			$(".msgphone2").text("");
90
			phoneCode=true;
91
		}
92
		else{
97
			phoneCode = true;
98
		} else {
93 99
			$(".msgphone2").text("请输入您的验证码不正确");
94
			phoneCode=false;
100
			phoneCode = false;
95 101
		}
96 102
	}
97 103
});
@ -115,297 +121,304 @@ $("#lp_yzm").blur(function(){
115 121

116 122
//手机发送验证码
117 123
var btn = document.getElementById("getcode");
118
var handler = function(){
119
    doClick();
120
    phoneVerificationCode();//调用发送手机验证码接口
121
    removeEvent(btn,'click',handler);//取消绑定该事件
124
var handler = function() {
125
	doClick();
126
	phoneVerificationCode(); //调用发送手机验证码接口
127
	removeEvent(btn, 'click', handler); //取消绑定该事件
122 128
}
123 129

124
function addEvent(obj,type,handler){
125
    if(obj.addEventListener){
126
        obj.addEventListener(type,handler,false);
127
    }else if(obj.attachEvent){
128
        obj.attachEvent('on'+type,handler);
129
    }
130
function addEvent(obj, type, handler) {
131
	if(obj.addEventListener) {
132
		obj.addEventListener(type, handler, false);
133
	} else if(obj.attachEvent) {
134
		obj.attachEvent('on' + type, handler);
135
	}
130 136
}
131 137

132
function removeEvent(obj,type,handler){
133
    if(obj.removeEventListener){
134
        obj.removeEventListener(type,handler,false);
135
    }else if(obj.detachEvent){
136
        obj.detachEvent("on"+type,handler);
137
    }
138
function removeEvent(obj, type, handler) {
139
	if(obj.removeEventListener) {
140
		obj.removeEventListener(type, handler, false);
141
	} else if(obj.detachEvent) {
142
		obj.detachEvent("on" + type, handler);
143
	}
138 144
}
139 145

140
function doClick(){
141
    removeClass(btn,'getcodeon');
142
    addClass(btn,'getcodeoff');
143
    btn.innerHTML="60s后重新获取";
144
    var clickTime = new Date().getTime();
145
    var Timer = setInterval(function(){
146
        var nowTime = new Date().getTime();
147
        var second  = Math.ceil(60-(nowTime-clickTime)/1000);
148
        if(second>0){
149
            btn.innerHTML = second+"s后重新获取";
150
        }else{
151
            clearInterval(Timer);
152
            removeClass(btn,'getcodeoff');
153
            addClass(btn,'getcodeon');
154
            btn.innerHTML = "免费获取验证码";
155
            addEvent(btn,"click",handler);
156
        }
157
    },1000);
146
function doClick() {
147
	removeClass(btn, 'getcodeon');
148
	addClass(btn, 'getcodeoff');
149
	btn.innerHTML = "60s后重新获取";
150
	var clickTime = new Date().getTime();
151
	var Timer = setInterval(function() {
152
		var nowTime = new Date().getTime();
153
		var second = Math.ceil(60 - (nowTime - clickTime) / 1000);
154
		if(second > 0) {
155
			btn.innerHTML = second + "s后重新获取";
156
		} else {
157
			clearInterval(Timer);
158
			removeClass(btn, 'getcodeoff');
159
			addClass(btn, 'getcodeon');
160
			btn.innerHTML = "免费获取验证码";
161
			addEvent(btn, "click", handler);
162
		}
163
	}, 1000);
158 164
}
159 165

160

161 166
function hasClass(obj, cls) {
162
    return obj.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'));
167
	return obj.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'));
163 168
}
169

164 170
function addClass(obj, cls) {
165
    if (!hasClass(obj, cls)) obj.className += " " + cls;
171
	if(!hasClass(obj, cls)) obj.className += " " + cls;
166 172
}
173

167 174
function removeClass(obj, cls) {
168
    if (hasClass(obj, cls)) {
169
        var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)');
170
        obj.className = obj.className.replace(reg, ' ');
171
    }
175
	if(hasClass(obj, cls)) {
176
		var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)');
177
		obj.className = obj.className.replace(reg, ' ');
178
	}
172 179
}
173 180

174

175 181
//手机发送验证码结束
176 182

177 183
var state;
178
function  phoneVerificationCode(){
179
	if(phonePass){
180
	$.ajax("/ajax/regmobilephone", 
181
			{
182
				type: "get",
183
				async: true,
184
				success: function(data) {
185
					if(data.success) {
186
						state=data.data;
187
					}
188
				},
189
				error: function() {
190
					$.MsgBox.Alert('message', 'fail')
191
				},
192
				data: {
193
					"mobilePhone": $("#lp_phone").val()
194
				},
195
				dataType: 'json'
196
			});
184

185
function phoneVerificationCode() {
186
	if(phonePass) {
187
		$.ajax("/ajax/regmobilephone", {
188
			type: "get",
189
			async: true,
190
			success: function(data) {
191
				if(data.success) {
192
					state = data.data;
193
				}
194
			},
195
			error: function() {
196
				$.MsgBox.Alert('message', 'fail')
197
			},
198
			data: {
199
				"mobilePhone": $("#lp_phone").val()
200
			},
201
			dataType: 'json'
202
		});
197 203
	}
198 204
};
199 205
//验证手机验证码
200
var setpass1= false;
201
function setPhoneCode(){
202
	var pass= $("#lp_coder").val();
203
	if(pass.length==0){
204
        $(".msgphone3").text("请输入您的验证码");
205
    }else{
206
    	var hunPhone=/^[0-9]{4}$/; 
207
		if(hunPhone.test(pass.trim())){
206
var setpass1 = false;
207

208
function setPhoneCode() {
209
	var pass = $("#lp_coder").val();
210
	if(pass.length == 0) {
211
		$(".msgphone3").text("请输入您的验证码");
212
	} else {
213
		var hunPhone = /^[0-9]{4}$/;
214
		if(hunPhone.test(pass.trim())) {
208 215
			$(".msgphone3").text("");
209 216
			setpass1 = true;
210
		}else{
217
		} else {
211 218
			$(".msgphone3").text("验证码4位");
212 219
		}
213
    }  
220
	}
214 221
}
215
$("#lp_coder").blur(function(){
222
$("#lp_coder").blur(function() {
216 223
	setPhoneCode();
217 224
});
218 225
//设置密码
219 226
var password;
220 227
var setpass = false;
221
function setPassword(){
222
	password= $("#phone_password").val();
223
	if(password.length==0){
224
        $(".msgphone4").text("请输入您的密码");
225
    }else{
226
    	var hunPhone=/^[0-9a-zA-Z]{6,}$/; 
227
		if(hunPhone.test(password.trim())){
228

229
function setPassword() {
230
	password = $("#phone_password").val();
231
	if(password.length == 0) {
232
		$(".msgphone4").text("请输入您的密码");
233
	} else {
234
		var hunPhone = /^[0-9a-zA-Z]{6,}$/;
235
		if(hunPhone.test(password.trim())) {
228 236
			$(".msgphone4").text("");
229 237
			setpass = true;
230
		}else{
238
		} else {
231 239
			//$(".msgphone4").text("密码6到16位");
232 240
			$(".msgphone4").text("密码由6-24 个字符组成,区分大小写");
233 241
		}
234
    }  
242
	}
235 243
}
236
$("#phone_password").blur(function(){
244
$("#phone_password").blur(function() {
237 245
	setPassword();
238 246
});
239 247
//再次确定密码
240 248
var setpassagain = false;
241
function setPasswordAgain(){
242
	var passwordAgain= $("#phone_password2").val();
243
	if(passwordAgain.length==0){
244
        $(".msgphone5").text("请再次输入您的密码");
245
    }else{
246
    	var hunPhone=/^[0-9a-zA-Z]{6,}$/; 
247
		if(hunPhone.test(password.trim())&&passwordAgain==password){
249

250
function setPasswordAgain() {
251
	var passwordAgain = $("#phone_password2").val();
252
	if(passwordAgain.length == 0) {
253
		$(".msgphone5").text("请再次输入您的密码");
254
	} else {
255
		var hunPhone = /^[0-9a-zA-Z]{6,}$/;
256
		if(hunPhone.test(password.trim()) && passwordAgain == password) {
248 257
			$(".msgphone5").text("");
249
			setpassagain= true;
250
		}else{			
258
			setpassagain = true;
259
		} else {
251 260
			$(".msgphone5").text("密码错误");
252 261
		}
253
    }
254
    
262
	}
263

255 264
}
256
$("#phone_password2").blur(function(){
265
$("#phone_password2").blur(function() {
257 266
	setPasswordAgain();
258 267
});
259 268
//手机注册提交
260
$("#btnn").click(function(){
261
 if(phonePass&&setpass1&&setpassagain)
262
 {
263
		$.ajax("/ajax/regmobile",{
264
			type:"POST",
265
			 async: false,
266
			success:function(data){  
267
			if(data.success){
268
				loginagain();//调用登录的接口
269
//				$(".completedcover").css("display","block");
270
//				$("#afterSay").click(function(){
271
//					location.href="index.html";
272
//				});
273
//				$("#todayPerfect").click(function(){
274
//					location.href="information-add.html?id="+data.data;
275
//				});
276
				location.href="information-add.html?id="+data.data;
277
			}				
269
$("#btnn").click(function() {
270
	if(phonePass && setpass1 && setpassagain) {
271
		$.ajax("/ajax/regmobile", {
272
			type: "POST",
273
			async: false,
274
			success: function(data) {
275
				if(data.success) {
276
					loginagain(); //调用登录的接口
277
					//				$(".completedcover").css("display","block");
278
					//				$("#afterSay").click(function(){
279
					//					location.href="index.html";
280
					//				});
281
					//				$("#todayPerfect").click(function(){
282
					//					location.href="information-add.html?id="+data.data;
283
					//				});
284
					location.href = "information-add.html?id=" + data.data;
285
				}
286
			},
287
			error: function() {
288
				$.MsgBox.Alert('message', 'fail')
278 289
			},
279
			error:function(){$.MsgBox.Alert('message','fail')},
280
			data:{"state":state,"mobilePhone":$("#lp_phone").val(),
281
			"validateCode":$("#lp_coder").val(),"password":$("#phone_password").val(),
282
		 	dataType: 'json'}
290
			data: {
291
				"state": state,
292
				"mobilePhone": $("#lp_phone").val(),
293
				"validateCode": $("#lp_coder").val(),
294
				"password": $("#phone_password").val(),
295
				"inviterId": GetQueryString("inviterId")
296
			},
297
			dataType: 'json'
283 298
		});
284
 }
299
	}
285 300
});
286
function loginagain(){
287
	$.ajax("/ajax/login",{
288
		type:"POST",
301

302
function loginagain() {
303
	$.ajax("/ajax/login", {
304
		type: "POST",
289 305
		async: false,
290
		success:function(data){  
306
		success: function(data) {},
307
		error: function() {
308
			$.MsgBox.Alert('message', 'fail')
309
		},
310
		data: {
311
			"pw": $("#phone_password").val(),
312
			"lk": $("#lp_phone").val()
291 313
		},
292
		error:function(){$.MsgBox.Alert('message','fail')},
293
		data:{"pw":$("#phone_password").val(),"lk":$("#lp_phone").val()},
294 314
		dataType: 'json'
295 315
	});
296 316
}
297 317

298

299 318
//邮箱注册模块
300 319
//邮箱验证
301 320
var emailPass = false;
302
function valEmail()
303
{
321

322
function valEmail() {
304 323
	var email = $("#lp_email").val();
305 324
	//var gunf=/^\w+@\w+\.((cn)|(com)|(com\.cn))$/;
306
	var gunf= /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/; 
307
	$.ajax("/ajax/isReg?key="+email,{
308
		type:"GET",
325
	var gunf = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
326
	$.ajax("/ajax/isReg?key=" + email, {
327
		type: "GET",
309 328
		async: true,
310
		success:function($data){ 
311
		    if($data.data==false){
312
		    	 $(".msgema1 span").text("您的邮箱已被注册");
313
		    }else{
314
		       if(gunf.test(email.trim())){
315
				       $(".msgema1 span").text("");
316
				       emailPass = true;
317
				    }else{
318
				    	/*alert("请输入正确是邮箱地址");*/
319
				    	$(".msgema1 span").text("请输入正确是邮箱地址");
320
				    	emailPass = false;
321
				    }
322
		        }
329
		success: function($data) {
330
			if($data.data == false) {
331
				$(".msgema1 span").text("您的邮箱已被注册");
332
			} else {
333
				if(gunf.test(email.trim())) {
334
					$(".msgema1 span").text("");
335
					emailPass = true;
336
				} else {
337
					/*alert("请输入正确是邮箱地址");*/
338
					$(".msgema1 span").text("请输入正确是邮箱地址");
339
					emailPass = false;
340
				}
341
			}
323 342
		},
324
		error:function(){
325
			$.MsgBox.Alert('消息','服务器请求失败')},
326
		}
327
	);
328
	
329
	   
343
		error: function() {
344
			$.MsgBox.Alert('消息', '服务器请求失败')
345
		},
346
	});
347

330 348
}
331 349

332
$("#lp_email").blur(function(){
350
$("#lp_email").blur(function() {
333 351
	valEmail();
334 352
});
335 353

336 354
//输入密码及确认密码
337 355
var oldPass = false;
338 356
var isPass = false;
339
function valOld()
340
{
357

358
function valOld() {
341 359
	var oldPassword = $("#mail_password").val();
342
	if(oldPassword.length==0)
343
	{
360
	if(oldPassword.length == 0) {
344 361
		$(".msgema2 span").text("请输入密码");
345 362
		oldPass = false;
346
	}else if(oldPassword.length < 6)
347
	{
363
	} else if(oldPassword.length < 6) {
348 364
		$(".msgema2 span").text("密码不少于6位,请输入正确的密码");
349
	}else
350
	{
365
	} else {
351 366
		$(".msgema2 span").text("");
352 367
		oldPass = true;
353 368
	}
354 369
}
355
$("#mail_password").blur(function(){
370
$("#mail_password").blur(function() {
356 371
	valOld();
357 372
})
358
function valNew()
359
{
373

374
function valNew() {
360 375
	var newPassword = $("#mail_password").val();
361 376
	var oldPassword = $("#mail_password1").val();
362
	if(oldPassword.length==0)
363
	{
364
		 $(".msgema3 span").text("密码不能为空");
365
	}
366
	else if(oldPassword.length<6)
367
	{
377
	if(oldPassword.length == 0) {
378
		$(".msgema3 span").text("密码不能为空");
379
	} else if(oldPassword.length < 6) {
368 380
		$(".msgema3 span").text("密码长度过短,至少六位");
369
	}else if(oldPassword != newPassword)
370
	{
381
	} else if(oldPassword != newPassword) {
371 382
		$(".msgema3 span").text("两次密码不一致");
372
	} else
373
	{
383
	} else {
374 384
		isPass = true;
375 385
		$(".msgema3 span").text("");
376 386
	}
377 387
}
378 388

379
$("#mail_password1").blur(function(){
389
$("#mail_password1").blur(function() {
380 390
	valNew();
381 391
})
382 392

383 393
//邮箱注册提交
384
function mailRegistration()
385
{
394
function mailRegistration() {
386 395
	var mailVal = $("#lp_email").val();
387 396
	var passwordVal = $("#mail_password1").val();
388
	if(isPass&& emailPass)
389
	{
390
		$.ajax("/ajax/regmail",{
391
			type:"GET",
397
	if(isPass && emailPass) {
398
		$.ajax("/ajax/regmail", {
399
			type: "POST",
392 400
			async: false,
393
			success:function(data){  
394
				//console.log(data);
395
				$.cookie('mailVal',mailVal); 
396
				$.cookie('userId',data.data); 
397
			    location.href="bind-mail.html";
401
			success: function(data) {
402
				if(data.success) {
403
					$.cookie('mailVal', mailVal);
404
					location.href = "bind-mail.html";
405
				} else {
406
					$.MsgBox.Alert('消息', '邮箱发送失败');
407
				}
408
			},
409
			error: function() {
410
				$.MsgBox.Alert('消息', '邮箱发送失败');
398 411
			},
399
			error:function(){
400
				$.MsgBox.Alert('消息','邮箱发送失败')
412
			data: {
413
				"mail": mailVal,
414
				"password": passwordVal,
415
				"inviterId": GetQueryString("inviterId")
401 416
			},
402
			data:{"mail":mailVal,"password":passwordVal},		
403
		 	dataType: 'json'}
404
		);
405
	 }
417
			dataType: 'json'
418
		});
419
	}
406 420
}
407 421

408
$("#btnn1").click(function(){
422
$("#btnn1").click(function() {
409 423
	mailRegistration();
410
});
411

424
});