提交tmr底部文章空白

This commit is contained in:
2025-04-01 09:49:06 +08:00
parent 9cba7f3a7c
commit c109771398
2 changed files with 19 additions and 14 deletions

View File

@@ -31,9 +31,10 @@ function commonInit() {
} }
function commonGetItemHtml(doc,maxwidth) { function commonGetItemHtml(doc, maxwidth) {
var data = doc.data; var data = doc.data;var journal_id=doc.data.journal_id?doc.data.journal_id:Jour_num;
console.log('journal_id at line 36:', journal_id)
var i = doc.i; var i = doc.i;
var img_i = doc.img_i; var img_i = doc.img_i;
var c_t_a = doc.c_t_a; var c_t_a = doc.c_t_a;
@@ -70,7 +71,7 @@ function commonGetItemHtml(doc,maxwidth) {
baseInfo.html_ = '<img src="img/link_2.png" width="14" height="16"><a href="' + imgFileUrl + 'articleHTML/' + data.file_html + '" target="_blank" class="txt_html" alt="' + data.article_id + '">HTML</a>&nbsp;(&nbsp;<span style="color: red">' + data.html_num + '</span>&nbsp;)&nbsp;&nbsp;' baseInfo.html_ = '<img src="img/link_2.png" width="14" height="16"><a href="' + imgFileUrl + 'articleHTML/' + data.file_html + '" target="_blank" class="txt_html" alt="' + data.article_id + '">HTML</a>&nbsp;(&nbsp;<span style="color: red">' + data.html_num + '</span>&nbsp;)&nbsp;&nbsp;'
} }
} else { } else {
baseInfo.html_ = '<img src="img/link_2.png" width="14" height="16"><a href="article.html?J_num=' + Jour_num + '&a_id=' + data.article_id + '&s_htm=1" target="_blank" class="txt_html" alt="' + data.article_id + '">HTML</a>&nbsp;(&nbsp;<span style="color: red">' +data.html_num + '</span>&nbsp;)&nbsp;&nbsp;' baseInfo.html_ = '<img src="img/link_2.png" width="14" height="16"><a href="article.html?J_num=' + journal_id + '&a_id=' + data.article_id + '&s_htm=1" target="_blank" class="txt_html" alt="' + data.article_id + '">HTML</a>&nbsp;(&nbsp;<span style="color: red">' + data.html_num + '</span>&nbsp;)&nbsp;&nbsp;'
} }
// if (data.mains == '') { // if (data.mains == '') {
// if (data.file_html == '') { // if (data.file_html == '') {
@@ -124,7 +125,7 @@ function commonGetItemHtml(doc,maxwidth) {
if (data.tradition_tag == '' || data.tradition_tag == null) { if (data.tradition_tag == '' || data.tradition_tag == null) {
var maxwidth = maxwidth?maxwidth:800;//显示多少字符 var maxwidth = maxwidth ? maxwidth : 800;//显示多少字符
if (data.abstract.length > maxwidth) { if (data.abstract.length > maxwidth) {
var abstNew = data.abstract.replace(/<.*?>/ig, "") var abstNew = data.abstract.replace(/<.*?>/ig, "")
abstNew = abstNew.substring(0, maxwidth) abstNew = abstNew.substring(0, maxwidth)

View File

@@ -39,7 +39,7 @@ function bf_list() {
wh_topicd = 'top' wh_topicd = 'top'
var st_top_tit = ""; var st_top_tit = "";
var st_top_con = ""; var st_top_con = "";
var forLength = arr_topic[i].title == "Diseases"?10:5 var forLength = arr_topic[i].title == "Diseases" ? 10 : 5
if (wh_number == '1') { if (wh_number == '1') {
for (var j = 0; j < arr_topic[i].children.length; j++) { for (var j = 0; j < arr_topic[i].children.length; j++) {
@@ -229,7 +229,7 @@ function bf_list() {
var mp4_ = '' var mp4_ = ''
} }
if (arr[i].icon == '') { if (arr[i].icon == '') {
var img_i = 'img/baiss.png' var img_i = ''
} else { } else {
var img_i = imgarticleUrl + arr[i].icon var img_i = imgarticleUrl + arr[i].icon
} }
@@ -247,8 +247,12 @@ function bf_list() {
var person_img1 = '<img src="' + img_i + '" alt="" style="width: 120px">' var person_img1 = '<img src="' + img_i + '" alt="" style="width: 120px">'
} else { } else {
var person_img = '<img src="' + img_i + '" alt="" style="height:300px;object-fit: cover;">' var person_img = '<img src="' + img_i + '" alt="" style="height:300px;object-fit: cover;">'
if (img_i && img_i != '') {
var person_img1 = '<div style="height: 240px;background-image: url(' + img_i + ');background-size:cover;background-position:top;background-repeat:no-repeat;"></div>'
var person_img1 = '<div style="height: 240px;background-image: url('+img_i+');background-size:cover;background-position:top;background-repeat:no-repeat;"></div>' } else {
var person_img1 = '<div style="height: auto;background-image: url(' + img_i + ');background-size:cover;background-position:top;background-repeat:no-repeat;"></div>'
}
} }