source = "1";
if(haveBookMetaResource != '1') {
return;
}
function getDivISBNs() {
var divObjects = $("div[express_isbn]");
var isbns = "";
divObjects.each(function(index){
var isbn = $(this).attr("express_isbn");
isbns += "," + isbn;
});
return isbns;
}
var isbns = getDivISBNs();
if(isbns == "") {
return;
}
var strURL = GLOBAL_BASE_API_URL + "/api/bookmetadatastatus?glc="+globalLibraryCode+"&isbns="+isbns
+"&returnType=json&callback=showAllBookMetaInfoTab&jsoncallback=?";
$.getJSON(strURL, {});
//信息推送
$.getScript("http://api.interlib.com.cn:8586/InterlibCommonService/media/centerservice.js").done(function(){
var baseParam = "q=%E5%85%8B%E9%87%8C%E6%96%AF%E8%92%82&searchType=standard&isFacet=true&view=standard&searchWay=author&rows=10&sortWay=score&sortOrder=desc&curlibcode=004-02&f_subject=%E7%A7%91%E5%AD%A6%E5%B9%BB%E6%83%B3%E5%B0%8F%E8%AF%B4&f_author=%E6%96%BD%E5%B2%B7&f_class1=i&searchWay0=marc&logical0=AND";
baseParam+="&numFound=0";
pushResultData(1,"P2LN0415007",baseParam);
showAD();
});
}, 1000);
});
//加载"图书馆"分面信息
$(function(){
$("#otherLibs").hide();
$.ajax({
type:"GET",
url:"/opac/api/search;jsessionid=C6A5B8471F26BBE883A781D91DF5E20D?q=%E5%B8%B8%E4%B8%87%E7%94%9F&searchType=standard&isFacet=true&view=standard&searchWay=author&rows=10&sortWay=score&sortOrder=desc&f_subject=%E4%B8%AD%E5%9B%BD&f_pubdate=2006&f_lang=chi&f_class1=i&searchWay0=marc&logical0=AND&wt=json",
dataType: "json",
success: function(data){
if(data&&data.facet_counts){
var libcodefacets = data.facet_counts.facet_fields.curlibcode;
if(libcodefacets) {
var index = 0;
var libs = new Array();
var disablelib = "";
//加载检索结果数量
for (var i=0; i < libcodefacets.length; i++){
if((i+1)%2==1){
var libcode = libcodefacets[i];
var count = libcodefacets[i+1];
var li = $("li[code='"+libcode+"']");
var div = $("div[code='"+libcode+"']");
if(libcode!=disablelib){
if(div.length==1){
index++;
div.find("span").html("("+count+"个结果)");
libs.push(libcode);
}else if(li.length==1){
index++;
li.find(".facetCount").html("("+count+")");
if(index<=10){
li.removeClass("hide")
}else{
if(!li.hasClass("hide")){
li.addClass("hide");
}
}
libs.push(libcode);
}
}
}
}
//隐藏无结果分馆
$("#otherLibs>div, #curlibcodeFacetUL>li").each(function(){
var libcode = $(this).attr("code");
if(libcode && $.inArray(libcode, libs)==-1){
$(this).remove();
}
});
//"更多"按钮的显示处理
if(index>10){
$("#curlibcodeFacetLI").show();
}else{
$("#curlibcodeFacetLI").hide();
}
if(index>0){
$("#otherLibs").show();
}else{
$("#otherLibs").hide();
}
}
}
}
});
});
$(function(){
$.cookie("searcher_libcode", "013", {expires:365, path:'/opac'});
});