From c570608b297dc3b2e896c47adb5f026415c26961 Mon Sep 17 00:00:00 2001 From: woon Date: Wed, 12 Apr 2023 11:16:59 +0800 Subject: [PATCH] update --- public/index.php | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/public/index.php b/public/index.php index 970e62d..f116d60 100644 --- a/public/index.php +++ b/public/index.php @@ -136,21 +136,6 @@ function show_index() formData.append('file', queue[i].file); formData.append('id', queue[i].id); $("#" + queue[i].id).prev().text('上传中'); - - // $.ajax({ - // url: '/api/upload', // POST请求的URL地址 - // type: 'POST', // 请求类型为POST - // data: formData, - // dataType: 'json', // 响应数据类型为JSON - // processData: false, // 不处理表单数据 - // contentType: false, // 不设置请求头 - // success: function(response) { // 成功响应后的回调函数 - // console.log(response); // 输出响应数据 - // }, - // error: function(xhr, status, error) { // 响应出错时的回调函数 - // console.log(error); // 输出错误信息 - // } - // }); $.ajax({ url: "/api/upload", type: 'POST', @@ -165,8 +150,8 @@ function show_index() $("#" + data.id).prev().text('上传成功'); // $("#textareaId").append(data.src + "\n"); } else { + $("#" + data.id).html("上传失败"); $("#" + data.id).prev().text('上传失败'); - $(queue[i]['id']).html("上传失败"); } }, error: function(data) {