Browse Source

邮箱绑定修改

xuchunyang 8 years ago
parent
commit
ac3501728c
1 changed files with 24 additions and 1 deletions
  1. 24 1
      js/account-set.js

+ 24 - 1
js/account-set.js

@ -230,6 +230,7 @@ $(function(){
230 230
				async: true,
231 231
				success:function(data){ 
232 232
					 $.MsgBox.Alert('消息提醒','邮箱绑定成功')
233
					 userpe();
233 234
				},
234 235
				error:function(){
235 236
				   $.MsgBox.Alert('消息提醒','邮箱绑定失败')
@ -239,6 +240,28 @@ $(function(){
239 240
		); 	 
240 241
	 }
241 242
	
243
	
244
	//查询用户手机号和邮箱
245
	function userpe(){
246
		$.ajax("/ajax/qaUser",{
247
				type:"get",
248
				async: true,
249
				success:function(data){ 
250
					console.log(data)
251
					 $.MsgBox.Alert('消息提醒','邮箱绑定成功')
252
					 var emaild = data.data.email;
253
					 $.cookie('userEmail',emaild);
254
					 $("#emailShow").text(emaild);
255
				},
256
				error:function(){
257
				   $.MsgBox.Alert('消息提醒','邮箱绑定失败')
258
				},
259
				data:{"id":$.cookie("userid")},			
260
			 	dataType: 'json'}
261
		); 	 
262
	}
263
	
264
	
242 265
	//点击邮箱激活
243 266
	function bindEmail(){
244 267
		valEmail();
@ -252,7 +275,7 @@ $(function(){
252 275
						if(data.success){
253 276
							console.log(data);
254 277
							if(data.data == true){
255
								$.cookie('userEmail',email); 
278
								//$.cookie('userEmail',email); 
256 279
								$(".cover").hide();
257 280
								$("#vovernext").show();
258 281
								$(".emalvel").text(email);