From ec73e474ce02c82d1c1eaa00cdcde1d79fb597e9 Mon Sep 17 00:00:00 2001 From: dy <1197793912@qq.com> Date: Fri, 23 Apr 2021 14:34:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E7=AB=AF-=E6=B4=BB=E5=8A=A8=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E9=A1=B5=E9=9D=A2=E5=9B=BE=E7=89=87=E5=BF=85=E5=A1=AB?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/activity/info/add.html | 2 + .../templates/activity/info/edit.html | 38 +++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/sino-activity/src/main/resources/templates/activity/info/add.html b/sino-activity/src/main/resources/templates/activity/info/add.html index 3127e6bf6..393351af9 100644 --- a/sino-activity/src/main/resources/templates/activity/info/add.html +++ b/sino-activity/src/main/resources/templates/activity/info/add.html @@ -1121,6 +1121,8 @@ // 该事件在离开某个步骤之前触发 $("#smartwizard").on("leaveStep", function (e, anchorObject, currentStepNumber, nextStepNumber, stepDirection) { if (stepDirection == 'forward') { + var form = $("#step-" + (currentStepNumber + 1)).find('.form'); + console.log(form); return $("#step-" + (currentStepNumber + 1)).validate({ errorPlacement: function(error, element) { error.appendTo(element.parent().parent().parent()); diff --git a/sino-activity/src/main/resources/templates/activity/info/edit.html b/sino-activity/src/main/resources/templates/activity/info/edit.html index 8c2320fea..32f540d97 100644 --- a/sino-activity/src/main/resources/templates/activity/info/edit.html +++ b/sino-activity/src/main/resources/templates/activity/info/edit.html @@ -375,18 +375,18 @@
-
+
- +
选择图片更改 - + 清除 + data-dismiss="fileinput" onclick="clecreq('pic')">清除
@@ -651,9 +651,9 @@ 选择图片更改 + onchange="syncPic(this)" th:value="*{actPageConfigUserinfo.bgImg}"> 清除 + data-dismiss="fileinput" onclick="clecreq('picture')">清除
@@ -827,10 +827,10 @@
选择图片更改 - + 清除 + data-dismiss="fileinput" onclick="clecreq('shareImg')">清除
选择图片更改 + name="actPageConfigSubscribe-bgImg" onchange="syncPic(this)" th:value="*{actPageConfigSubscribe.bgImg}" + > 清除 + data-dismiss="fileinput" onclick="clecreq('backdropImg')">清除 @@ -913,10 +913,10 @@ 选择图片更改 + name="actPageConfigSubscribe-bgImg2" onchange="syncPic(this)" th:value="*{actPageConfigSubscribe.qrCode}" + > 清除 + data-dismiss="fileinput" onclick="clecreq('qrCodeImg')">清除 @@ -1255,6 +1255,8 @@ // 该事件在离开某个步骤之前触发 $("#smartwizard").on("leaveStep", function (e, anchorObject, currentStepNumber, nextStepNumber, stepDirection) { if (stepDirection == 'forward') { + var form = $("#step-" + (currentStepNumber + 1)).context.forms; + console.log(form); return $("#step-" + (currentStepNumber + 1)).validate({ errorPlacement: function(error, element) { error.appendTo(element.parent().parent().parent()); @@ -1374,6 +1376,10 @@ } } + //补丁,添加必填校验 + function clecreq(val){ + $('#'+val).attr("required","true"); + }