$(function(){
    var shop_id=$('#shop_id').val();
    ajax_shop_info(shop_id);
});
/**
 * 店铺信息
 */
function ajax_shop_info(shop_id){
    var query=new Object();
    query.shop_id=shop_id;
    $.ajax({
        url:APP + "Member/OrderComment/ajax_shop_info",
        data:query,
        type:"post",
        success:function(data){
            if(data.status>0) {
                $('#shop_info').html(data.shop_info_html);
            }else{
                $('#shop_info').remove();
            }
        }
    })
}
/**
 * 收藏店铺
 */
function collect_shop(id){
     $.get(APP+"Member/OrderComment/collect", { id: id}, function(data){
         if(data.status==0) {
			$.openUrl(data.url, data.msg, 'ID', '800', function () {
				return false;
			}, function () {
				return false;
			});
		 }else if(data.status == 2){
             $("#shop_collect_words").text('加入收藏');
             $.showSuccess(data.msg,1,'hc');
         }else if(data.status == 3){
             $.showErr(data.msg,0,'hc');
         }else{
             $("#shop_collect_words").text('取消收藏');
             $.showSuccess(data.msg,1,'hc');
         }
    }); 
}