diff --git a/ruoyi-front/src/main/resources/templates/front/carousel/add.html b/ruoyi-front/src/main/resources/templates/front/carousel/add.html index 3a02ced9f..843d73d72 100644 --- a/ruoyi-front/src/main/resources/templates/front/carousel/add.html +++ b/ruoyi-front/src/main/resources/templates/front/carousel/add.html @@ -33,7 +33,10 @@ function submitHandler() { if ($.validate.form()) { //同步上传图片,并且将上传图片返回的地址,赋值到pictureUrl对应的隐藏域上 - uploadFile(false, "pictureUrl"); + let result = uploadFile(false, "pictureUrl"); + if (result != web_status.SUCCESS) { + return; + } $.operate.save(prefix + "/add", $('#form-carousel-add').serialize()); } } diff --git a/ruoyi-front/src/main/resources/templates/front/carousel/edit.html b/ruoyi-front/src/main/resources/templates/front/carousel/edit.html index f0703781b..a2e07482d 100644 --- a/ruoyi-front/src/main/resources/templates/front/carousel/edit.html +++ b/ruoyi-front/src/main/resources/templates/front/carousel/edit.html @@ -27,7 +27,10 @@ function submitHandler() { if ($.validate.form()) { - uploadFile(false, "pictureUrl"); + let result = uploadFile(false, "pictureUrl"); + if (result != web_status.SUCCESS) { + return; + } $.operate.save(prefix + "/edit", $('#form-carousel-edit').serialize()); } } diff --git a/ruoyi-front/src/main/resources/templates/front/recruitment/add.html b/ruoyi-front/src/main/resources/templates/front/recruitment/add.html index 0538167fa..42343ea43 100644 --- a/ruoyi-front/src/main/resources/templates/front/recruitment/add.html +++ b/ruoyi-front/src/main/resources/templates/front/recruitment/add.html @@ -62,7 +62,10 @@ function submitHandler() { if ($.validate.form()) { - uploadFile(false, "pictureUrl"); + let result = uploadFile(false, "pictureUrl"); + if (result != web_status.SUCCESS) { + return; + } $.operate.save(prefix + "/add", $('#form-recruitment-add').serialize()); } } diff --git a/ruoyi-front/src/main/resources/templates/front/recruitment/edit.html b/ruoyi-front/src/main/resources/templates/front/recruitment/edit.html index 34d705b22..17aa19f0f 100644 --- a/ruoyi-front/src/main/resources/templates/front/recruitment/edit.html +++ b/ruoyi-front/src/main/resources/templates/front/recruitment/edit.html @@ -63,7 +63,10 @@ function submitHandler() { if ($.validate.form()) { - uploadFile(false, "pictureUrl"); + let result = uploadFile(false, "pictureUrl"); + if (result != web_status.SUCCESS) { + return; + } $.operate.save(prefix + "/edit", $('#form-recruitment-edit').serialize()); } }