Files
journal_com/js/forAuthor.js
2025-07-17 11:18:49 +08:00

52 lines
1.9 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
function initForAuthor(Jour_num, arr_jour) {
var apcStr = ``;
if ([1, 25, 11].includes(Number(Jour_num))) {
apcStr = arr_jour.apc
} else {
apcStr = arr_jour.apc + `<span style="color: ${arr_jour.system_color};font-weight: bold;margin-left:6px;">( 2025 - 2026 )</span>`;
}
$('.for_mess div .fr_APC').html(apcStr);
}
function initForAuthorHtml(Jour_num, arr_jour) {
$.ajax({
type: 'post', url: apiUrl + 'api/Journal/getForAuthors',
data: { 'journal_id': Jour_num },
success: function (result) {
if (result.code == 0) {
var arr = result.data.forAuthors;
var str = "";
var sgl = "";
for (var i in arr) {
str += '<li><a href="javascript:;" class="snf-nav" style="padding:6px 0 6px 27px;"><b>' + arr[i].jfa_title + '</b></a></li>'
sgl += '<div class="snf-page"><h3 class="big" style="font-size: 22px;padding-top: 15px;color: rgb(0, 71, 178);">' + arr[i].jfa_title + '</h3></div>'
for (var j = 0; j < arr[i].children.length; j++) {
str += '<li><a href="javascript:;" class="snf-nav" style="padding:6px 0 6px 27px">' + arr[i].children[j].jfa_title + '</a></li>'
sgl += '<div class="snf-page"><h3 style="font-size:16px">' + arr[i].children[j].jfa_title + '</h3>' + arr[i].children[j].content + '</div>'
}
}
$('#for_nag').html(str);
$('#for_nag li:nth-child(1) a').addClass('active');
$('#for_main').html(sgl);
//以window为顶设置离顶和回调
var snf = simpleNavFollow({
leaveTop: 10,
});
} else {
ShowDanger(result.msg);
}
},
error: function () {
ShowDanger("error");
}
})
}