This commit is contained in:
徐哼唧L
2023-06-21 14:45:20 +08:00
parent 6e7ee3dd44
commit 4646183cd3
31 changed files with 574 additions and 281 deletions

View File

@@ -661,6 +661,10 @@ function contribu_form() {
if (file_list_4 == undefined) {
file_list_4 = ""
}
var file_list_5 = $('#filename_5 li').attr('id');
if (file_list_5 == undefined) {
file_list_5 = ""
}
mess_add.authorList = ary;
@@ -680,6 +684,7 @@ function contribu_form() {
mess_add.picturesAndTables = file_list_2;
// mess_add.totalpage = file_list_3;
mess_add.manuscirpt = file_list_4;
mess_add.supplementary = file_list_5;
var S_Dan = '0';
@@ -776,6 +781,10 @@ function contribu_form() {
mess_add.manuscirpt = 'manuscirpt/' + file_list_4;
}
if ($('#filename_5 li').attr('id') != undefined) {
mess_add.supplementary = 'supplementary/' + file_list_5;
}
if (S_Dan == '1') {
ShowDanger("Incomplete information");
@@ -923,6 +932,35 @@ $("#ch_file_4").on("change", function () {
});
function up_file_5() {
$("#ch_file_5").click();
}
$("#ch_file_5").on("change", function () {
//jquery获取input file文件名
var awj = $("#ch_file_5")[0].files;
var wj_f = "";
var formData = new FormData();
formData.append("supplementary", awj[0]);
$.ajax({
type: 'post', url: apiUrlTG + 'special/Special/up_file/type/supplementary',
data: formData,
processData: false,
contentType: false,
dataType: "json",
success: function (result) {
if (result.code == 0) {
wj_f = '<li id="' + result.upurl + '"><p>' + result.upurl + '</p><i class="fa fa-trash del_file" ></i></li>';
$("#filename_5").html(wj_f);
} else {
ShowDanger("请求失败!");
}
del_wj();
}
})
});
function del_wj() {
$('.del_file').on('click', function () {
$(this).parent('li').remove();