首页没有模块 News & Comment 暂时注释掉接口 api/Main/getNewsArticles
This commit is contained in:
86
js/search.js
86
js/search.js
@@ -54,6 +54,20 @@ function scout_home() {
|
||||
|
||||
// 期刊列表搜索
|
||||
function scout_jour() {
|
||||
const style = document.createElement('style');
|
||||
style.innerHTML = `.article{
|
||||
box-sizing: border-box;
|
||||
|
||||
}
|
||||
.footer .daohang ul{
|
||||
width: 26% !important;
|
||||
|
||||
}
|
||||
.footer .daohang ul:nth-child(4) {
|
||||
width: 12% !important;
|
||||
}
|
||||
`
|
||||
document.head.appendChild(style);
|
||||
// 获取地址栏信息
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
@@ -169,7 +183,7 @@ function scout_jour() {
|
||||
if (arr[i].tradition_tag == '' || arr[i].tradition_tag == null) {
|
||||
var maxwidth = 500;//显示多少字符
|
||||
if (arr[i].abstract.length > maxwidth) {
|
||||
var abstNew= arr[i].abstract.replace(/<.*?>/ig,"")
|
||||
var abstNew = arr[i].abstract.replace(/<.*?>/ig, "")
|
||||
abstNew = abstNew.substring(0, maxwidth)
|
||||
abstNew = abstNew.substring(0, maxwidth - abstNew.split(" ").pop().length)
|
||||
var trad_tion = '<div>' + abstNew + '...</div>'
|
||||
@@ -191,7 +205,7 @@ function scout_jour() {
|
||||
+ localStorage.getItem("Journals_title") + '. ' + arr[i].stage.stage_year + ', ' + arr[i].stage.stage_vol + stage_ + npp_ +
|
||||
'<a target="_blank" href="https://doi.org/' + arr[i].doi + '">' + doi_ + '</a>' +
|
||||
'</div><div class="links_">' + link_ + '</div><div class="apwrap"><a onclick="imgbig(this)" class="imgdiv"><img src="' + img_i + '" alt=""></a>'
|
||||
+ trad_tion +'<br clear="both"></div></li>'
|
||||
+ trad_tion + '<br clear="both"></div></li>'
|
||||
}
|
||||
$('.wenz_list>ul').html(str);
|
||||
$('.links_ .txt_copy').css('background', localStorage.Journals_color);
|
||||
@@ -203,7 +217,7 @@ function scout_jour() {
|
||||
var num = $(this).next().html();
|
||||
$.ajax({
|
||||
type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
|
||||
data: {"article_id": $(this).attr('alt'), "type": 'abs'},
|
||||
data: { "article_id": $(this).attr('alt'), "type": 'abs' },
|
||||
success: function (result) {
|
||||
if (result.code == 0) {
|
||||
num = num * 1 + 1 * 1
|
||||
@@ -212,7 +226,7 @@ function scout_jour() {
|
||||
})
|
||||
$.ajax({
|
||||
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
|
||||
data: {'type': Jour_num, 'is_detail': '1'},
|
||||
data: { 'type': Jour_num, 'is_detail': '1' },
|
||||
success: function (result) {
|
||||
}
|
||||
});
|
||||
@@ -222,7 +236,7 @@ function scout_jour() {
|
||||
var num = $(this).next().html();
|
||||
$.ajax({
|
||||
type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
|
||||
data: {"article_id": $(this).attr('alt'), "type": 'html'},
|
||||
data: { "article_id": $(this).attr('alt'), "type": 'html' },
|
||||
success: function (result) {
|
||||
if (result.code == 0) {
|
||||
num = num * 1 + 1 * 1
|
||||
@@ -231,7 +245,7 @@ function scout_jour() {
|
||||
})
|
||||
$.ajax({
|
||||
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
|
||||
data: {'type': Jour_num, 'is_detail': '1'},
|
||||
data: { 'type': Jour_num, 'is_detail': '1' },
|
||||
success: function (result) {
|
||||
}
|
||||
});
|
||||
@@ -241,7 +255,7 @@ function scout_jour() {
|
||||
var num = $(this).next().html();
|
||||
$.ajax({
|
||||
type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
|
||||
data: {"article_id": $(this).attr('alt'), "type": 'pdf'},
|
||||
data: { "article_id": $(this).attr('alt'), "type": 'pdf' },
|
||||
success: function (result) {
|
||||
if (result.code == 0) {
|
||||
num = num * 1 + 1 * 1
|
||||
@@ -250,7 +264,7 @@ function scout_jour() {
|
||||
})
|
||||
$.ajax({
|
||||
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
|
||||
data: {'type': Jour_num, 'is_detail': '1'},
|
||||
data: { 'type': Jour_num, 'is_detail': '1' },
|
||||
success: function (result) {
|
||||
}
|
||||
});
|
||||
@@ -284,7 +298,7 @@ function scout_jour() {
|
||||
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},
|
||||
data: { "article_id": ecx_id },
|
||||
success: function (result) {
|
||||
var a = document.createElement('a');
|
||||
a.href = result.data.url;
|
||||
@@ -297,7 +311,7 @@ function scout_jour() {
|
||||
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},
|
||||
data: { "article_id": ecx_id },
|
||||
success: function (result) {
|
||||
var a = document.createElement('a');
|
||||
a.href = result.data.url;
|
||||
@@ -310,7 +324,7 @@ function scout_jour() {
|
||||
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},
|
||||
data: { "article_id": ecx_id },
|
||||
success: function (result) {
|
||||
var a = document.createElement('a');
|
||||
a.href = result.data.url;
|
||||
@@ -323,7 +337,7 @@ function scout_jour() {
|
||||
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},
|
||||
data: { "article_id": ecx_id },
|
||||
success: function (result) {
|
||||
var a = document.createElement('a');
|
||||
a.href = result.data.url;
|
||||
@@ -437,7 +451,7 @@ function scout_jour() {
|
||||
if (arr[i].tradition_tag == '' || arr[i].tradition_tag == null) {
|
||||
var maxwidth = 500;//显示多少字符
|
||||
if (arr[i].abstract.length > maxwidth) {
|
||||
var abstNew= arr[i].abstract.replace(/<.*?>/ig,"")
|
||||
var abstNew = arr[i].abstract.replace(/<.*?>/ig, "")
|
||||
abstNew = abstNew.substring(0, maxwidth)
|
||||
abstNew = abstNew.substring(0, maxwidth - abstNew.split(" ").pop().length)
|
||||
var trad_tion = '<div>' + abstNew + '...</div>'
|
||||
@@ -459,7 +473,7 @@ function scout_jour() {
|
||||
+ localStorage.getItem("Journals_title") + '. ' + arr[i].stage.stage_year + ', ' + arr[i].stage.stage_vol + stage_ + npp_ +
|
||||
'<a target="_blank" href="https://doi.org/' + arr[i].doi + '">' + doi_ + '</a>' +
|
||||
'</div><div class="links_">' + link_ + '</div><div class="apwrap"><a onclick="imgbig(this)" class="imgdiv"><img src="' + img_i + '" alt=""></a>'
|
||||
+ trad_tion +'<br clear="both"></div></li>'
|
||||
+ trad_tion + '<br clear="both"></div></li>'
|
||||
}
|
||||
$('.wenz_list>ul').html(str);
|
||||
$('.goup-container').click();
|
||||
@@ -474,7 +488,7 @@ function scout_jour() {
|
||||
type: 'post',
|
||||
url: apiUrl + 'yuan/Article/addArticleNum',
|
||||
async: false,
|
||||
data: {"article_id": $(this).attr('alt'), "type": 'abs'},
|
||||
data: { "article_id": $(this).attr('alt'), "type": 'abs' },
|
||||
success: function (result) {
|
||||
if (result.code == 0) {
|
||||
num = num * 1 + 1 * 1
|
||||
@@ -483,7 +497,7 @@ function scout_jour() {
|
||||
})
|
||||
$.ajax({
|
||||
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
|
||||
data: {'type': Jour_num, 'is_detail': '1'},
|
||||
data: { 'type': Jour_num, 'is_detail': '1' },
|
||||
success: function (result) {
|
||||
}
|
||||
});
|
||||
@@ -494,7 +508,7 @@ function scout_jour() {
|
||||
var num = $(this).next().html();
|
||||
$.ajax({
|
||||
type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
|
||||
data: {"article_id": $(this).attr('alt'), "type": 'html'},
|
||||
data: { "article_id": $(this).attr('alt'), "type": 'html' },
|
||||
success: function (result) {
|
||||
if (result.code == 0) {
|
||||
num = num * 1 + 1 * 1
|
||||
@@ -503,7 +517,7 @@ function scout_jour() {
|
||||
})
|
||||
$.ajax({
|
||||
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
|
||||
data: {'type': Jour_num, 'is_detail': '1'},
|
||||
data: { 'type': Jour_num, 'is_detail': '1' },
|
||||
success: function (result) {
|
||||
}
|
||||
});
|
||||
@@ -513,7 +527,7 @@ function scout_jour() {
|
||||
var num = $(this).next().html();
|
||||
$.ajax({
|
||||
type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
|
||||
data: {"article_id": $(this).attr('alt'), "type": 'pdf'},
|
||||
data: { "article_id": $(this).attr('alt'), "type": 'pdf' },
|
||||
success: function (result) {
|
||||
if (result.code == 0) {
|
||||
num = num * 1 + 1 * 1
|
||||
@@ -522,7 +536,7 @@ function scout_jour() {
|
||||
})
|
||||
$.ajax({
|
||||
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
|
||||
data: {'type': Jour_num, 'is_detail': '1'},
|
||||
data: { 'type': Jour_num, 'is_detail': '1' },
|
||||
success: function (result) {
|
||||
}
|
||||
});
|
||||
@@ -556,7 +570,7 @@ function scout_jour() {
|
||||
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},
|
||||
data: { "article_id": ecx_id },
|
||||
success: function (result) {
|
||||
var a = document.createElement('a');
|
||||
a.href = result.data.url;
|
||||
@@ -569,7 +583,7 @@ function scout_jour() {
|
||||
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},
|
||||
data: { "article_id": ecx_id },
|
||||
success: function (result) {
|
||||
var a = document.createElement('a');
|
||||
a.href = result.data.url;
|
||||
@@ -582,7 +596,7 @@ function scout_jour() {
|
||||
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},
|
||||
data: { "article_id": ecx_id },
|
||||
success: function (result) {
|
||||
var a = document.createElement('a');
|
||||
a.href = result.data.url;
|
||||
@@ -595,7 +609,7 @@ function scout_jour() {
|
||||
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},
|
||||
data: { "article_id": ecx_id },
|
||||
success: function (result) {
|
||||
var a = document.createElement('a');
|
||||
a.href = result.data.url;
|
||||
@@ -745,7 +759,7 @@ function scout_jour() {
|
||||
if (arr[i].tradition_tag == '' || arr[i].tradition_tag == null) {
|
||||
var maxwidth = 500;//显示多少字符
|
||||
if (arr[i].abstract.length > maxwidth) {
|
||||
var abstNew= arr[i].abstract.replace(/<.*?>/ig,"")
|
||||
var abstNew = arr[i].abstract.replace(/<.*?>/ig, "")
|
||||
abstNew = abstNew.substring(0, maxwidth)
|
||||
abstNew = abstNew.substring(0, maxwidth - abstNew.split(" ").pop().length)
|
||||
var trad_tion = '<div>' + abstNew + '...</div>'
|
||||
@@ -767,7 +781,7 @@ function scout_jour() {
|
||||
+ localStorage.getItem("Journals_title") + '. ' + arr[i].stage.stage_year + ', ' + arr[i].stage.stage_vol + stage_ + npp_ +
|
||||
'<a target="_blank" href="https://doi.org/' + arr[i].doi + '">' + doi_ + '</a>' +
|
||||
'</div><div class="links_">' + link_ + '</div><div class="apwrap"><a onclick="imgbig(this)" class="imgdiv">' + person_img + '</a>'
|
||||
+ trad_tion +'<br clear="both"></div></li>'
|
||||
+ trad_tion + '<br clear="both"></div></li>'
|
||||
}
|
||||
$('.wenz_list>ul').html(str);
|
||||
$('.goup-container').click();
|
||||
@@ -782,7 +796,7 @@ function scout_jour() {
|
||||
type: 'post',
|
||||
url: apiUrl + 'yuan/Article/addArticleNum',
|
||||
async: false,
|
||||
data: {"article_id": $(this).attr('alt'), "type": 'abs'},
|
||||
data: { "article_id": $(this).attr('alt'), "type": 'abs' },
|
||||
success: function (result) {
|
||||
if (result.code == 0) {
|
||||
num = num * 1 + 1 * 1
|
||||
@@ -791,7 +805,7 @@ function scout_jour() {
|
||||
})
|
||||
$.ajax({
|
||||
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
|
||||
data: {'type': Jour_num, 'is_detail': '1'},
|
||||
data: { 'type': Jour_num, 'is_detail': '1' },
|
||||
success: function (result) {
|
||||
}
|
||||
});
|
||||
@@ -802,7 +816,7 @@ function scout_jour() {
|
||||
var num = $(this).next().html();
|
||||
$.ajax({
|
||||
type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
|
||||
data: {"article_id": $(this).attr('alt'), "type": 'html'},
|
||||
data: { "article_id": $(this).attr('alt'), "type": 'html' },
|
||||
success: function (result) {
|
||||
if (result.code == 0) {
|
||||
num = num * 1 + 1 * 1
|
||||
@@ -811,7 +825,7 @@ function scout_jour() {
|
||||
})
|
||||
$.ajax({
|
||||
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
|
||||
data: {'type': Jour_num, 'is_detail': '1'},
|
||||
data: { 'type': Jour_num, 'is_detail': '1' },
|
||||
success: function (result) {
|
||||
}
|
||||
});
|
||||
@@ -821,7 +835,7 @@ function scout_jour() {
|
||||
var num = $(this).next().html();
|
||||
$.ajax({
|
||||
type: 'post', url: apiUrl + 'yuan/Article/addArticleNum', async: false,
|
||||
data: {"article_id": $(this).attr('alt'), "type": 'pdf'},
|
||||
data: { "article_id": $(this).attr('alt'), "type": 'pdf' },
|
||||
success: function (result) {
|
||||
if (result.code == 0) {
|
||||
num = num * 1 + 1 * 1
|
||||
@@ -830,7 +844,7 @@ function scout_jour() {
|
||||
})
|
||||
$.ajax({
|
||||
type: 'post', url: apiUrl + 'super/Publish/addVisitNum',
|
||||
data: {'type': Jour_num, 'is_detail': '1'},
|
||||
data: { 'type': Jour_num, 'is_detail': '1' },
|
||||
success: function (result) {
|
||||
}
|
||||
});
|
||||
@@ -864,7 +878,7 @@ function scout_jour() {
|
||||
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},
|
||||
data: { "article_id": ecx_id },
|
||||
success: function (result) {
|
||||
var a = document.createElement('a');
|
||||
a.href = result.data.url;
|
||||
@@ -877,7 +891,7 @@ function scout_jour() {
|
||||
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},
|
||||
data: { "article_id": ecx_id },
|
||||
success: function (result) {
|
||||
var a = document.createElement('a');
|
||||
a.href = result.data.url;
|
||||
@@ -890,7 +904,7 @@ function scout_jour() {
|
||||
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},
|
||||
data: { "article_id": ecx_id },
|
||||
success: function (result) {
|
||||
var a = document.createElement('a');
|
||||
a.href = result.data.url;
|
||||
@@ -903,7 +917,7 @@ function scout_jour() {
|
||||
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},
|
||||
data: { "article_id": ecx_id },
|
||||
success: function (result) {
|
||||
var a = document.createElement('a');
|
||||
a.href = result.data.url;
|
||||
|
||||
Reference in New Issue
Block a user