function initArticleT() { // 话题点进去的文章列表 // Top cited / Top read / Top download点进去的文章列表 var J_ID = getQueryString('J_num'); //期刊 var t_ID = getQueryString('t_id'); //话题 if (t_ID != null) { $.ajax({ type: 'post', url: apiUrl + 'super/Publish/addVisitNum', data: { 'type': Jour_num }, success: function (result) { if (result.code == 0) { } else { // ShowDanger("请求失败!"); } }, error: function () { // ShowDanger("error!"); } }); // 分期时间 localStorage.setItem("Journals_num", t_ID); var urlList = { list: 'api/Article/getTopicArticles' } var topic_mess = {}; topic_mess.topic_id = t_ID; topic_mess.pageIndex = 1; topic_mess.pageSize = 10; var totalPage;//总页码 var totalRecords;//总数据条数 var pageNo = topic_mess.pageIndex;//当前页码 // 时间轴 commonInit() if (t_ID != '369') { $('.wenz_list .about2').css('display', 'none') } $.ajax({ type: 'post', url: apiUrl + 'api/Journal/getJournalLine', data: { "journal_id": Jour_num }, success: function (result) { if (result.code == 0) { var arr = result.data.lines; var str = ""; var dis_ = ''; for (var i = 0; i < arr.length; i++) { if (i == arr.length - 1) { if (i == 0) { dis_ = '20' } else { dis_ = parseInt(dis_) + parseInt(arr[i].dist * 130); } str += '
  • ' + arr[i].time + '

    ' + '' + '

    >> ' + arr[i].title + '

    ' + '' + '

    ' + arr[i].intro + '

  • ' } else { if (arr[i].time == arr[i + 1].time) { if (i == 0) { dis_ = '20' } else { dis_ = parseInt(dis_) + parseInt(arr[i].dist * 130); } str += '
  • ' + arr[i].time + '

    ' + '' + '

    >> ' + arr[i].title + '

    ' + '' + '

    ' + arr[i].intro + '

    ' + '' + '

    >> ' + arr[i + 1].title + '

    ' + '' + '

    ' + arr[i + 1].intro + '

  • ' i = i + 1; } else { if (i == 0) { dis_ = '20' } else { dis_ = parseInt(dis_) + parseInt(arr[i].dist * 130); } str += '
  • ' + arr[i].time + '

    ' + '' + '

    >> ' + arr[i].title + '

    ' + '' + '

    ' + arr[i].intro + '

  • ' } } } if (Jour_num == '1' && t_ID == '369') { $('.wenz_list>.about2 ul').html(str); $('#kkpager').css('display', 'none') $('.gue_chinese_tot').css('display', 'none') } else { $('.wenz_list .about2').css('display', 'none') } } else { // ShowDanger("请求失败!"); } }, error: function () { ShowDanger("error!"); } }) $.ajax({ type: 'post', url: apiUrl + urlList.list, data: topic_mess, success: function (result) { if (result.code == 0) { totalPage = result.data.count % topic_mess.pageSize == 0 ? (result.data.count / topic_mess.pageSize) : (Math.ceil(result.data.count / topic_mess.pageSize)); totalRecords = result.data.count; $('.wenz_list .tioashu').html(result.data.count); $('.wenz_list>h4').html(result.data.topicInfo.title); if (result.data.topicInfo.intro != '') { $('.wenz_list>h4').after('

    ' + result.data.topicInfo.intro + '

    '); } // 古籍按钮 if (t_ID == '368') { $('.wenz_list>h4').append('Ancient Medical Books') } var arr = result.data.articleList; initArticle(arr) //生成分页 //有些参数是可选的,比如lang,若不传有默认值 kkpager.generPageHtml({ pno: pageNo, //总页码 total: totalPage, //总数据条数 totalRecords: totalRecords, mode: 'click',//默认值是link,可选link或者click click: function (n) { this.selectPage(n); //除了第一页写逻辑跳转 topic_mess.pageIndex = n; $.ajax({ type: 'post', url: apiUrl + urlList.list, data: topic_mess, success: function (result) { if (result.code == 0) { $('.goup-container').click(); totalRecords = result.data.count; $('.wenz_list .tioashu').html(result.data.count); $('.wenz_list>h4').html(result.data.topicInfo.title); initArticle(result.data.articleList) } else { ShowDanger("请求失败!"); } }, error: function () { ShowDanger("error!"); } }) return false; }, lang: Jour_num == '22' ? { firstPageText: '首页', firstPageTipText: '首页', lastPageText: '尾页', lastPageTipText: '尾页', prePageText: '上一页', prePageTipText: '上一页', nextPageText: '下一页', nextPageTipText: '下一页', totalPageBeforeText: ' 共 ', totalPageAfterText: ' 页', currPageBeforeText: '当前第 ', currPageAfterText: ' 页', totalInfoSplitStr: ' ', totalRecordsBeforeText: '', totalRecordsAfterText: '', gopageBeforeText: '   Go to page', gopageButtonOkText: 'Go', gopageAfterText: 'page', buttonTipBeforeText: '第', buttonTipAfterText: '页' } : { firstPageText: 'First page', firstPageTipText: 'First page', lastPageText: 'Last page', lastPageTipText: 'Last page', prePageText: 'Previous page', prePageTipText: 'Previous page', nextPageText: 'Next page', nextPageTipText: 'Next page', totalPageBeforeText: '', totalPageAfterText: '', currPageBeforeText: 'on page ', currPageAfterText: '', totalInfoSplitStr: ' of ', totalRecordsBeforeText: '', totalRecordsAfterText: '', gopageBeforeText: '   Go to page', gopageButtonOkText: 'Go', gopageAfterText: 'page', buttonTipBeforeText: '第', buttonTipAfterText: '页' } }); } else { ShowDanger("请求失败!"); } }, error: function () { ShowDanger("error!"); } }) function initArticle(arr) { var str = ""; for (var i = 0; i < arr.length; i++) { if ((Math.round(Date.parse(new Date()) / 1000) - arr[i].ctime) / 86400 >= 21) { var tong_geogle = ' ' + 'Google Scholar' //搜索引用次数 } else { var tong_geogle = '' //少于21天隐藏 } if (arr[i].icon == '') { var img_i = 'img/baiss.png' } else { var img_i = imgarticleUrl + arr[i].icon } var baseInfo = commonGetItemHtml({ data: arr[i], i: i, img_i: img_i, c_t_a: 'different', tong_geogle: tong_geogle }) str += `
  • ${arr[i].type}${baseInfo.pub_date}
    ${baseInfo.lr_top}
    ${baseInfo.otStat}${arr[i].title}
    ${arr[i].authortitle}
    ${localStorage.getItem("Journals_title")} . ${arr[i].stage_year}, ${arr[i].stage_vol}${baseInfo.stage_}${baseInfo.npp_}${baseInfo.doi_}
    ${img_i}${baseInfo.trad_tion}
  • ` } $('.wenz_list>ul').html(str); $('.links_ .txt_copy').css('background', localStorage.Journals_color); commonHandleClickHtml() } } }