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(); } } });