From c050d4a338a25050786966a7ecdcbd6cd8f3a74d Mon Sep 17 00:00:00 2001 From: liaozetao <1107136310@qq.com> Date: Tue, 2 Jan 2024 18:10:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=81=AE=E7=BD=A9=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/users/GiftManageView.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/views/users/GiftManageView.vue b/src/views/users/GiftManageView.vue index 2c9be3e..8110853 100644 --- a/src/views/users/GiftManageView.vue +++ b/src/views/users/GiftManageView.vue @@ -979,6 +979,7 @@ export default { }); $('#picUploadBtn').on('click', function () { + showLoading(); $.ajaxFileUpload({ fileElementId: 'picUploadFile', //需要上传的文件域的ID,即的ID。 url: '/admin/gift/upload', //后台方法的路径 @@ -996,19 +997,22 @@ export default { $("#picImgInfo").html('未上传成功'); } console.log(json.path); - + hideLoading(); } else { $("#tipMsg").text(json.msg); $("#tipModal").modal('show'); + hideLoading(); } }, error: function (data, status, e) { //提交失败自动执行的处理函数。 console.error(e); + hideLoading(); } }); }) $('#vggUploadBtn').on('click', function () { + showLoading(); $.ajaxFileUpload({ url: '/admin/gift/upload',//后台请求地址 type: 'post',//请求方式 当要提交自定义参数时,这个参数要设置成post @@ -1026,15 +1030,18 @@ export default { $("#vggImgInfo").html('未上传成功'); } console.log(json.path); + hideLoading(); } else { $("#tipMsg").text(json.msg); $("#tipModal").modal('show'); + hideLoading(); } } }); }) $('#svgaUploadBtn').on('click', function () { + showLoading(); $.ajaxFileUpload({ url: '/admin/gift/upload',//后台请求地址 type: 'post',//请求方式 当要提交自定义参数时,这个参数要设置成post @@ -1051,9 +1058,11 @@ export default { $("#svgaImgInfo").html('未上传成功'); } console.log(json.path); + hideLoading(); } else { $("#tipMsg").text(json.msg); $("#tipModal").modal('show'); + hideLoading(); } } });