<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">var showIssueArticleList = false;
var isCurrentIssue = "";
var ARTICLE_LIST_IMG_SHOW_TYPE = $("#articleListImgShowType").val() ? $("#articleListImgShowType").val() : "";
var ARTICLE_LIST_IMG_POSITION = $("#articleListImgPosition").val() ? $("#articleListImgPosition").val() : "";
var onlineFirstAllData = "";
var latestAcceptedData = "";
var latestAllData = "";
var latestData = "";
var catalogYear = "";
var catalogIssue = "";
var virtualTopicType = "";
var topicListMax = "";
var _topicListPageNum = 1;
var topicArticleListMax = "";
var _topicArticleListPageNum = 1;
var topicId = "";
var _recommendId = "";
var recommendMaxResult = "20";
var currentpage = 1;
var totalpage = 0;

var topListType = "";
var topDayString = "";
var topYear = "";
var topRecent = "";
var topFYear = "";
var topLYear = "";
var topMax = "";
var _topCurrentPageNum = "1";

var archiveData = "";
// 杩囧垔绫诲瀷锛�0:杩囧垔/1:褰撴湡涓庤繃鍒�/2:鍏ㄩ儴,榛樿涓�0
var archiveType = "0";
var archiveCoverCount = "6";
var articleListRenderCount = 1;
var pageArticleListRenderCount = 0;


articleListRenderCount = $(".articleListRenderCount").length &gt; 0 ? $(".articleListRenderCount").length : 1;
catalogYear = $("#catalog_year").val() ? $("#catalog_year").val() : "";
catalogIssue = $("#catalog_issue").val() ? $("#catalog_issue").val() : "";
virtualTopicType = $("#virtualTopicType").val() ? $("#virtualTopicType").val() : "";
topicListMax = allData.dic.topicListMax &amp;&amp; allData.dic.topicListMax != "" ? allData.dic.topicListMax : "";
topicArticleListMax = $("#topicArticleListMax").val() ? $("#topicArticleListMax").val() : "";
topicId = $("#topicId").val() ? $("#topicId").val() : "";
topListType = $("#topListType").val() ? $("#topListType").val() : "";

topDayString = $("#topDayString").val() ? $("#topDayString").val() : "";
topYear = $("#topYear").val() ? $("#topYear").val() : "";
topRecent = $("#topRecent").val() ? $("#topRecent").val() : "";
topFYear = $("#topFYear").val() ? $("#topFYear").val() : "";
topLYear = $("#topLYear").val() ? $("#topLYear").val() : "";
topMax = $("#topMax").val() ? $("#topMax").val() : "";

archiveType = $("#archiveType").val() ? $("#archiveType").val() : "0";
ARCHIVE_COVER_COUNT = $("#archiveCoverCount").val() ? $("#archiveCoverCount").val() : "6";


config.ARTICLE_LIST_IMG_SHOW_TYPE = ARTICLE_LIST_IMG_SHOW_TYPE;
config.ARTICLE_LIST_IMG_POSITION = ARTICLE_LIST_IMG_POSITION;
config.ARCHIVE_COVER_COUNT = ARCHIVE_COVER_COUNT;
template.defaults.imports.config = config;


customConsole("config", config);
// 濡傛灉椤甸潰涓湁#issueArticleList锛屽垯璁や负鏄洰娆″垪琛ㄩ〉闈�
if ($("#issueArticleList").length &gt; 0) {
    showIssueArticleList = true;
}
customConsole("showIssueArticleList =", showIssueArticleList);
if ($("#currentIssueListInput").length &gt; 0) {
    isCurrentIssue = "1";
}

/**
 * 鏈熷垔鍒楄〃鏁版嵁鑾峰彇锛屾覆鏌�
 */
if (showIssueArticleList == true) {
    var max = "";
    if ($("#pageViewId").val() == "Home" || $("#pageViewId").val() == "shouye") {
        if (allData.dic.indexCurrentArticlesMaxCount &amp;&amp; allData.dic.indexCurrentArticlesMaxCount != "") {
            max = allData.dic.indexCurrentArticlesMaxCount
        }
    }
    getIssueArticleList("article", isCurrentIssue, catalogYear ? catalogYear : "", catalogIssue ? catalogIssue : "", max, function () {
        // 娓叉煋褰撴湡锛屽洖璋冨嚱鏁板湪main.js涓璫urrentIssueRenderCallBack()
        var data = "";
        if ($("#currentIssue").length &gt; 0) {
            var customOption = null;
            data = allData.issueData.currentIssue;
            // 棣栭〉鏃讹紝鍙暟鎹瓧鍏搁厤缃甤ustomOption
            if ($("#pageViewId").val() == "Home" || $("#pageViewId").val() == "shouye") {
                if (allData.dic.isShowJournalg || (allData.dic.indexCurrentArticlesMaxCount &amp;&amp; allData.dic.indexCurrentArticlesMaxCount != "")) {
                    customOption = {
                        isShowJournalg: true,
                        // max: false,
                    }

                    if (allData.dic.isShowJournalg) {

                        customOption.isShowJournalg = allData.dic.isShowJournalg == "false" ? false : true;
                    }
                    // if (allData.dic.indexCurrentArticlesMaxCount &amp;&amp; allData.dic.indexCurrentArticlesMaxCount != "") {

                    //     customOption.max = allData.dic.indexCurrentArticlesMaxCount
                    // }

                } else {
                    customOption = null;
                }
            } else {
                customOption = null;
            }
            renderArticleList($("#currentIssue"), $(".column-ul"), "issueArticleList", allData.issueData.currentIssue, customOption, null, null, currentIssueRenderCallBack);
            loadArticleMetricByIds($("#currentIssue"));
            loadArticleCitedByIds($("#currentIssue"));
            if ($("#indexCurrentInfo").length &gt; 0) {
                $("#indexCurrentInfo").html(template("indexCurrentInfoTpl", data));
            }
            if (window.afterIndexCurrentIssueRender) {
                afterIndexCurrentIssueRender(data);
            }
        }
        if ($("#issueList").length &gt; 0) {
            data = allData.issueData["issue_" + catalogYear + "_" + catalogIssue];
            renderArticleList($("#issueList"), $(".column-ul"), "issueArticleList", allData.issueData["issue_" + catalogYear + "_" + catalogIssue], null, null, null, currentIssueRenderCallBack);
            loadArticleMetricByIds($("#issueList"));
            loadArticleCitedByIds($("#issueList"));
        }
        if ($("#issueTitle").length &gt; 0) {
            $("#issueTitle").html(template("issueTitleTpl", data))
        }
        if ($("#issueNeighborCatalog").length &gt; 0) {
            customConsole(allData, "issueNeighborCatalog");
            $("#issueNeighborCatalog").html(template("issueNeighborCatalogTpl", data))
        }
        if ($("#issueCatalog").length &gt; 0) {
            $("#issueCatalog").html(template("issueCatalogTpl", data))
        }
        if (window.afterIssueRender) {
            afterIssueRender(data);
        }
    });
}

// 棰勫嚭鐗堟湡
if ($("#prepublish").length &gt; 0) {
    var max = allData.dic.prepublishIssuesMaxCount ? allData.dic.prepublishIssuesMaxCount : "";
    getPrepublishIssues("prepublish_list", max, function (prePublishIssueData) {
        if ($("#prepublishIssues").length &gt; 0) {
            //娓叉煋骞存湡鐨勫垏鎹ab
            renderTpl($("#prepublishYearIssue"), "prepublishYearIssueTpl", prePublishIssueData, function () {

            });
            // 鍏堟覆鏌撳嚭鏉ョ┖鐨刣iv锛岀敤index鍖哄垎
            var articleListHtml = "";
            var issueIndex = {};
            $.each(prePublishIssueData.records, function (i, item) {
                issueIndex.index = i;
                if ($("#prepublishIssueArticle").length &gt; 0) {
                    articleListHtml += template("prepublishIssueDivTpl", issueIndex);
                }
            });
            $("#prepublishIssueArticle").html(articleListHtml);
            if (prePublishIssueData &amp;&amp; prePublishIssueData.records &amp;&amp; prePublishIssueData.records.length) {
                articleListRenderCount = articleListRenderCount + prePublishIssueData.records.length;
            }
            //鐒跺悗鍐嶅垎鍒煡璇㈠勾鏈熸暟鎹紝鏍规嵁index濉厖鍒板搴攄iv閲� 
            $.each(prePublishIssueData.records, function (i, item) {
                // var prepublishArticleList = "#prepublishArticleList" + i;
                if (prePublishIssueData &amp;&amp; prePublishIssueData.records &amp;&amp; prePublishIssueData.records.length &gt; 0) {
                    var preissueId = "#prepublishIssueArticle_" + i;
                    var preissueYear = item.year;
                    var preissueIssue = item.issue;

                    // 鑾峰彇骞存湡鏂囩珷鐨勬覆鏌�
                    getIssueArticleList("article", "0", preissueYear, preissueIssue, 20, function (childPrePublishArticleList) {
                        if ($("#prepublishIssues").length &gt; 0) {
                            if ($(preissueId).length &gt; 0) {
                                var renderColumn = $(preissueId).find(".column-ul")
                                renderArticleList($(preissueId), renderColumn, "issueArticleList", childPrePublishArticleList, null, null, null, currentIssueRenderCallBack);
                            }
                            loadArticleMetricByIds($(preissueId));
                            loadArticleCitedByIds($(preissueId));
                        }
                    })
                }
            })

        }
    })
}

/**
 * 棣栭〉鍏ㄩ儴浼樺厛鍙戣〃鏁版嵁鑾峰彇锛屾覆鏌�
 */
if ($("#onlineFirstAll").length &gt; 0) {
    var max = ($("#pageViewId").val() == "Home" || $("#pageViewId").val() == "shouye") ? allData.dic.indexLatestAllArticleMaxCount ? allData.dic.indexLatestAllArticleMaxCount : "" : "";
    getLatestArticleList("latest_all_list", max, function () {
        if ($("#onlineFirstAllList").length &gt; 0) {
            customConsole("onlineFirstAllRender  start")
            renderArticleList($("#onlineFirstAllList"), null, "commonArticleList", latestAllData);
            loadArticleMetricByIds($("#onlineFirstAllList"));
            loadArticleCitedByIds($("#onlineFirstAllList"));
        }
    })
}
/**
 * 鏈€鏂板綍鐢ㄦ暟鎹幏鍙栵紝娓叉煋
 */
if ($("#latestAccepted").length &gt; 0) {
    renderLatestAcceptedPage();
}

function renderLatestAcceptedPage() {
    var max = ($("#pageViewId").val() == "Home" || $("#pageViewId").val() == "shouye") ? allData.dic.indexLatestAcceptedArticleMaxCount ? allData.dic.indexLatestAcceptedArticleMaxCount : "" : checkUndefined(getUrlParam("max")) ? getUrlParam("max") : "";
    getLatestArticleList("latest_accepted_list", max, function () {
        if ($("#latestAcceptedList").length &gt; 0) {
            customConsole("latestAcceptedRender  start")
            renderArticleList($("#latestAcceptedList"), null, "commonArticleList", latestAcceptedData);
            if ($("#paginationCn").length &gt; 0) {
                $("#paginationCn").html(template("paginationCnArt", latestAcceptedData.data))
            }
            if ($("#paginationEn").length &gt; 0) {
                $("#paginationEn").html(template("paginationEnArt", latestAcceptedData.data))
            }
            if (latestAcceptedData.data &amp;&amp; latestAcceptedData.data.totalpage) {
                totalpage = latestAcceptedData.data.totalpage;
            }
            loadArticleMetricByIds($("#latestAcceptedList"));
            loadArticleCitedByIds($("#latestAcceptedList"));
        }
    }, currentpage)
}

/**
 * 鍏ㄩ儴浼樺厛鍙戣〃鏁版嵁鑾峰彇锛屾覆鏌�
 */
if ($("#latestAll").length &gt; 0) {
    renderLatestAllPage();
}

function renderLatestAllPage() {
    var max = ($("#pageViewId").val() == "Home" || $("#pageViewId").val() == "shouye") ? allData.dic.indexLatestAllArticleMaxCount ? allData.dic.indexLatestAllArticleMaxCount : "" : checkUndefined(getUrlParam("max")) ? getUrlParam("max") : "";
    getLatestArticleList("latest_all_list", max, function () {
        if ($("#latestAllList").length &gt; 0) {
            customConsole("latestAllRender  start")
            renderArticleList($("#latestAllList"), null, "commonArticleList", latestAllData);
            if ($("#paginationCn").length &gt; 0) {
                $("#paginationCn").html(template("paginationCnArt", latestAllData.data))
            }
            if ($("#paginationEn").length &gt; 0) {
                $("#paginationEn").html(template("paginationEnArt", latestAllData.data))
            }
            if (latestAllData.data &amp;&amp; latestAllData.data.totalpage) {
                totalpage = latestAllData.data.totalpage;
            }
            loadArticleMetricByIds($("#latestAllList"));
            loadArticleCitedByIds($("#latestAllList"));
        }
    }, currentpage)
}

/**
 * 浼樺厛鍙戣〃鏁版嵁鑾峰彇锛屾覆鏌�
 */
if ($("#latest").length &gt; 0) {
    renderLatestPage();
}

function renderLatestPage() {
    var max = ($("#pageViewId").val() == "Home" || $("#pageViewId").val() == "shouye") ? allData.dic.indexLatestArticleMaxCount ? allData.dic.indexLatestArticleMaxCount : "" : checkUndefined(getUrlParam("max")) ? getUrlParam("max") : "";
    getLatestArticleList("latest_list", max, function () {
        if ($("#latestList").length &gt; 0) {
            customConsole("latestRender  start")
            renderArticleList($("#latestList"), null, "commonArticleList", latestData);
            if ($("#paginationCn").length &gt; 0) {
                $("#paginationCn").html(template("paginationCnArt", latestData.data))
            }
            if ($("#paginationEn").length &gt; 0) {
                $("#paginationEn").html(template("paginationEnArt", latestData.data))
            }
            if (latestData.data &amp;&amp; latestData.data.totalpage) {
                totalpage = latestData.data.totalpage;
            }
            loadArticleMetricByIds($("#latestList"));
            loadArticleCitedByIds($("#latestList"));
        }
    }, currentpage)
}

/**
 * 椤甸潰鏈�#topicList鏃�,鑾峰彇鐗瑰垔鍒楄〃骞舵覆鏌�
 */

if ($("#topicList").length &gt; 0) {
    topicListPageRender();
}
function topicListPageRender() {
    getTopicList(_language, virtualTopicType, topicListMax, _topicListPageNum, function () {
        if ($("#topicTitle").length &gt; 0) {
            $("#topicTitle").html(template("topicTitleTpl", allData.topicListData[virtualTopicType]))
        }
        if ($("#topicList").length &gt; 0) {
            $("#topicList").html(template("topicListTpl", allData.topicListData[virtualTopicType]))
            $("#topicList .article-list").addClass("article-list-px-0");
        }

        if ($("#paginationCn").length &gt; 0) {
            $("#paginationCn").html(template("paginationCnArt", allData.topicListData[virtualTopicType].pagerFilter))
        }
        if ($("#paginationEn").length &gt; 0) {
            $("#paginationEn").html(template("paginationEnArt", allData.topicListData[virtualTopicType].pagerFilter))
        }

        if (allData.topicListData[virtualTopicType].pagerFilter &amp;&amp; allData.topicListData[virtualTopicType].pagerFilter.totalpage) {
            totalpage = allData.topicListData[virtualTopicType].pagerFilter.totalpage;
        }

        if (window.afterTopicListRender) {
            afterTopicListRender(allData.topicListData[virtualTopicType]);
        }

    });
}

/**
 * 椤甸潰鏈�#topicArticlesList鏃�, 鑾峰彇鐗瑰垔鏂囩珷鍒楄〃骞舵覆鏌�
 */
if ($("#topicArticlesList").length &gt; 0) {
    topicArticlesListPageRender();
}

function topicArticlesListPageRender() {
    // 鐗瑰垔瀛愮骇tag(瀛愮骇鐗瑰垔)鐨勬暟閲�
    var topicChildNum = 0;
    getTopicChildList(_language, 100, 1, topicId, function (topicChildList) {
        // 鐗瑰垔瀛愮骇鐗瑰垔鏁伴噺璧嬪€�
        console.log('topicChildList----', topicChildList);
        topicChildNum = topicChildList.pagerFilter.records.length;
        if (topicChildNum &gt; 0 &amp;&amp; $("#topicArticlesList").length &gt; 0) {
            getTopicArticlesList(topicId, 999, 1, function () {
                if ($("#topicArticlesList").length &gt; 0) {
                    renderArticleList($("#topicArticlesList"), null, "topArticleList", allData.topicArticlesListData[topicId]);
                    loadArticleMetricByIds($("#topicArticlesList"));
                    loadArticleCitedByIds($("#topicArticlesList"));
                    $("#topicArticlesList .article-list").addClass("article-list-px-0").find(".article-list-left").remove();
                    // 鐗瑰垔瀛愮骇tag(瀛愮骇鐗瑰垔)鐨勬覆鏌撳強鍏舵枃绔犲垪琛ㄥ灞傚寘瑁规爣绛�
                    $("#topicArticlesList").append(template("topicChildTpl", topicChildList));
                    $.each(topicChildList.pagerFilter.records, function (i, item) {
                        var topicChildDetailNodeId = "#topicChildDetail" + i;
                        if (topicChildList.pagerFilter &amp;&amp; topicChildList.pagerFilter.records &amp;&amp; topicChildList.pagerFilter.records.length &gt; 0) {
                            var childTopicId = item.id;
                            // 鐗瑰垔瀛愮骇鐗瑰垔涓嬫枃绔犵殑娓叉煋
                            getTopicArticlesList(childTopicId, 999, 1, function (childTopicArticleList) {
                                if ($(topicChildDetailNodeId).length &gt; 0) {
                                    renderArticleList($(topicChildDetailNodeId), null, "topArticleList", childTopicArticleList);
                                    loadArticleMetricByIds($(topicChildDetailNodeId));
                                    loadArticleCitedByIds($(topicChildDetailNodeId));
                                    $(topicChildDetailNodeId).find(".article-list").addClass("article-list-px-0").find(".article-list-left").remove();
                                }
                            })
                        }
                    })
                }
            })
        }
    })

    getTopicArticlesList(topicId, topicArticleListMax, _topicArticleListPageNum, function () {
        if ($("#topicTypeName").length &gt; 0) {
            $("#topicTypeName").html(template("topicTypeNameTpl", allData.topicArticlesListData[topicId]))
        }

        if ($("#topicArticlesListRemark").length &gt; 0) {
            $("#topicArticlesListRemark").html(template("topicArticlesListRemarkTpl", allData.topicArticlesListData[topicId]))
        }
        // 濡傛灉鐗瑰垔瀛愮骇鐗瑰垔鐨勬暟閲�=0
        if (topicChildNum == 0) {
            if ($("#topicArticlesList").length &gt; 0) {
                renderArticleList($("#topicArticlesList"), null, "topArticleList", allData.topicArticlesListData[topicId]);
                loadArticleMetricByIds($("#topicArticlesList"));
                loadArticleCitedByIds($("#topicArticlesList"));
                $("#topicArticlesList .article-list").addClass("article-list-px-0").find(".article-list-left").remove();
            }

            if ($("#paginationCn").length &gt; 0) {
                $("#paginationCn").html(template("paginationCnArt", allData.topicArticlesListData[topicId].pagerFilter))
            }
            if ($("#paginationEn").length &gt; 0) {
                $("#paginationEn").html(template("paginationEnArt", allData.topicArticlesListData[topicId].pagerFilter))
            }

            if (allData.topicArticlesListData[topicId].pagerFilter &amp;&amp; allData.topicArticlesListData[topicId].pagerFilter.totalpage) {
                totalpage = allData.topicArticlesListData[topicId].pagerFilter.totalpage;
            }

        }
        if ($("#neighborVirtualTopic").length &gt; 0) {
            $("#neighborVirtualTopic").html(template("neighborVirtualTopicTpl", allData.topicArticlesListData[topicId]))
        }


        if (window.afterTopicArticleListRender) {
            afterTopicArticleListRender(allData.topicArticlesListData[topicId]);
        }

    });
}


/**
   * 鎷艰鎺掕鎺ュ彛鍙傛暟
   */
var topAjaxData = {
    type: topListType,
    currentpage: _topCurrentPageNum,
}
// 濡傛灉鏄垔缇ら椤碉紝鍒欐坊鍔犲弬鏁癵roup: 1
if (allData.journal.isIndex == 1) {
    topAjaxData.group = 1;
}

// 椤甸潰閾炬帴涓槸鍚︽湁dayString銆亂ear銆乺ecent銆乫Year銆乴Year鍙傛暟
if (checkUndefined(getUrlParam("dayString")) ? checkUndefined(getUrlParam("dayString")) : "" || checkUndefined(getUrlParam("year")) ? checkUndefined(getUrlParam("year")) : "" || checkUndefined(getUrlParam("recent")) ? checkUndefined(getUrlParam("recent")) : "" || checkUndefined(getUrlParam("fYear")) ? checkUndefined(getUrlParam("fYear")) : "" || checkUndefined(getUrlParam("lYear")) ? checkUndefined(getUrlParam("lYear")) : "") {
    getUrlParam("dayString") ? topAjaxData.dayString = getUrlParam("dayString") : "";
    getUrlParam("year") ? topAjaxData.year = getUrlParam("year") : ""
    getUrlParam("recent") ? topAjaxData.recent = getUrlParam("recent") : "";
    getUrlParam("fYear") ? topAjaxData.fYear = getUrlParam("fYear") : "";
    getUrlParam("lYear") ? topAjaxData.lYear = getUrlParam("lYear") : "";
    $href = window.location.href;
    // 鏍规嵁椤甸潰鍙傛暟锛屾帶鍒秚ab鍙婃弿杩扮殑楂樹寒銆佹樉闅�
    if ($href.indexOf("dayString=30") &gt; -1) {
        $("ul[class^='rank-yeartab'] .oneMonth").addClass("current").siblings().removeClass("current");
        $("body").addClass("oneMonth-page");
    } else if ($href.indexOf("dayString=180") &gt; -1) {
        $("ul[class^='rank-yeartab'] .halfYear").addClass("current").siblings().removeClass("current");
        $("body").addClass("halfYear-page");
    } else if ($href.indexOf("dayString=365") &gt; -1 || $href.indexOf("recent=1") &gt; -1) {
        $("ul[class^='rank-yeartab'] .allYear").addClass("current").siblings().removeClass("current");
        $("body").addClass("allYear-page");
    } else if ($href.indexOf("dayString=730") &gt; -1 || $href.indexOf("recent=2") &gt; -1) {
        $("ul[class^='rank-yeartab'] .twoYear").addClass("current").siblings().removeClass("current");
        $("body").addClass("twoYear-page");
    } else if ($href.indexOf("dayString=1095") &gt; -1 || $href.indexOf("recent=3") &gt; -1) {
        $("ul[class^='rank-yeartab'] .threeYear").addClass("current").siblings().removeClass("current");
        $("body").addClass("threeYear-page");
    } else if ($href.indexOf("recent=4") &gt; -1) {
        $("ul[class^='rank-yeartab'] .fourYear").addClass("current").siblings().removeClass("current");
        $("body").addClass("fourYear-page");
    } else if ($href.indexOf("recent=5") &gt; -1) {
        $("ul[class^='rank-yeartab'] .fiveYear").addClass("current").siblings().removeClass("current");
        $("body").addClass("fiveYear-page");
    }
} else {

    // 濡傛灉椤甸潰閾炬帴涓病鏈塪ayString銆亂ear銆乺ecent銆乫Year銆乴Year鍙傛暟涓旀湁ul[class^='rank-yeartab']锛屽垯楂樹寒鍏ㄩ儴鎸夐挳
    if ($("ul[class^='rank-yeartab'] .all").length) {
        $("ul[class^='rank-yeartab'] .all").addClass("current").siblings().removeClass("current");
    }

    topDayString ? topAjaxData.dayString = topDayString : "";
    topYear ? topAjaxData.year = topYear : "";
    topRecent ? topAjaxData.recent = topRecent : "";
    topFYear ? topAjaxData.fYear = topFYear : "";
    topLYear ? topAjaxData.lYear = topLYear : "";
    topMax ? topAjaxData.max = topMax : "";

    if ($("#pageViewId").val() == "topDown") {
        allData.dic.topDownDayString ? topAjaxData.dayString = allData.dic.topDownDayString : "";
        allData.dic.topDownYear ? topAjaxData.year = allData.dic.topDownYear : "";
        allData.dic.topDownRecent ? topAjaxData.recent = allData.dic.topDownRecent : "";
        allData.dic.topDownFYear ? topAjaxData.fYear = allData.dic.topDownFYear : "";
        allData.dic.topDownLYear ? topAjaxData.lYear = allData.dic.topDownLYear : "";
    } else if ($("#pageViewId").val() == "topView") {
        allData.dic.topViewDayString ? topAjaxData.dayString = allData.dic.topViewDayString : "";
        allData.dic.topViewYear ? topAjaxData.year = allData.dic.topViewYear : "";
        allData.dic.topViewRecent ? topAjaxData.recent = allData.dic.topViewRecent : "";
        allData.dic.topViewFYear ? topAjaxData.fYear = allData.dic.topViewFYear : "";
        allData.dic.topViewLYear ? topAjaxData.lYear = allData.dic.topViewLYear : "";
    } else if ($("#pageViewId").val() == "topCited") {
        allData.dic.topCitedDayString ? topAjaxData.dayString = allData.dic.topCitedDayString : "";
        allData.dic.topCitedYear ? topAjaxData.year = allData.dic.topCitedYear : "";
        allData.dic.topCitedRecent ? topAjaxData.recent = allData.dic.topCitedRecent : "";
        allData.dic.topCitedFYear ? topAjaxData.fYear = allData.dic.topCitedFYear : "";
        allData.dic.topCitedLYear ? topAjaxData.lYear = allData.dic.topCitedLYear : "";
    } else if ($("#pageViewId").val() == "topDown_en") {
        allData.dic.topDownEnDayString ? topAjaxData.dayString = allData.dic.topDownEnDayString : "";
        allData.dic.topDownEnYear ? topAjaxData.year = allData.dic.topDownEnYear : "";
        allData.dic.topDownEnRecent ? topAjaxData.recent = allData.dic.topDownEnRecent : "";
        allData.dic.topDownEnFYear ? topAjaxData.fYear = allData.dic.topDownEnFYear : "";
        allData.dic.topDownEnLYear ? topAjaxData.lYear = allData.dic.topDownEnLYear : "";
    } else if ($("#pageViewId").val() == "topView_en") {
        allData.dic.topViewEnDayString ? topAjaxData.dayString = allData.dic.topViewEnDayString : "";
        allData.dic.topViewEnYear ? topAjaxData.year = allData.dic.topViewEnYear : "";
        allData.dic.topViewEnRecent ? topAjaxData.recent = allData.dic.topViewEnRecent : "";
        allData.dic.topViewEnFYear ? topAjaxData.fYear = allData.dic.topViewEnFYear : "";
        allData.dic.topViewEnLYear ? topAjaxData.lYear = allData.dic.topViewEnLYear : "";
    } else if ($("#pageViewId").val() == "topCited_en") {
        allData.dic.topCitedEnDayString ? topAjaxData.dayString = allData.dic.topCitedEnDayString : "";
        allData.dic.topCitedEnYear ? topAjaxData.year = allData.dic.topCitedEnYear : "";
        allData.dic.topCitedEnRecent ? topAjaxData.recent = allData.dic.topCitedEnRecent : "";
        allData.dic.topCitedEnFYear ? topAjaxData.fYear = allData.dic.topCitedEnFYear : "";
        allData.dic.topCitedEnLYear ? topAjaxData.lYear = allData.dic.topCitedEnLYear : "";
    }
}


if ($("#topListType").length &gt; 0) {
    topArticleListPageRender();
}

function topArticleListPageRender() {
    getTopArticleList(topAjaxData, null, function () {
        pageArticleListRenderCount = 0;
        if ($("#topViewList").length &gt; 0) {
            renderArticleList($("#topViewList"), null, "topArticleList", allData.topArticleListData[topAjaxData.type])
            loadArticleMetricByIds($("#topViewList"), topAjaxData.dayString);
            loadArticleCitedByIds($("#topViewList"), topAjaxData.dayString);
        }
        if ($("#topHtmlList").length &gt; 0) {
            renderArticleList($("#topHtmlList"), null, "topArticleList", allData.topArticleListData[topAjaxData.type])
            loadArticleMetricByIds($("#topHtmlList"), topAjaxData.dayString);
            loadArticleCitedByIds($("#topHtmlList"), topAjaxData.dayString);
        }
        if ($("#topDownList").length &gt; 0) {
            renderArticleList($("#topDownList"), null, "topArticleList", allData.topArticleListData[topAjaxData.type])
            loadArticleMetricByIds($("#topDownList"), topAjaxData.dayString);
            loadArticleCitedByIds($("#topDownList"), topAjaxData.dayString);
        }
        if ($("#topCitedList").length &gt; 0) {
            renderArticleList($("#topCitedList"), null, "topArticleList", allData.topArticleListData[topAjaxData.type])
            loadArticleMetricByIds($("#topCitedList"), topAjaxData.dayString);
            loadArticleCitedByIds($("#topCitedList"), topAjaxData.dayString);
        }
        if ($("#paginationCn").length &gt; 0) {
            $("#paginationCn").html(template("paginationCnArt", allData.topArticleListData[topAjaxData.type].pagerFilter))
        }
        if ($("#paginationEn").length &gt; 0) {
            $("#paginationEn").html(template("paginationEnArt", allData.topArticleListData[topAjaxData.type].pagerFilter))
        }

        if (allData.topArticleListData[topAjaxData.type].pagerFilter &amp;&amp; allData.topArticleListData[topAjaxData.type].pagerFilter.totalpage) {
            totalpage = allData.topArticleListData[topAjaxData.type].pagerFilter.totalpage;
        }

    });
}

/**
 * 鑾峰彇鎺ㄨ崘鏂囩珷绫诲瀷id锛岃幏鍙栨帹鑽愭枃绔狅紝娓叉煋鎺ㄨ崘鏂囩珷
 */
_recommendId = checkUndefined(getUrlParam("recommendId")) ? checkUndefined(getUrlParam("recommendId")) : "";
if ($("#hotList").length &gt; 0) {
    recommendArticleListPageRender();
}
function recommendArticleListPageRender() {
    getRecommendList(null, _recommendId, _language, recommendMaxResult, currentpage, function () {
        $(".commontit").html(_language == "cn" ? allData.recommendList[_recommendId].hotType.nameCn : allData.recommendList[_recommendId].hotType.nameEn);
        renderArticleList($("#hotArticleList"), null, "topArticleList", allData.recommendList[_recommendId])
        loadArticleMetricByIds($("#hotArticleList"));
        loadArticleCitedByIds($("#hotArticleList"));
        $("#hotArticleList .article-list").addClass("article-list-px-0").find(".article-list-left").remove();
        if ($("#paginationCn").length &gt; 0) {
            $("#paginationCn").html(template("paginationCnArt", allData.recommendList[_recommendId].pagerFilter))
        }
        if ($("#paginationEn").length &gt; 0) {
            $("#paginationEn").html(template("paginationEnArt", allData.recommendList[_recommendId].pagerFilter))
        }

        if (allData.recommendList[_recommendId].pagerFilter &amp;&amp; allData.recommendList[_recommendId].pagerFilter.totalpage) {
            totalpage = allData.recommendList[_recommendId].pagerFilter.totalpage;
        }

    }, checkUndefined(getUrlParam("type")) ? getUrlParam("type") : '')
}

// 鑾峰彇杩囧垔鏁版嵁锛屽苟娓叉煋rssList
getArchiveData(archiveType, $("#rssList"), function (archiveData) {
    customConsole("getAchiveData----", archiveData);
    $("#rssList").html(template("rssListTpl", archiveData));
})
// 鑾峰彇杩囧垔鏁版嵁锛屽苟娓叉煋杩囧垔鍒楄〃
getArchiveData(archiveType, $("#archive"), function (archiveData) {
    customConsole("getAchiveData----", archiveData);
    $("#archive").html(template("archiveTpl", archiveData));
    archiveInit();
})




if ($("#tagType").length &gt; 0) {
    allData.tagType = $("#tagType").val();
    var conds = new Array();
    //string绫诲瀷鏌ヨ鏉′欢,渚�:鎸塪oi杩涜鏌ヨ
    SearchTools_put(conds, new SearchCond("type", "like", allData.tagType));
    SearchTools_put(conds, new SearchCond("level", "=", 1, "integer_"));
    //int绫诲瀷鏌ヨ鏉′欢,渚�:鎸塺eleaseState杩涜鏌ヨ
    // SearchTools_put(conds, new SearchCond("releaseState", "=", 1, "integer_"));

    var searchCond = JSON.stringify(conds);
    getTagList(searchCond, allData.dic.tagListMax ? allData.dic.tagListMax : null, currentpage, function (tagList) {
        $("#tagsByTitle").html(allData.tagType);
        $("#tagsByList").html(template("tagsByListTpl", tagList));
    })

}



/**
 * 鑾峰彇tag鐨勫瓙绾у垪琛紝骞舵覆鏌�
 */
if ($("#tagsOf").length &gt; 0) {
    tagLevel1PageRender();
}
function tagLevel1PageRender() {
    if ($("#tagLevel1").length &gt; 0) {
        allData.tagLevel1 = $("#tagLevel1").val();
        getTagChildList(null, allData.tagLevel1, null, allData.dic.tagLevel1ListMax ? allData.dic.tagLevel1ListMax : null, currentpage, function (tagDataList) {
            $("#tagsOfTitle").html(template("tagsOfTitleTpl", tagDataList))
            $("#tagsOfList").html(template("tagsOfListTpl", tagDataList));
            if ($("#paginationCn").length &gt; 0) {
                $("#paginationCn").html(template("paginationCnArt", tagDataList.pagerFilter))
            }
            if ($("#paginationEn").length &gt; 0) {
                $("#paginationEn").html(template("paginationEnArt", tagDataList.pagerFilter))
            }
            if (tagDataList.pagerFilter &amp;&amp; tagDataList.pagerFilter.totalpage) {
                totalpage = tagDataList.pagerFilter.totalpage;
            }
        })
    }
}

/**
 * 鍒嗛〉鑾峰彇tag涓嬫暟鎹垪琛�
 */
if ($("#tagDetailList").length &gt; 0) {
    tagDetailPageRender();
}
function tagDetailPageRender() {
    if ($("#tagDetailOutputName").length) {
        allData.tagId = $("#tagId").val();
        getTagDataList(allData.tagId, null, null, checkUndefined(getUrlParam("type")) ? getUrlParam("type") : '', _language, allData.dic.tagDetailListMax ? allData.dic.tagDetailListMax : null, currentpage, function (tagDetail) {
            $("#tagDetailTitle").html(template("tagDetailTitleTpl", tagDetail))
            tagDetail.tagDetailOutputName = $("#tagDetailOutputName").val();
            if ($("#tagDetailList").length &gt; 0) {
                renderArticleList($("#tagDetailList"), null, "topArticleList", tagDetail);
                loadArticleMetricByIds($("#tagDetailList"));
                loadArticleCitedByIds($("#tagDetailList"));
                $("#tagDetailList .article-list").addClass("article-list-px-0").find(".article-list-left").remove();
            }
            if ($("#paginationCn").length &gt; 0) {
                $("#paginationCn").html(template("paginationCnArt", tagDetail.pagerFilter))
            }
            if ($("#paginationEn").length &gt; 0) {
                $("#paginationEn").html(template("paginationEnArt", tagDetail.pagerFilter))
            }
            if (tagDetail.pagerFilter &amp;&amp; tagDetail.pagerFilter.totalpage) {
                totalpage = tagDetail.pagerFilter.totalpage;
            }
        })
    }
}


/**
 * 绾﹀畾,涓嬫柟鐨刢lass鍙仛鏁版嵁娓叉煋浣跨敤锛屼笉鍙仛鍏跺畠鐢ㄩ€旓紝濡傛牱寮�
 * journalgTpl: 瀛樻斁鏍忕洰
 * listTpl: 瀛樻斁article-list
 */

/**
 * 
 * @param {*} $renderNode 鏂囩珷鍒楄〃娓叉煋鐨勮妭鐐癸紝jQuery瀵硅薄
 * @param {*} $renderColumn 鏂囩珷鏍忕洰瀵艰埅鑺傜偣锛宩Query瀵硅薄
 * @param {*} articleListType 鏂囩珷鍒楄〃绫诲瀷
 * @param {*} data 娓叉煋鐨勬暟鎹�
 * @param {*} customOption 鑷畾涔夐厤缃」
 * @param {*} renderTpl 娓叉煋妯℃澘id, 涓嶄紶鎴栦紶null鏃朵负listTPl
 * @param {*} renderFlag  澶囩敤瀛楁锛岃瀛楁浼氭坊鍔犲埌姣忎釜article涓紝鍙湪椤甸潰鐩存帴浣跨敤
 * @param {*} callback 
 */
function renderArticleList($renderNode, $renderColumn, articleListType, data, customOption, renderTpl, renderFlag, callback) {
    var articleListData = {};


    window.categoryName = "";
    var categoryIndex = 0;
    var articleListHtml = "";
    var eachCount = 0;
    window.topicName = "";

    var renderTpl = renderTpl ? renderTpl : "listTpl";
    var renderFlag = renderFlag ? renderFlag : null;

    // var rankIndex = "";

    var columnHtml = "";
    if (!customOption) {
        customOption == null;
    }

    pageArticleListRenderCount++;

    if (articleListType == "issueArticleList") {
        // articleListData = data;
        articleListData.articleList = data.pagerFilter &amp;&amp; data.pagerFilter.records ? data.pagerFilter.records : ""
    } else if (articleListType == "commonArticleList") {
        articleListData.articleList = data.data.records;
    } else if (articleListType == "topArticleList") {
        articleListData.articleList = data.pagerFilter.records;
        var rankCurrentPage = data.pagerFilter.currentpage;
        var rankMaxResult = data.pagerFilter.maxresult;
    } else if (articleListType == "searchArticleList" || articleListType == "searchArticleParaList") {
        articleListData.articleList = data.pagerFilter.records;
    }
    customConsole("articleListData", articleListData);

    if (articleListData.articleList.length &lt; 1) {
        if (pageArticleListRenderCount == articleListRenderCount) {
            articleListHandle();
        }
    } else {

        $.each(articleListData.articleList, function (i, article) {
            if (!article) {
                article = {};
            }
            // if ($renderNode[0].id == "hotArticleList" || $renderNode.hasClass("recommendListNode")) {
            //     if (article.article) {
            //         article = article.article;
            //     }
            // }
            if (article &amp;&amp; article.dataType) {
                // article = article.data;
                article = Object.assign(article, article.data);
            }

            // if (article.htmlAccess) {
            //     if (!allData.dic.isSkipArticleMultilingual) {
            //         article.htmlAccess = (article.multilingual === 1 || (article.language === allData._language || (article.language !== 'en' &amp;&amp; allData._language === 'cn'))) ? article.htmlAccess : false;
            //     }
            // }

            article.articleListType = articleListType;
            article.renderFlag = renderFlag;
            //customConsole(i, article);
            article.rankIndex = (rankCurrentPage - 1) * rankMaxResult + i + 1;
            // 鏂囩珷鍒楄〃鐨勬瘡绡囨枃绔犳覆鏌撳畬鍓嶆墽琛�
            if (window.beforeEveryArticleRender) {
                articleListHtml = beforeEveryArticleRender(article, articleListHtml, $renderNode);
            }
            if ($renderColumn &amp;&amp; articleListType == "issueArticleList") {
                if ((article.categoryNameCn != "Others" &amp;&amp; article.categoryNameCn != "鍏跺畠" &amp;&amp; article.categoryNameCn != categoryName &amp;&amp; article.categoryNameCn != "" &amp;&amp; _language == "cn") || (article.categoryNameEn != "Others" &amp;&amp; article.categoryNameEn != "鍏跺畠" &amp;&amp; article.categoryNameEn != categoryName &amp;&amp; article.categoryNameEn != "" &amp;&amp; _language == "en")) {
                    categoryIndex += 1;
                    article.categoryIndex = categoryIndex;
                    // $renderNode.append(template("journalgTpl", article))
                    if ((article.categoryNameCn &amp;&amp; article.categoryNameCn != "" &amp;&amp; _language == "cn") || (article.categoryNameEn &amp;&amp; article.categoryNameEn != "" &amp;&amp; _language == "en")) {
                        if (!customOption || customOption.isShowJournalg) {
                            articleListHtml += template("journalgTpl", article);
                        }
                        if ($renderColumn.length &gt; 0) {
                            columnHtml += template("columnLi", article);
                        }
                    }

                }
                categoryName = _language == "cn" ? article.categoryNameCn : article.categoryNameEn;
                // 鐩鏂囩珷鍒楄〃鐨勬爮鐩覆鏌撳畬鍚庯紝渚嬶細鍖楄埅绀剧涓绘寔浜鸿
                if (window.afterIssueArticleJournalgRender) {
                    articleListHtml = afterIssueArticleJournalgRender(article, articleListHtml);
                }
            }

            // 鏂囩珷鍒楄〃鐨勬瘡绡囨枃绔犳覆鏌撳畬鍚庢墽琛�
            if (window.afterEveryArticleRender) {
                articleListHtml = afterEveryArticleRender(article, articleListHtml);
            }

            // customConsole("listTpl =", template("listTpl", article));
            // $renderNode.append(template("listTpl", article));
            if (articleListType == "searchArticleParaList") {
                var articleData = article;
                articleData.article.paraList = article.paraList;
                articleData.article.articleListType = article.articleListType;
            } else {
                var articleData = { article: article };
            }
            // 鎺ュ彛涓嶆敮鎸佹渶澶ц繑鍥炴暟閲忔椂鐨勪复鏃跺鐞嗗姙娉�
            // if (customOption &amp;&amp; customOption.max &amp;&amp; eachCount &gt;= customOption.max) {
            //     return;
            // } else {
            //     articleListHtml += template(renderTpl, articleData);
            // }
            // 濡傛灉鏈塪ataType锛屽垯鏄湁tag绫诲瀷鐨勬暟鎹紝鎸夊垎绫绘覆鏌�

            // 浣滆€呮湁鑻辨枃鍚嶇殑鎷煎悎鎴恆uthorEnList
            articleAuthors2AuthorsCnOrAuthorsEn(articleData.article);

            articleListHtml += template(renderTpl, articleData);

            eachCount++;
            if (eachCount &gt;= articleListData.articleList.length || (customOption &amp;&amp; customOption.max &amp;&amp; eachCount &gt;= customOption.max)) {
                // 娓叉煋article-list
                if (articleListType == "issueArticleList" &amp;&amp; $renderColumn &amp;&amp; $renderColumn.length &gt; 0 || ($renderColumn &amp;&amp; articleListType == "issueArticleList" &amp;&amp; (!customOption || customOption.isShowJournalg))) {
                    $renderColumn.html(columnHtml);
                }
                // customConsole(articleListHtml);
                $renderNode.html(articleListHtml);
                // 姝ゅ鍙互鎵ц涓€浜涘叕鍏辩殑鏂规硶锛屽鎽樿銆乭tml娴忚璁￠噺鏁扮瓑鈥︹€�
                refreshAfterAjaxLoad();


                if (pageArticleListRenderCount == articleListRenderCount) {
                    articleListHandle();
                }

                // 姝ゅ鐨刢allback澶囩粰main.js璋冪敤锛屽鐞嗕竴浜涢潪甯歌鐨勯渶姹傦紝濡俻df澶у皬鍗曚綅绛夆€︹€�
                if (typeof callback == "function") {
                    callback();
                }
            }

        })

    }

}


function gotopage(page) {
    pageArticleListRenderCount = 0;
    currentpage = page;
    if ($("#topicList").length &gt; 0) {
        _topicListPageNum = page;
        topicListPageRender();
    } else if ($("#topicArticlesList").length &gt; 0) {
        _topicArticleListPageNum = page;
        topicArticlesListPageRender();
    } else if ($("#topListType").length &gt; 0) {
        topAjaxData.currentpage = page;
        topArticleListPageRender();
    } else if ($("#hotList").length &gt; 0) {
        recommendArticleListPageRender();
    } else if ($("#tagsOf").length &gt; 0) {
        tagLevel1PageRender()
    } else if ($("#tagDetailOutputName").length &gt; 0) {
        tagDetailPageRender();
    } else if ($("#latestAccepted").length &gt; 0) {
        renderLatestAcceptedPage();
    } else if ($("#latestAll").length &gt; 0) {
        renderLatestAllPage();
    } else if ($("#latest").length &gt; 0) {
        renderLatestPage();
    } else {
        renderPage(page);
    }

}

function gotoinputpage() {
    pageArticleListRenderCount = 0;
    var viewPage = $("input.inputpagenum").val();
    if (typeof (viewPage) == "undefined" || viewPage == "") {
        _language == "cn" ? alert("璇疯緭鍏ラ〉鐮�!") : alert("Please enter the page number!");
    } else {
        if (!isNaN(viewPage)) {
            if (parseInt(viewPage) &lt;= 0 || parseInt(viewPage) &gt; totalpage) {
                _language == "cn" ? alert("杈撳叆閿欒!") : alert("Illegal entry!");
            } else if (parseInt(viewPage) == currentpage) {
                return;
            } else {
                gotopage(parseInt(viewPage));
            }
        } else {
            _language == "cn" ? alert("杈撳叆閿欒!") : alert("Illegal entry!");
        }
    }
}

function gotopageSubmit(event) {
    if (event &amp;&amp; event.keyCode == 13) { // enter 閿�
        gotoinputpage();
    }
}

function checkUndefined(str) {
    if (str != "undefined" &amp;&amp; str != "") {
        return str;
    } else {
        return "";
    }
}</pre></body></html>