-
${arr[i].tradition_tag}: ${traditionText}
+ trad_tion = `
+
${arr[i].tradition_tag}:
${traditionText}
`;
- setTimeout(() => {
- let traditionElement = document.querySelector('.tradition-text:last-of-type');
- if (traditionElement.scrollHeight > maxTradHeight) {
- let words = traditionText.split(" ");
- let truncatedText = "";
-
- for (let j = 0; j < words.length; j++) {
- truncatedText += words[j] + " ";
- traditionElement.innerText = truncatedText + "...";
- if (traditionElement.scrollHeight > maxTradHeight) {
- truncatedText = truncatedText.trim().split(" ").slice(0, -1).join(" ");
- traditionElement.innerText = truncatedText + " ...";
- break;
- }
- }
- }
- }, 100); // 确保 DOM 渲染完成
- }
- } else {
- if (arr[i].tradition_tag == '' || arr[i].tradition_tag == null) {
- var textContent = arr[i].abstract;
- } else {
- var textContent = '
' + arr[i].tradition_tag + ': ' + arr[i].tradition;
- }
-
-
-
- trad_tion = `
`;
+ setTimeout(() => {
+ let traditionElement = document.querySelector(
+ ".tradition-text:last-of-type"
+ );
+ if (traditionElement.scrollHeight > maxTradHeight) {
+ let words = traditionText.split(" ");
+ let truncatedText = "";
+ for (let j = 0; j < words.length; j++) {
+ truncatedText += words[j] + " ";
+ traditionElement.innerText = truncatedText + "...";
+ if (traditionElement.scrollHeight > maxTradHeight) {
+ truncatedText = truncatedText
+ .trim()
+ .split(" ")
+ .slice(0, -1)
+ .join(" ");
+ traditionElement.innerText = truncatedText + " ...";
+ break;
}
- {/*
*/ }
- str += `
+ }
+ }
+ }, 100); // 确保 DOM 渲染完成
+ }
+ } else {
+ if (arr[i].tradition_tag == "" || arr[i].tradition_tag == null) {
+ var textContent = arr[i].abstract;
+ } else {
+ var textContent =
+ '' +
+ arr[i].tradition_tag +
+ ": " +
+ arr[i].tradition;
+ }
+
+ trad_tion = ``;
+ }
+ {
+ /*
*/
+ }
+ str += `
- `
-
- }
-
-
- $('.current_list .current_issue_time').css({
- 'color': "#888",
- 'font-weight': '500',
- });
-
- $('.current_list h4').css({
- 'border-top': "none",
- 'margin-top': "0",
- });
- $('.current_list .current_issue_time').html(time_);
- $('.current_list>ul').html(str);
- $('.links_ .txt_copy').css('background', localStorage.Journals_color);
- $('.url_top a').css('margin-right', '0');
- $(".current_list ul>li .apwrap>div>div>p").each(function () {
- var maxwidth = 335;//显示多少字符
- if ($(this).text().length > maxwidth) {
- $(this).text($(this).text().substring(0, maxwidth));
- $(this).text($(this).text().substring(0, maxwidth - $(this).text().split(" ").pop().length));
- $(this).html($(this).html() + '...');
- }
- });
- $(".current_list ul li.pai_two .apwrap>div>div>p").each(function () {
- var maxwidth = 140;//显示多少字符
- if ($(this).text().length > maxwidth) {
- $(this).text($(this).text().substring(0, maxwidth));
- $(this).text($(this).text().substring(0, maxwidth - $(this).text().split(" ").pop().length));
- $(this).html($(this).html() + '...');
- }
- });
-
- // 点击read more效果
- // $('.current_list li .apwrap>div>b').click(function () {
- // if($(this).html()=='read more
'){
- // $(this).siblings('div').css('display', 'block');
- // $(this).html('read more
');
- // }else{
- // $(this).siblings('div').css('display', '-webkit-box');
- // $(this).html('read more
')
- // }
- // })
-
-
- // 点击Abstract显示隐藏
- $('.current_list .txt_zhaiyao').click(function () {
- $(this).nextAll('div').toggle();
-
- const $parentGroup = $(this).closest('.article_info_box');
-
- // 2. 在当前父级内查找tradition-box并切换显示状态
- $parentGroup.find('.tradition-box').toggle();
- if ($(this).nextAll('div').css("display") == 'block') {
- var num = $(this).next().html();
- $.ajax({
- type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
- data: { "article_id": $(this).attr('alt'), "type": 'abs' },
- success: function (result) {
- if (result.code == 0) {
- num = num * 1 + 1 * 1
- }
- }
- })
- $.ajax({
- type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
- data: { 'type': Jour_num, 'is_detail': '1' },
- success: function (result) {
- }
- });
- $(this).next().html(num);
- }
- })
- $('.current_list .txt_html').click(function () {
- var num = $(this).next().html();
- $.ajax({
- type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
- data: { "article_id": $(this).attr('alt'), "type": 'html' },
- success: function (result) {
- if (result.code == 0) {
- num = num * 1 + 1 * 1
- }
- }
- })
- $.ajax({
- type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
- data: { 'type': Jour_num, 'is_detail': '1' },
- success: function (result) {
- }
- });
- $(this).next().html(num);
- })
- $('.current_list .txt_pdf').click(function () {
- var num = $(this).next().html();
- $.ajax({
- type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
- data: { "article_id": $(this).attr('alt'), "type": 'pdf' },
- success: function (result) {
- if (result.code == 0) {
- num = num * 1 + 1 * 1
- }
- }
- })
- $.ajax({
- type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
- data: { 'type': Jour_num, 'is_detail': '1' },
- success: function (result) {
- }
- });
- $(this).next().html(num);
- })
- $('.current_list .export_cite').css('display', 'none');
- $(document).click(function (e) {
- if (!$(e.target).is('.export_cite') && !$(e.target).is('.cite_box')) {
- $('.export_cite').hide();
- }
- })
- $('.current_list .cite_box').click(function () {
- $('.export_cite').css('display', 'none');
- getCiteList($(this).attr('article_id'))
- $(this).find('.export_cite').fadeIn(200);
- })
- $('.export_cite').click(function (e) { e.stopPropagation() })
-
- // 点击弹窗出现 复制和下载
- $('.current_list .txt_content').css('display', 'none');
- $('.current_list .export').css('display', 'none');
- $(document).click(function (e) {
- if (!$(e.target).is('.export') && !$(e.target).is('.txt_copy')) {
- $('.export').hide();
- }
- })
- $('.current_list .txt_copy').click(function () {
- $('.export').css('display', 'none');
- $(this).find('.export').fadeIn(200);
- })
- $('.current_list .Exc_1').click(function () {
- var content_ = $(this).parents('.txt_copy').nextAll('.txt_content').text();
- var clipboard = new Clipboard('#' + $(this).attr('id'), {
- text: function () {
- return content_;
- }
- })
- clipboard.on('success', function (e) {
- ShowSuccess("Citation information has been copied!");
- });
- })
- $('.current_list .Exc_2').click(function () {
- var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id')
- $.ajax({
- type: 'post', url: apiUrl + 'api/Article/getArticleenw', async: false,
- data: { "article_id": ecx_id },
- success: function (result) {
- var a = document.createElement('a');
- a.href = result.data.url;
- a.download = ''
- a.click();
- }
- })
- })
- $('.current_list .Exc_3').click(function () {
- var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id')
- $.ajax({
- type: 'post', url: apiUrl + 'api/Article/getArticleRis', async: false,
- data: { "article_id": ecx_id },
- success: function (result) {
- var a = document.createElement('a');
- a.href = result.data.url;
- a.download = ''
- a.click();
- }
- })
- })
- $('.current_list .Exc_4').click(function () {
- var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id')
- $.ajax({
- type: 'post', url: apiUrl + 'api/Article/getArticlebib', async: false,
- data: { "article_id": ecx_id },
- success: function (result) {
- var a = document.createElement('a');
- a.href = result.data.url;
- a.download = ''
- a.click();
- }
- })
- })
-
- $('.current_list .Exc_5').click(function () {
- var ecx_id = $(this).parents('.links_').siblings('.txt_biaoti').attr('id')
- $.ajax({
- type: 'post', url: apiUrl + 'api/Article/getArticletext', async: false,
- data: { "article_id": ecx_id },
- success: function (result) {
- var a = document.createElement('a');
- a.href = result.data.url;
- a.download = ''
- a.click();
- }
- })
- })
-
-
- // 订阅期刊
- $('.top .top_sea .b_Sub').css('color', localStorage.Journals_color)
- $('.top .top_sea .search_for select').css('border-color', localStorage.Journals_color)
-
- $('.top .dingyue input.yue_add').css('background-color', localStorage.Journals_color);
- $('.top .dingyue p b').html(localStorage.Journals_title);
- $('.top .jour_ts input.tishi_author').css('background-color', localStorage.Journals_color);
- // 添加订阅按钮点击弹出
- // $('.top .top_sea .b_Sub').click(function () {
- // $("#mask").css("height",$(document).height());
- // $("#mask").css("width",$(document).width());
- // $("#mask").show();
- // $(".dingyue").fadeIn();
- // document.body.addEventListener('touchmove',bodyScroll,false);
- // $('body').css({'position':'fixed',"width":"100%"});
- // })
- $(".top .dingyue .mb_close").click(function () {
- $("#mask").hide();
- $(".dingyue").fadeOut();
- document.body.removeEventListener('touchmove', bodyScroll, false);
- $("body").css({ "position": "initial", "height": "auto" });
- });
- $(".top .dingyue input.yue_close").click(function () {
- $("#mask").hide();
- $(".dingyue").fadeOut();
- document.body.removeEventListener('touchmove', bodyScroll, false);
- $("body").css({ "position": "initial", "height": "auto" });
- });
- $(".top .jour_ts input.tishi_author").click(function () {
- $("#mask").hide();
- $(".jour_ts").fadeOut();
- document.body.removeEventListener('touchmove', bodyScroll, false);
- $("body").css({ "position": "initial", "height": "auto" });
- });
-
- function bodyScroll(event) {
- event.preventDefault();
- }
-
- // 订阅提交
- $(".yue_add").click(function () {
- $(".spa").text('');
- var add_mess = {};
- add_mess.journal_id = localStorage.Journals_num;
- add_mess.email = $('#emapl').val();
-
- var S_Dan = '0';
- var reg = /^[-.-_A-Za-z0-9]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/
- if ($("#emapl").val() == "") {
- $(".spa1").text('Please fill in E-mail');
- S_Dan = '1';
- } else if (!(reg.test($("#emapl").val()))) {
- $(".spa1").text('Please fill in properly formatted E-mail');
- S_Dan = '1';
- }
-
-
- if (S_Dan == '1') {
- ShowDanger("Incomplete information!");
- } else {
- $(".yue_add").addClass("disable");
- $.ajax({
- type: 'post', url: apiUrl + 'subscribe/Journal/addSubscribeJournal',
- data: add_mess,
- success: function (result) {
- if (result.code == 0) {
- $(".dingyue").fadeOut();
- $(".dingyue input[type='text']").val('');
- $(".yue_add").removeClass("disable");
- $(".jour_ts").fadeIn();
- } else {
- ShowDanger(result.msg);
- $(".yue_add").removeClass("disable");
- }
- },
- error: function () {
- ShowDanger("error!");
- $(".yue_add").removeClass("disable");
- }
- })
- }
- })
-
- } else {
- // ShowDanger("请求失败!");
- }
- },
- error: function () {
- ShowDanger("error!");
+ `;
}
- })
- // 增加访问次数
- $.ajax({
- type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
- data: { 'type': Jour_num },
- success: function (result) {
- if (result.code == 0) {
+ $(".current_list .current_issue_time").css({
+ color: "#888",
+ "font-weight": "500",
+ });
- } else {
- // ShowDanger("请求失败!");
- }
- },
- error: function () {
- // ShowDanger("error!");
+ $(".current_list h4").css({
+ "border-top": "none",
+ "margin-top": "0",
+ });
+ $(".current_list .current_issue_time").html(time_);
+ $(".current_list>ul").html(str);
+ $(".links_ .txt_copy").css("background", localStorage.Journals_color);
+ $(".url_top a").css("margin-right", "0");
+ $(".current_list ul>li .apwrap>div>div>p").each(function () {
+ var maxwidth = 335; //显示多少字符
+ if ($(this).text().length > maxwidth) {
+ $(this).text($(this).text().substring(0, maxwidth));
+ $(this).text(
+ $(this)
+ .text()
+ .substring(0, maxwidth - $(this).text().split(" ").pop().length)
+ );
+ $(this).html($(this).html() + "...");
+ }
+ });
+ $(".current_list ul li.pai_two .apwrap>div>div>p").each(function () {
+ var maxwidth = 140; //显示多少字符
+ if ($(this).text().length > maxwidth) {
+ $(this).text($(this).text().substring(0, maxwidth));
+ $(this).text(
+ $(this)
+ .text()
+ .substring(0, maxwidth - $(this).text().split(" ").pop().length)
+ );
+ $(this).html($(this).html() + "...");
+ }
+ });
+
+ // 点击read more效果
+ // $('.current_list li .apwrap>div>b').click(function () {
+ // if($(this).html()=='read more
'){
+ // $(this).siblings('div').css('display', 'block');
+ // $(this).html('read more
');
+ // }else{
+ // $(this).siblings('div').css('display', '-webkit-box');
+ // $(this).html('read more
')
+ // }
+ // })
+
+ // 点击Abstract显示隐藏
+ $(".current_list .txt_zhaiyao").click(function () {
+ $(this).nextAll("div").toggle();
+
+ const $parentGroup = $(this).closest(".article_info_box");
+
+ // 2. 在当前父级内查找tradition-box并切换显示状态
+ $parentGroup.find(".tradition-box").toggle();
+ if ($(this).nextAll("div").css("display") == "block") {
+ var num = $(this).next().html();
+ $.ajax({
+ type: "post",
+ url: apiUrl + "yuan/Article/addArticleNum",
+ async: false,
+ data: { article_id: $(this).attr("alt"), type: "abs" },
+ success: function (result) {
+ if (result.code == 0) {
+ num = num * 1 + 1 * 1;
+ }
+ },
+ });
+ $.ajax({
+ type: "post",
+ url: apiUrl + "super/Publish/addVisitNum",
+ data: { type: Jour_num, is_detail: "1" },
+ success: function (result) {},
+ });
+ $(this).next().html(num);
+ }
+ });
+ $(".current_list .txt_html").click(function () {
+ var num = $(this).next().html();
+ $.ajax({
+ type: "post",
+ url: apiUrl + "yuan/Article/addArticleNum",
+ async: false,
+ data: { article_id: $(this).attr("alt"), type: "html" },
+ success: function (result) {
+ if (result.code == 0) {
+ num = num * 1 + 1 * 1;
+ }
+ },
+ });
+ $.ajax({
+ type: "post",
+ url: apiUrl + "super/Publish/addVisitNum",
+ data: { type: Jour_num, is_detail: "1" },
+ success: function (result) {},
+ });
+ $(this).next().html(num);
+ });
+ $(".current_list .txt_pdf").click(function () {
+ var num = $(this).next().html();
+ $.ajax({
+ type: "post",
+ url: apiUrl + "yuan/Article/addArticleNum",
+ async: false,
+ data: { article_id: $(this).attr("alt"), type: "pdf" },
+ success: function (result) {
+ if (result.code == 0) {
+ num = num * 1 + 1 * 1;
+ }
+ },
+ });
+ $.ajax({
+ type: "post",
+ url: apiUrl + "super/Publish/addVisitNum",
+ data: { type: Jour_num, is_detail: "1" },
+ success: function (result) {},
+ });
+ $(this).next().html(num);
+ });
+ $(".current_list .export_cite").css("display", "none");
+ $(document).click(function (e) {
+ if (!$(e.target).is(".export_cite") && !$(e.target).is(".cite_box")) {
+ $(".export_cite").hide();
+ }
+ });
+ $(".current_list .cite_box").click(function () {
+ $(".export_cite").css("display", "none");
+ getCiteList($(this).attr("article_id"));
+ $(this).find(".export_cite").fadeIn(200);
+ });
+ $(".export_cite").click(function (e) {
+ e.stopPropagation();
+ });
+
+ // 点击弹窗出现 复制和下载
+ $(".current_list .txt_content").css("display", "none");
+ $(".current_list .export").css("display", "none");
+ $(document).click(function (e) {
+ if (!$(e.target).is(".export") && !$(e.target).is(".txt_copy")) {
+ $(".export").hide();
+ }
+ });
+ $(".current_list .txt_copy").click(function () {
+ $(".export").css("display", "none");
+ $(this).find(".export").fadeIn(200);
+ });
+ $(".current_list .Exc_1").click(function () {
+ var content_ = $(this)
+ .parents(".txt_copy")
+ .nextAll(".txt_content")
+ .text();
+ var clipboard = new Clipboard("#" + $(this).attr("id"), {
+ text: function () {
+ return content_;
+ },
+ });
+ clipboard.on("success", function (e) {
+ ShowSuccess("Citation information has been copied!");
+ });
+ });
+ $(".current_list .Exc_2").click(function () {
+ var ecx_id = $(this)
+ .parents(".links_")
+ .siblings(".txt_biaoti")
+ .attr("id");
+ $.ajax({
+ type: "post",
+ url: apiUrl + "api/Article/getArticleenw",
+ async: false,
+ data: { article_id: ecx_id },
+ success: function (result) {
+ var a = document.createElement("a");
+ a.href = result.data.url;
+ a.download = "";
+ a.click();
+ },
+ });
+ });
+ $(".current_list .Exc_3").click(function () {
+ var ecx_id = $(this)
+ .parents(".links_")
+ .siblings(".txt_biaoti")
+ .attr("id");
+ $.ajax({
+ type: "post",
+ url: apiUrl + "api/Article/getArticleRis",
+ async: false,
+ data: { article_id: ecx_id },
+ success: function (result) {
+ var a = document.createElement("a");
+ a.href = result.data.url;
+ a.download = "";
+ a.click();
+ },
+ });
+ });
+ $(".current_list .Exc_4").click(function () {
+ var ecx_id = $(this)
+ .parents(".links_")
+ .siblings(".txt_biaoti")
+ .attr("id");
+ $.ajax({
+ type: "post",
+ url: apiUrl + "api/Article/getArticlebib",
+ async: false,
+ data: { article_id: ecx_id },
+ success: function (result) {
+ var a = document.createElement("a");
+ a.href = result.data.url;
+ a.download = "";
+ a.click();
+ },
+ });
+ });
+
+ $(".current_list .Exc_5").click(function () {
+ var ecx_id = $(this)
+ .parents(".links_")
+ .siblings(".txt_biaoti")
+ .attr("id");
+ $.ajax({
+ type: "post",
+ url: apiUrl + "api/Article/getArticletext",
+ async: false,
+ data: { article_id: ecx_id },
+ success: function (result) {
+ var a = document.createElement("a");
+ a.href = result.data.url;
+ a.download = "";
+ a.click();
+ },
+ });
+ });
+
+ // 订阅期刊
+ $(".top .top_sea .b_Sub").css("color", localStorage.Journals_color);
+ $(".top .top_sea .search_for select").css(
+ "border-color",
+ localStorage.Journals_color
+ );
+
+ $(".top .dingyue input.yue_add").css(
+ "background-color",
+ localStorage.Journals_color
+ );
+ $(".top .dingyue p b").html(localStorage.Journals_title);
+ $(".top .jour_ts input.tishi_author").css(
+ "background-color",
+ localStorage.Journals_color
+ );
+ // 添加订阅按钮点击弹出
+ // $('.top .top_sea .b_Sub').click(function () {
+ // $("#mask").css("height",$(document).height());
+ // $("#mask").css("width",$(document).width());
+ // $("#mask").show();
+ // $(".dingyue").fadeIn();
+ // document.body.addEventListener('touchmove',bodyScroll,false);
+ // $('body').css({'position':'fixed',"width":"100%"});
+ // })
+ $(".top .dingyue .mb_close").click(function () {
+ $("#mask").hide();
+ $(".dingyue").fadeOut();
+ document.body.removeEventListener("touchmove", bodyScroll, false);
+ $("body").css({ position: "initial", height: "auto" });
+ });
+ $(".top .dingyue input.yue_close").click(function () {
+ $("#mask").hide();
+ $(".dingyue").fadeOut();
+ document.body.removeEventListener("touchmove", bodyScroll, false);
+ $("body").css({ position: "initial", height: "auto" });
+ });
+ $(".top .jour_ts input.tishi_author").click(function () {
+ $("#mask").hide();
+ $(".jour_ts").fadeOut();
+ document.body.removeEventListener("touchmove", bodyScroll, false);
+ $("body").css({ position: "initial", height: "auto" });
+ });
+
+ function bodyScroll(event) {
+ event.preventDefault();
}
- });
- // 上侧话题列表数据
- $.ajax({
- type: 'post', url: apiUrl + 'api/Journal/getJournalTopic',
- data: {
- "journal_id": Jour_num
- },
- success: function (result) {
- Jour_num = localStorage.Journals_num;
- if (result.code == 0) {
- // 话题列表
- var arr_topic = result.data.topicList;
- var wh_topicd = '';
- var wh_number = 0;
- var panduan = '';
- var st_left_tit = "";
- var st_left_con = "";
- for (var i = 0; i < arr_topic.length; i++) {
- if (arr_topic[i].position == "top") {
- wh_number += 1;
- wh_topicd = 'top'
- var st_top_tit = "";
- var st_top_con = "";
- // 10
- if (Jour_num == 1) {
- var forLength = arr_topic[i].title == "Diseases" ? arr_topic[i].children.length : 5
-
- } else {
- var forLength = 5
- }
- if (wh_number == '1') {
- if (arr_topic[i].children) {
- for (var j = 0; j < arr_topic[i].children.length; j++) {
-
- if (j == forLength) break;
- var url_href = '';
- if (arr_topic[i].children[j].is_final == '1') {
- url_href = 'topic_list.html?J_num=' + Jour_num + '&t_id='
- } else (
- url_href = 'topic.html?J_num=' + Jour_num + '&t_id='
- )
- st_top_con += '
' +
- '
' +
- '' + arr_topic[i].children[j].title + '
'
- }
- }
-
- } else {
- if (arr_topic[i].children) {
- for (var j = 0; j < arr_topic[i].children.length; j++) {
- if (Jour_num == 1) {
- if (j == forLength) break;
- } else {
- if (j == forLength - 1) break;
- }
-
- var url_href = '';
- if (arr_topic[i].children[j].is_final == '1') {
- url_href = 'topic_list.html?J_num=' + Jour_num + '&t_id='
- } else (
- url_href = 'topic.html?J_num=' + Jour_num + '&t_id='
- )
- st_top_con += '
' +
- '
' +
- '' + arr_topic[i].children[j].title + '
'
- }
- }
-
- }
- // '
More' +
- if (Jour_num == 1) {
- if (arr_topic[i].title == "Diseases") {
- st_top_tit = '
' + arr_topic[i].title + '
' +
-
- '
' +
- '
'
- } else {
- //
- st_top_tit = '
' + arr_topic[i].title + '
' +
- '
' +
- '
'
- }
- } else {
- st_top_tit = '
' + arr_topic[i].title + '
' +
- '
' +
- '
'
-
- }
-
- if (wh_number == '1') {
- $('.art_top_topic>div>div.topics').html('
');
- } else {
- $('.tmr_article>.bng_topic_bei>.art_main_con_topic>div').append(st_top_tit);
- }
- var MDM_mark = 0
- var MDM_str = ''
- // MDM 十个话题 // LF 十个话题 // BEC 十个话题 // cancer 十个话题
- if ([2, 25, 11, 14].includes(Number(Jour_num))) {
-
- if (arr_topic[i].children) {
- for (var j = 0; j < arr_topic[i].children.length; j++) {
- if (MDM_mark == 10) break;
- MDM_mark = MDM_mark + 1
- var url_href = '';
- if (arr_topic[i].children[j].is_final == '1') {
- url_href = 'topic_list.html?J_num=' + Jour_num + '&t_id='
- } else (
- url_href = 'topic.html?J_num=' + Jour_num + '&t_id='
- )
- MDM_str += '
' +
- '
' +
- '' + arr_topic[i].children[j].title + '
'
- }
- }
-
- $('.art_top_topic>div>div.topics').html('
');
- }
- } else if (arr_topic[i].position == "left" && arr_topic[i].title == "Diseases" && Jour_num == 1) {
- if (panduan != '1') {
- panduan = '1';
- if (arr_topic[i].children) {
- for (var j = 0; j < arr_topic[i].children.length; j++) {
- if (j == 5) break;
- var url_href = '';
- if (arr_topic[i].children[j].is_final == '1') {
- url_href = 'topic_list.html?J_num=' + Jour_num + '&t_id='
- } else (
- url_href = 'topic.html?J_num=' + Jour_num + '&t_id='
- )
- st_left_con += '
' +
- '
' +
- ''
-
- }
- }
-
-
- st_left_tit = '
' + arr_topic[i].title + '
' +
- '
More'
-
- }
-
- $('.tmr_article>.bng_topic_bei>.art_main_con_topic>div').append(st_left_tit);
-
- }
+ // 订阅提交
+ $(".yue_add").click(function () {
+ $(".spa").text("");
+ var add_mess = {};
+ add_mess.journal_id = localStorage.Journals_num;
+ add_mess.email = $("#emapl").val();
+ var S_Dan = "0";
+ var reg = /^[-.-_A-Za-z0-9]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
+ if ($("#emapl").val() == "") {
+ $(".spa1").text("Please fill in E-mail");
+ S_Dan = "1";
+ } else if (!reg.test($("#emapl").val())) {
+ $(".spa1").text("Please fill in properly formatted E-mail");
+ S_Dan = "1";
+ }
+ if (S_Dan == "1") {
+ ShowDanger("Incomplete information!");
+ } else {
+ $(".yue_add").addClass("disable");
+ $.ajax({
+ type: "post",
+ url: apiUrl + "subscribe/Journal/addSubscribeJournal",
+ data: add_mess,
+ success: function (result) {
+ if (result.code == 0) {
+ $(".dingyue").fadeOut();
+ $(".dingyue input[type='text']").val("");
+ $(".yue_add").removeClass("disable");
+ $(".jour_ts").fadeIn();
+ } else {
+ ShowDanger(result.msg);
+ $(".yue_add").removeClass("disable");
}
+ },
+ error: function () {
+ ShowDanger("error!");
+ $(".yue_add").removeClass("disable");
+ },
+ });
+ }
+ });
+ } else {
+ // ShowDanger("请求失败!");
+ }
+ },
+ error: function () {
+ ShowDanger("error!");
+ },
+ });
+ // 增加访问次数
+ $.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!");
+ },
+ });
- $('.tmr_article>.bng_topic_bei>.art_main_con_topic>div h4').css('color', localStorage.Journals_color);
-
- $('.tmr_article>.bng_topic_bei>.art_main_con_topic>div').children().eq(1).addClass('top_ics');
-
- if (wh_number == '1') {
- $('.art_main_con_topic').css('border-bottom', '0');
- $('.wh_topicd').css('display', 'none')
- }
- if (Jour_num == '1') {
- $('.art_top_topic').addClass('art_top_topic_tmr')
- }
-
- if (wh_topicd == '') {
- $('.art_main_con_topic').css('display', 'none')
- $('.wh_topicd').css('display', 'none')
- }
-
- if (localStorage.Journals_title == '经典中医研究') {
- $('.more').html('更多');
- }
- if (Jour_num != 1) {
- $('.bng_topic_bei').css({
- 'display': 'none'
- })
- $('.topics_box').css({
- 'background-color': 'transparent'
- })
- $('.topics_box .topics').css({
- 'background-color': 'transparent',
- 'margin-top': '-15px',
- })
- }
-
+ // 上侧话题列表数据
+ $.ajax({
+ type: "post",
+ url: apiUrl + "api/Journal/getJournalTopic",
+ data: {
+ journal_id: Jour_num,
+ },
+ success: function (result) {
+ Jour_num = localStorage.Journals_num;
+ if (result.code == 0) {
+ // 话题列表
+ var arr_topic = result.data.topicList;
+ var wh_topicd = "";
+ var wh_number = 0;
+ var panduan = "";
+ var st_left_tit = "";
+ var st_left_con = "";
+ for (var i = 0; i < arr_topic.length; i++) {
+ if (arr_topic[i].position == "top") {
+ wh_number += 1;
+ wh_topicd = "top";
+ var st_top_tit = "";
+ var st_top_con = "";
+ // 10
+ if (Jour_num == 1) {
+ var forLength =
+ arr_topic[i].title == "Diseases"
+ ? arr_topic[i].children.length
+ : 5;
} else {
- // ShowDanger("请求失败!");
+ var forLength = 5;
}
- },
- error: function () {
- ShowDanger("error!");
+ if (wh_number == "1") {
+ if (arr_topic[i].children) {
+ for (var j = 0; j < arr_topic[i].children.length; j++) {
+ if (j == forLength) break;
+ var url_href = "";
+ if (arr_topic[i].children[j].is_final == "1") {
+ url_href = "topic_list.html?J_num=" + Jour_num + "&t_id=";
+ } else url_href = "topic.html?J_num=" + Jour_num + "&t_id=";
+ st_top_con +=
+ '
' +
+ '
' +
+ "" +
+ arr_topic[i].children[j].title +
+ "
";
+ }
+ }
+ } else {
+ if (arr_topic[i].children) {
+ for (var j = 0; j < arr_topic[i].children.length; j++) {
+ if (Jour_num == 1) {
+ if (j == forLength) break;
+ } else {
+ if (j == forLength - 1) break;
+ }
+
+ var url_href = "";
+ if (arr_topic[i].children[j].is_final == "1") {
+ url_href = "topic_list.html?J_num=" + Jour_num + "&t_id=";
+ } else url_href = "topic.html?J_num=" + Jour_num + "&t_id=";
+ st_top_con +=
+ '
' +
+ '
' +
+ "" +
+ arr_topic[i].children[j].title +
+ "
";
+ }
+ }
+ }
+ // '
More' +
+ if (Jour_num == 1) {
+ if (arr_topic[i].title == "Diseases") {
+ st_top_tit =
+ '
' +
+ arr_topic[i].title +
+ "
" +
+ "
" +
+ '
';
+ } else {
+ //
+ st_top_tit =
+ '
' +
+ arr_topic[i].title +
+ "
" +
+ "
" +
+ '
';
+ }
+ } else {
+ st_top_tit =
+ '
' +
+ arr_topic[i].title +
+ "
" +
+ "
" +
+ '
';
+ }
+
+ if (wh_number == "1") {
+ $(".art_top_topic>div>div.topics").html(
+ "
"
+ );
+ } else {
+ $(".tmr_article>.bng_topic_bei>.art_main_con_topic>div").append(
+ st_top_tit
+ );
+ }
+ var MDM_mark = 0;
+ var MDM_str = "";
+ // MDM 十个话题 // LF 十个话题 // BEC 十个话题 // cancer 十个话题
+ if ([2, 25, 11, 14].includes(Number(Jour_num))) {
+ if (arr_topic[i].children) {
+ for (var j = 0; j < arr_topic[i].children.length; j++) {
+ if (MDM_mark == 10) break;
+ MDM_mark = MDM_mark + 1;
+ var url_href = "";
+ if (arr_topic[i].children[j].is_final == "1") {
+ url_href = "topic_list.html?J_num=" + Jour_num + "&t_id=";
+ } else url_href = "topic.html?J_num=" + Jour_num + "&t_id=";
+ MDM_str +=
+ '
' +
+ '
' +
+ "" +
+ arr_topic[i].children[j].title +
+ "
";
+ }
+ }
+
+ $(".art_top_topic>div>div.topics").html(
+ "
"
+ );
+ }
+ } else if (
+ arr_topic[i].position == "left" &&
+ arr_topic[i].title == "Diseases" &&
+ Jour_num == 1
+ ) {
+ if (panduan != "1") {
+ panduan = "1";
+ if (arr_topic[i].children) {
+ for (var j = 0; j < arr_topic[i].children.length; j++) {
+ if (j == 5) break;
+ var url_href = "";
+ if (arr_topic[i].children[j].is_final == "1") {
+ url_href = "topic_list.html?J_num=" + Jour_num + "&t_id=";
+ } else url_href = "topic.html?J_num=" + Jour_num + "&t_id=";
+ st_left_con +=
+ '
' +
+ '
' +
+ '";
+ }
+ }
+
+ st_left_tit =
+ '
' +
+ arr_topic[i].title +
+ "
" +
+ '
More";
+ }
+
+ $(".tmr_article>.bng_topic_bei>.art_main_con_topic>div").append(
+ st_left_tit
+ );
+ }
}
- });
- // 左侧客座列表数据
- $.ajax({
- type: 'post', url: apiUrl + 'api/Special/getSpecialsNew',
- data: {
- "journal_id": Jour_num
- },
- success: function (result) {
- if (result.code == 0) {
- if (!result.data.is_show || result.data.is_show == "false") {
- $('.jour_base_info .jour_base_info_center .mes_all .mes_all_section .mes_all_section_Gue_special').each(function () {
- this.style.setProperty('display', 'none', 'important');
- });
- $('.jour_guest h4 a').css('display', 'none');
+ $(".tmr_article>.bng_topic_bei>.art_main_con_topic>div h4").css(
+ "color",
+ localStorage.Journals_color
+ );
- }
- var specialIssuesBox = document.querySelector('.Special_Issues_box');
- var ulElement = specialIssuesBox.querySelector('ul');
- var newDiv = document.createElement('div');
- newDiv.classList.add('Special_Issues_div_box'); // 可替换为你希望的类名
- newDiv.appendChild(ulElement);
- specialIssuesBox.appendChild(newDiv);
- if (result.data.count > 4) {
- $('.Special_Issues_box .more').css({
- 'display': 'block',
+ $(".tmr_article>.bng_topic_bei>.art_main_con_topic>div")
+ .children()
+ .eq(1)
+ .addClass("top_ics");
- })
- $('.Special_Issues_box .more').each(function () {
- $(this).attr('href', `/guest.html?J_num=${Jour_num}`);
- });
- // guest.html?J_num=1
- }
- // 客座列表
- var arr = result.data.specials;
- var str = '';
- for (var i = 0; i < arr.length && i < 4; i++) {
- if (new Date(arr[i].deadline).getTime() > new Date().getTime()) {
- var mark_k = 1
- } else {
- var mark_k = 0
- }
- if (arr[i].icon == '') {
- var img_i = ''
- } else {
- var img_i = '

'
- }
- str += `
+ if (wh_number == "1") {
+ $(".art_main_con_topic").css("border-bottom", "0");
+ $(".wh_topicd").css("display", "none");
+ }
+ if (Jour_num == "1") {
+ $(".art_top_topic").addClass("art_top_topic_tmr");
+ }
+
+ if (wh_topicd == "") {
+ $(".art_main_con_topic").css("display", "none");
+ $(".wh_topicd").css("display", "none");
+ }
+
+ if (localStorage.Journals_title == "经典中医研究") {
+ $(".more").html("更多");
+ }
+ if (Jour_num != 1) {
+ $(".bng_topic_bei").css({
+ display: "none",
+ });
+ $(".topics_box").css({
+ "background-color": "transparent",
+ });
+ $(".topics_box .topics").css({
+ "background-color": "transparent",
+ "margin-top": "-15px",
+ });
+ }
+ } else {
+ // ShowDanger("请求失败!");
+ }
+ },
+ error: function () {
+ ShowDanger("error!");
+ },
+ });
+
+ // 左侧客座列表数据
+ $.ajax({
+ type: "post",
+ url: apiUrl + "api/Special/getSpecialsNew",
+ data: {
+ journal_id: Jour_num,
+ },
+ success: function (result) {
+ if (result.code == 0) {
+ if (!result.data.is_show || result.data.is_show == "false") {
+ $(
+ ".jour_base_info .jour_base_info_center .mes_all .mes_all_section .mes_all_section_Gue_special"
+ ).each(function () {
+ this.style.setProperty("display", "none", "important");
+ });
+ $(".jour_guest h4 a").css("display", "none");
+ }
+ var specialIssuesBox = document.querySelector(".Special_Issues_box");
+ var ulElement = specialIssuesBox.querySelector("ul");
+ var newDiv = document.createElement("div");
+ newDiv.classList.add("Special_Issues_div_box"); // 可替换为你希望的类名
+ newDiv.appendChild(ulElement);
+ specialIssuesBox.appendChild(newDiv);
+ if (result.data.count > 4) {
+ $(".Special_Issues_box .more").css({
+ display: "block",
+ });
+ $(".Special_Issues_box .more").each(function () {
+ $(this).attr("href", `/guest.html?J_num=${Jour_num}`);
+ });
+ // guest.html?J_num=1
+ }
+ // 客座列表
+ var arr = result.data.specials;
+ var str = "";
+ for (var i = 0; i < arr.length && i < 4; i++) {
+ if (new Date(arr[i].deadline).getTime() > new Date().getTime()) {
+ var mark_k = 1;
+ } else {
+ var mark_k = 0;
+ }
+ if (arr[i].icon == "") {
+ var img_i = "";
+ } else {
+ var img_i =
+ '
';
+ }
+ str += `
-

- ${mark_k == 1 ? `
+ ${
+ mark_k == 1
+ ? `