function cate_apply(id,type){
	$.showConfirm('你确定要申请加入吗?',function(){
		var query=new Object();
		query.id=id;
		query.type=type;
		$.ajax({
			url:APP + "Shop/Shops/cate_apply",
			data:query,
			dataType:'json',
			success:function(obj){
				 $.showErr(obj.info,0,'hc');
				 if(obj.status){
					$.showSuccess(obj.info,0,'hc');
					 window.location.reload();
				 }else{
					 $.showSuccess(obj.info,0,'hc'); 
				 }
			}
		});
	},'hc');
}
function modify_brand(){
	var query=$("#myformb").serialize();
	$.ajax({
		url:APP+"Shop/Shops/modify_brand",
		data:query,
		dataType:'json',
		success:function(obj){
			$.showErr(obj.info,0,'hc');
			if(obj.status){
				$.showSuccess(obj.info,0,'hc');
				window.location.reload();
			}else{
				$.showSuccess(obj.info,0,'hc'); 
			}
		}
	}); 
}
function brand_edit($id){
	if($id){
		$.openUrl(APP+"Shop/Shops/brand_edit/id/"+id, '编辑品牌', 'ID', '500','hc'); 
	}else{
		$.openUrl(APP+"Shop/Shops/brand_edit", '添加品牌', 'ID', '500','hc'); 
	}
}
function cate_out(id,type){
	$.showConfirm('你确定要退出吗?',function(){
		var query=new Object();
		query.id=id;
		query.type=type;
		$.ajax({
			url:APP + "Shop/Shops/cate_out",
			data:query,
			dataType:'json',
			success:function(obj){
				 $.showErr(obj.info,0,'hc');
				 if(obj.status){
					$.showSuccess(obj.info,0,'hc');
					 window.location.reload();
				 }else{
					 $.showSuccess(obj.info,0,'hc'); 
				 }
			}
		});
	});
}