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