function shop_logout(){
    $.get(APP+"Mobile/ShopInfo/logout", '', function(data){
         if(data.status==0) {
                $.showErr(data.info,0,'hc');
                window.location.href=data.url;
            }else if(data.status == 1){
             $.showSuccess(data.info,0,'hc');
             window.location.href=data.url;
         }
    }); 
}

//修改门店密码、支付密码
function shop_refer(info){
	var query=new Object();
		if(info=='pwd' || info=='m_shop'){
			query = $("form[name='myform']").serialize();
			if(info=='m_shop'){
				var name=$("input[name='name']").val();
				if(!name){
				  $.showErr('门店名称不能为空',0,'hc');
				  return false;
				}

				// 验证手机号
				var phone = $("input[name='mobile']").val();
			    if(!(/^((0\d{2,3}-\d{7,8})|(1[35784]\d{9}))$/.test(phone))){ 
			        $.showErr("手机号码格式不正确",2,'hc');  
			        return false;
			    }
			}
		}
		if(info=='paypwd'){
			query = $("form[name='myforms']").serialize();
		}
		$.ajax({
				url:APP + "Mobile/ShopInfo/updateinfo",
				data:query,
				type:"post",
				success:function(data){
						if(data.status==1) {
							$.showSuccess(data.msg,0,'hc');
							window.location.href=data.url;
						}else{
							$.showErr(data.msg,0,'hc');
						}
				}
		})
}