From 4cda333799cbc57e0990773301a2b832eb1570c8 Mon Sep 17 00:00:00 2001 From: xuhubin <1269286451@qq.com> Date: Wed, 4 Nov 2020 13:57:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=BB=9A=E5=9B=BE=E5=92=8C?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E6=8B=9B=E5=8B=9F=E4=BC=98=E5=8C=96=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E4=B8=8A=E4=BC=A0=E6=88=90=E5=8A=9F=E5=90=8E=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/templates/front/carousel/add.html | 5 ++++- .../src/main/resources/templates/front/carousel/edit.html | 5 ++++- .../src/main/resources/templates/front/recruitment/add.html | 5 ++++- .../src/main/resources/templates/front/recruitment/edit.html | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) 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()); } }