	function edit()
	{
		
		var nickName = $('#nickName').attr('value');
		var email = $('#email').attr('value');
		var mobile = $('#mobile').attr('value');		
		var areaId = $('#areaId').attr('value');
		var shopareaId = $('#shopareaId').attr('value');
		var trueName = $('#trueName').attr('value');
		var imgSrc = $('#O_imgSrc').attr('value');
		
		var sex = '女';
		
		if($('#sex').attr('checked') == true)
		{
			sex = '男';
		}
		
		
		
		$.post(root + "?m=member.editInfo", { nickName:nickName, email:email , mobile:mobile ,areaId:areaId ,shopareaId:shopareaId ,trueName:trueName ,sex:sex , imgSrc:imgSrc }, function(data) {
			
				alert('修改成功');
		});
		
	}
	
	function editPassword()
	{

		var new_pwd = $('#new_pwd').attr('value');
		var new_pwd_checked = $('#new_pwd_checked').attr('value');
		var old_pwd = $('#old_pwd').attr('value');
		
		if(new_pwd != new_pwd_checked)
		{
			alert('两次密码不一致');
			return;
		}
	
		$.post(root + "?m=member.editpwd", { new_pwd:new_pwd ,  new_pwd_checked:new_pwd_checked , old_pwd:old_pwd}, function(data) {
				alert(data);
		});
	
	}
	
	
$(function() {	
	var page = 1;
	$('#more_order').click(function(){
		var memberId = $('#memberId').attr('value');
		page++;
		$.post(root + '?m=ktv.getOrderByMenber', {memberId:memberId , page:page , size:5}, function(data) {
			
			
			if(data == 1)
			{
				alert('已经全部加载完毕！');
				return;
			}
			
			var str = '';

			for(var a in data)
			{
				var status = '';
				var info = '--';
				if(data[a]['status'] == '处理中')
				{
					var code = "'" + data[a]['code'] +"'"  ;
					status = 'onClick="del_order('+ data[a]['id'] +', '+ code +')"';
					info = '撤销订单';
				}
				
				str += ' <dl><dd class="d1">'+data[a]['code']+'</dd><dd class="d2">'+data[a]['ktvName']+'&nbsp;</dd><dd class="d3">'+data[a]['date']+'</dd><dd class="d4">'+data[a]['times']+'  '+data[a]['begin_time']+'点至'+data[a]['end_time']+'点</dd><dd class="d6">￥'+data[a]['price']+'</dd><dd class="d7"><span class="ms1">'+data[a]['status']+'</span></dd><dd class="d8" '+ status +'>'+info+'</dd></dl>';
			}
			
			$('#order_frame').append(str);
			
																										
		
			
		}, "json");
	});
	
		var comment_page = 1;
	$('#more_comment').click(function(){
		var memberId = $('#memberId').attr('value');
		comment_page++;
		
		
		$.post(root + '?m=ktv.getCommentByMenber', {memberId:memberId , page:comment_page , size:5}, function(data) {
			
			
			if(data == 1)
			{
				alert('已经全部加载完毕！');
				return;
			}
			
			var str = '';
			var ktvName = '';
			var ktvUrl = '';
			for(var a in data)
			{
				ktvName = data[a]['ktvName'] ? data[a]['ktvName'] : '该KTV不存在或已删除';
				ktvUrl = data[a]['ktvName'] ? 'href="' + root +'ktv/info-'+data[a]['ktvId']+'.html' + '"' : '';
				//str += ' <dl><dd class="d1">'+data[a]['code']+'</dd><dd class="d2">'+data[a]['ktvName']+'&nbsp;</dd><dd class="d3">'+data[a]['date']+'</dd><dd class="d4">'+data[a]['times']+'  '+data[a]['begin_time']+'点至'+data[a]['end_time']+'点</dd><dd class="d6">￥'+data[a]['price']+'</dd><dd class="d7"><span class="ms1">'+data[a]['status']+'</span></dd><dd class="d8" '+ status +'>'+info+'</dd></dl>';
				
				 str += ' <tr class="havbg" ><td><a target="_blank" '+ ktvUrl + '" class="sa1"><strong>'+ ktvName +'</strong></a></td>    <td>    <div class="vtd5"><p class="sa2"></p>'+data[a]['content']+'</div></td>    <td>    环境：<span class="sa3">'+data[a]['environmental']+'</span>&nbsp;&nbsp;服务：<span class="sa3">'+data[a]['service']+'</span>&nbsp;&nbsp;音效：<span class="sa3">'+data[a]['sound']+'</span>    </td>    <td><a target="_blank" href="'+ root +'ktv/info-'+data[a]['ktvId']+'.html" class="sa2">点评</a></td>  </tr>';	  
			}
			
				$('#comment_freme').append(str);		

			
		}, "json");
		

					   
	});
});