tijiao
This commit is contained in:
@@ -7279,7 +7279,10 @@ function article_con() {
|
||||
var a_ID = getQueryString('a_id'); //文章
|
||||
var htm_ID = getQueryString('s_htm'); //目前显示html
|
||||
const isPre = getQueryString('preview');
|
||||
initArticleNavList(a_ID)
|
||||
if(!isPre){
|
||||
initArticleNavList(a_ID)
|
||||
}
|
||||
|
||||
// 增加访问次数
|
||||
|
||||
if (Jour_num == 1 || Jour_num == 11 || Jour_num == 25) {
|
||||
@@ -9414,7 +9417,10 @@ function initArticleNavList(a_ID) {
|
||||
</div>
|
||||
</div>`
|
||||
// 使用 insertAdjacentHTML 在 top_bar 后插入新元素
|
||||
topBar.insertAdjacentHTML('afterend', str);
|
||||
if(topBar){
|
||||
topBar.insertAdjacentHTML('afterend', str);
|
||||
}
|
||||
|
||||
|
||||
// JavaScript to handle dropdown toggle on button click
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ function commonGetItemHtml(doc) {
|
||||
WOS Citations ( <span style="color: red">${data.cite_num}</span> )
|
||||
<ul class="export_cite "> </ul>
|
||||
</span>`,
|
||||
abstract: data.abstract.replace(new RegExp("0, 102, 204", "g"), "0,102,153"),
|
||||
abstract: data.abstract?data.abstract.replace(new RegExp("0, 102, 204", "g"), "0,102,153"):'',
|
||||
link_: '',
|
||||
stage_: '',
|
||||
}
|
||||
@@ -114,13 +114,13 @@ function commonGetItemHtml(doc) {
|
||||
|
||||
if (data.tradition_tag == '' || data.tradition_tag == null) {
|
||||
var maxwidth = 500;//显示多少字符
|
||||
if (data.abstract.length > maxwidth) {
|
||||
if (data.abstract&&data.abstract.length > maxwidth) {
|
||||
var abstNew = data.abstract.replace(/<.*?>/ig, "")
|
||||
abstNew = abstNew.substring(0, maxwidth)
|
||||
abstNew = abstNew.substring(0, maxwidth - abstNew.split(" ").pop().length)
|
||||
baseInfo.trad_tion = '<div>' + abstNew + '...</div>'
|
||||
} else {
|
||||
baseInfo.trad_tion = '<div>' + data.abstract + '</div>'
|
||||
baseInfo.trad_tion = '<div>' + data.abstract?data.abstract:'' + '</div>'
|
||||
}
|
||||
} else {
|
||||
baseInfo.trad_tion = '<div><h3>' + data.tradition_tag + '</h3><p>' + data.tradition + '</p></div>'
|
||||
|
||||
@@ -33,7 +33,7 @@ function commonInit() {
|
||||
}
|
||||
function commonGetItemHtml(doc, maxwidth) {
|
||||
|
||||
var data = doc.data;var journal_id=doc.data.journal_id?doc.data.journal_id:Jour_num;
|
||||
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 img_i = doc.img_i;
|
||||
@@ -59,7 +59,7 @@ function commonGetItemHtml(doc, maxwidth) {
|
||||
WOS Citations ( <span style="color: red">${data.cite_num}</span> )
|
||||
<ul class="export_cite "> </ul>
|
||||
</span>`,
|
||||
abstract: data.abstract.replace(new RegExp("0, 102, 204", "g"), "0,102,153"),
|
||||
abstract: data.abstract ? data.abstract.replace(new RegExp("0, 102, 204", "g"), "0,102,153") : '',
|
||||
link_: '',
|
||||
stage_: '',
|
||||
}
|
||||
@@ -126,13 +126,13 @@ function commonGetItemHtml(doc, maxwidth) {
|
||||
|
||||
if (data.tradition_tag == '' || data.tradition_tag == null) {
|
||||
var maxwidth = maxwidth ? maxwidth : 800;//显示多少字符
|
||||
if (data.abstract.length > maxwidth) {
|
||||
if (data.abstract && data.abstract.length > maxwidth) {
|
||||
var abstNew = data.abstract.replace(/<.*?>/ig, "")
|
||||
abstNew = abstNew.substring(0, maxwidth)
|
||||
abstNew = abstNew.substring(0, maxwidth - abstNew.split(" ").pop().length)
|
||||
baseInfo.trad_tion = '<div>' + abstNew + '...</div>'
|
||||
} else {
|
||||
baseInfo.trad_tion = '<div>' + data.abstract + '</div>'
|
||||
baseInfo.trad_tion = '<div>' + data.abstract ? data.abstract : '' + '</div>'
|
||||
}
|
||||
} else {
|
||||
baseInfo.trad_tion = '<div><h3>' + data.tradition_tag + '</h3><p>' + data.tradition + '</p></div>'
|
||||
|
||||
Reference in New Issue
Block a user