This commit is contained in:
2025-01-09 15:04:37 +08:00
parent f71db4c271
commit eebf4561c9
12 changed files with 1404 additions and 1084 deletions

View File

@@ -7092,7 +7092,7 @@ function getCitations(doi, a_ID) {
error: function (result) {
console.log('result at line 212:', result)
// var str = `<span class="__dimensions_badge_embed__" data-doi="${doi}" data-legend="always"></span>`
var str = `<div style="text-align:center;" class="quoteNumber"> 0</div>`
$('.DimensionsBadge .quote-content').html(str)
}
@@ -7115,7 +7115,7 @@ function getCitations(doi, a_ID) {
error: function (result) {
console.log('result at line 212:', result)
var str1 = ` <div style="text-align:center;" class="crossrefNumber quoteNumber"> 0</div>`
$('.SciteBadge .quote-content1').html(str1)
}
})
@@ -7230,6 +7230,13 @@ function article_con() {
},
success: function (result) {
if (result.code == 0) {
var html_type = result.data.articleInfo.html_type
var has_html = result.data.articleInfo.has_html
if(has_html==0){
$('.wen_rong #tablist .tarhtmn').css('display', 'none');
$('.wen_rong #tablist .tarfihml').css('display', 'none');
$('.wen_rong .content-box .conthtmn').css('display', 'none');
}
// 文章Cite this article
var j_artc = result.data.articleInfo
@@ -7254,51 +7261,51 @@ function article_con() {
}
$('.wen_jian .right>.links_').html(lnk_);
if(Jour_num!=13){
//获取文章引用
getCitations(j_artc.doi, a_ID);
// 点击增加数字
$('.txt_html').click(function () {
var num = $(this).next().html();
$.ajax({
type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
data: { "article_id": a_ID, "type": 'html' },
success: function (result) {
}
if (Jour_num != 13) {
//获取文章引用
getCitations(j_artc.doi, a_ID);
// 点击增加数字
$('.txt_html').click(function () {
var num = $(this).next().html();
$.ajax({
type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
data: { "article_id": a_ID, "type": 'html' },
success: function (result) {
}
})
$.ajax({
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
data: { 'type': Jour_num, 'is_detail': '1' },
success: function (result) {
}
});
$(this).next().html(num);
})
$.ajax({
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
data: { 'type': Jour_num, 'is_detail': '1' },
success: function (result) {
}
});
$(this).next().html(num);
})
$('.txt_pdf').click(function () {
var num = $(this).next().html();
$.ajax({
type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
data: { "article_id": a_ID, "type": 'pdf' },
success: function (result) {
}
$('.txt_pdf').click(function () {
var num = $(this).next().html();
$.ajax({
type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
data: { "article_id": a_ID, "type": 'pdf' },
success: function (result) {
}
})
$.ajax({
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
data: { 'type': Jour_num, 'is_detail': '1' },
success: function (result) {
}
});
$(this).next().html(num);
})
$.ajax({
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
data: { 'type': Jour_num, 'is_detail': '1' },
success: function (result) {
}
});
$(this).next().html(num);
})
}else{
$('.article-quote').css('display', 'none');
$('.mb_aform').css('display', 'none');
$('.pos_ter').css('display', 'none');
$('.footer').css('display', 'none');
$('.wen_rong .right').css('display', 'none');
$('.wenzhang .wen_rong .left').css('width', '100%');
}
} else {
$('.article-quote').css('display', 'none');
$('.mb_aform').css('display', 'none');
$('.pos_ter').css('display', 'none');
$('.footer').css('display', 'none');
$('.wen_rong .right').css('display', 'none');
$('.wenzhang .wen_rong .left').css('width', '100%');
}
var NotTeX_ = ''
@@ -7543,15 +7550,13 @@ if(Jour_num!=13){
$('.wen_rong .content-box .contemho').html(j_artc.mhoo);
// 新的HTML
if (result.data.html != 1) {
$('.wen_rong #tablist .tarhtmn').css('display', 'none');
$('.wen_rong .content-box .conthtmn').css('display', 'none');
} else {
if (html_type == 0) {
// 原 HTML
$('.wen_rong .content-box .conthtmn').html(`
<div class="" style="display: flex;align-items: center;justify-content: center;">
<div class="loader-01" style="display: flex;align-items: center;justify-content: space-around;"></div></div>`);
// $('.wen_rong #tablist .tarhtmn').click(function () {
<div class="" style="display: flex;align-items: center;justify-content: center;">
<div class="loader-01" style="display: flex;align-items: center;justify-content: space-around;"></div></div>`
);
$.ajax({
type: 'post', url: apiUrl + 'api/Article/getArticleDetailHtml',
data: {
@@ -7586,7 +7591,6 @@ if(Jour_num!=13){
}
}
$('.wen_rong .content-box .conthtmn').html(str);
// 引用
if (result.data.refers.length > 0) { // 如果有引用数据
var refs = ''
@@ -7616,12 +7620,6 @@ if(Jour_num!=13){
// console.log(refs)
$('.wen_rong .content-box .conthtmn').append('<div id="ArticleRef" class="ArticleRef"><p><b>References</b></p>' + refs + '</div>')
}
}
},
error: function () {
@@ -7629,11 +7627,136 @@ if(Jour_num!=13){
}
})
} else if (html_type == 1) {
//外链
$('.wen_rong #tablist .tarhtmn').css('display', 'none');
$('.wen_rong .content-box .conthtmn').css('display', 'none');
// })
} else if (html_type == 2) {
// 新 HTML
$('.wen_rong .content-box .conthtmn').html(`
<div class="" style="display: flex;align-items: center;justify-content: center;">
<div class="loader-01" style="display: flex;align-items: center;justify-content: space-around;"></div></div>`
);
$.ajax({
type: 'post', url: apiUrl + 'api/Article/getArticleDetailHtmlFor2',
data: {
"article_id": a_ID
},
success: function (result) {
if (result.code == 0) {
var arr = result.data.mains;
var str = '';
var htmlContent=''
htmlContent += arr.map((item) => {
//批注
let contentHtml = '';
// 判断是否是图片
if (item.type == 1) {
var picsrc = 'https://submission.tmrjournals.com/public/mainimg/' + item.image.url;
var fun = "picPreview('" + picsrc + "');"
// console.log(fun)
contentHtml = `
<p contenteditable="false" main-state="${item.state}" class="MaxPicture pMain" data-id="${
item.ami_id
}" main-id="${item.am_id}">
<img src="${picsrc}" onclick="${fun}" style="width: ${
item.width ? `${item.width}px` : '100%'
}" />
<font class="font" style="width: ${item.width ? `${item.width}px` : '100%'}" >${
item.image.note ? item.image.note : ''
}</font>
</p>
`;
} else if (item.type == 2) {
var tableList = JSON.parse(item.table.table_data);
contentHtml = `
<div contenteditable="false" data-id="${item.amt_id}" main-state="${item.state}" main-id="${
item.am_id
}" class="thumbnailTableBox wordTableHtml table_Box pMain" style="width: 100%; padding: 8px 15px; box-sizing: border-box; border-radius: 4px; position: relative;">
<font class="font tableTitle" style="width:100%" >${item.table.title ? item.table.title : ''}</font>
<table border="1" style="width: auto; border-collapse: collapse; text-align: center; ">
${tableList
.map((row) => {
return `
<tr>
${row
.map((cell) => {
return `
<td colspan="${cell.colspan || 1}" rowspan="${cell.rowspan || 1}">
<span>${cell.text || ''}</span>
</td>
`;
})
.join('')}
</tr>
`;
})
.join('')}
</table>
<font class="font" style="width:100%" >${item.table.note ? item.table.note : ''}</font>
</div>
`;
} else {
contentHtml = `<p class="pMain Ptitle" main-state="${item.state}" contenteditable="false" data-id="${item.am_id}" main-id="${item.am_id}"${item.content}</p>`;
}
// 判断是否是表格类型
return contentHtml;
}).join('');
$('.wen_rong .content-box .conthtmn').html(htmlContent);
// 引用
if (result.data.refers.length > 0) { // 如果有引用数据
var refs = ''
var xuhao = 0
for (var rr = 0; rr < result.data.refers.length; rr++) {
// 如果格式不正确,或者信息不全
let item = ''
if (result.data.refers[rr].refer_type == 'journal' && result.data.refers[rr].doilink != '') {
// journal
xuhao++
item = "<div><p>" + xuhao + '.&nbsp;' + result.data.refers[rr].author + '&nbsp;' + result.data.refers[rr].title + ".&nbsp;<i>" + result.data.refers[rr].joura + "</i>" + result.data.refers[rr].dateno + ".&nbsp; Available at:&nbsp;<a class='refsLink' href='" + result.data.refers[rr].doilink + "' target='_blank' style='color:#006699; word-wrap:break-word;'>" + result.data.refers[rr].doilink + "</a>&nbsp;</p></div>"
refs += item
} else if (result.data.refers[rr].refer_type == 'book' && result.data.refers[rr].isbn != '') {
// book
xuhao++
item = "<div><p>" + xuhao + '.&nbsp;' + result.data.refers[rr].author + '&nbsp;' + result.data.refers[rr].title + ".&nbsp;" + result.data.refers[rr].dateno + ". &nbsp;<br/>Available at:&nbsp;<a target='_blank' style='color:#006699; word-wrap:break-word;' href='" + result.data.refers[rr].isbn + "'> </p></div>"
refs += item
} else if (result.data.refers[rr].refer_type == 'other' && result.data.refers[rr].refer_frag != '' && result.data.refers[rr].refer_frag.length > 15) {
// other
xuhao++
item = "<div><p>" + xuhao + '.&nbsp;' + result.data.refers[rr].refer_frag + ".&nbsp;</p></div>"
refs += item
} else {
continue;
}
}
// console.log(refs)
$('.wen_rong .content-box .conthtmn').append('<div id="ArticleRef" class="ArticleRef"><p><b>References</b></p>' + refs + '</div>')
}
}
},
error: function () {
// ShowDanger("error");
}
})
}
// 稿件跟踪
// 图标------------
var detailIcon = ''

BIN
js/link_7.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 749 B

View File

@@ -7840,6 +7840,7 @@ function art_wisdom() {
if (arr[i].journal_id == 2 || arr[i].journal_id == 17 || arr[i].journal_id == 18) {
arr[i].cycle_ = 'Continuities'
}
if (i < 4) {
str_1 += '<li><a href="' + arr[i].usx + '" target="_blank"><img src="' + imgjourUrl + arr[i].icon + '" alt=""></a><div>' +
// '<a target="_blank" href="/' + arr[i].usx + '">' + arr[i].title + '</a>' +