From 1d4380009074623c9017e2359e01035bac02fe82 Mon Sep 17 00:00:00 2001 From: dd3s_206 Date: Wed, 17 Jun 2026 11:50:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=88=B1=E5=BF=83=E5=B8=AE=E6=89=B6=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F-=E7=96=97=E4=BC=91=E5=85=BB=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E5=9F=BA=E5=B1=82=E5=B7=A5=E4=BC=9A=E6=8A=A5=E5=90=8D=EF=BC=9A?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B4=BB=E5=8A=A8=E7=8A=B6=E6=80=81=E5=9C=A8?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E6=9C=AA=E5=BC=80=E5=A7=8B=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E6=98=BE=E7=A4=BA=E6=B4=BB=E5=8A=A8=E5=B7=B2=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/v/nutz/zhgh/lxy/controller/LxyCommon.java | 5 +++-- src/main/resources/views/platform/lxy/dialogView.html | 10 ++++++++-- .../resources/views/platform/zgfw/lxy/dialogView.html | 10 ++++++++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyCommon.java b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyCommon.java index 58a1a42..ae7e4a9 100644 --- a/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyCommon.java +++ b/src/main/java/io/v/nutz/zhgh/lxy/controller/LxyCommon.java @@ -14,6 +14,7 @@ import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.mvc.annotation.At; import org.nutz.mvc.annotation.Ok; +import org.nutz.mvc.annotation.Param; /** * @Author: 1V @@ -77,7 +78,7 @@ public class LxyCommon { @At @ViReturn - public Object getHdList(Integer year) { + public Object getHdList(@Param(value = "year", required = false) Integer year) { Sql sql = Sqls.create("SELECT id,`name` FROM `lxy_hd` $condition"); Cnd cnd = Cnd.NEW(); if (year != null) { @@ -96,7 +97,7 @@ public class LxyCommon { @At @ViReturn - public Object getNowHdList(Integer year) { + public Object getNowHdList(@Param(value = "year", required = false) Integer year) { Sql sql = Sqls.create("SELECT id,`name` FROM `lxy_hd` $condition"); Cnd cnd = Cnd.NEW(); cnd.and(new org.nutz.dao.util.cri.Static("now() < bmjzsj")); diff --git a/src/main/resources/views/platform/lxy/dialogView.html b/src/main/resources/views/platform/lxy/dialogView.html index 309f088..29c8a90 100644 --- a/src/main/resources/views/platform/lxy/dialogView.html +++ b/src/main/resources/views/platform/lxy/dialogView.html @@ -93,14 +93,20 @@ var now = new Date().getTime() var hdkssj = moment(row.hdkssj.valueOf()) var hdjssj = moment(row.hdjssj.valueOf()) + var bmkssj = moment(row.bmkssj.valueOf()) var bmjzsj = moment(row.bmjzsj.valueOf()) - if (now < bmjzsj) { + if (now < bmkssj) { + return { + class: 'text-info', + name: '报名未开始' + } + } else if (bmkssj <= now && now < bmjzsj) { return { class: 'text-success', name: '活动报名中' } - } else if (bmjzsj < now && now < hdkssj) { + } else if (bmjzsj <= now && now < hdkssj) { return { class: 'text-info', name: '报名已截止' diff --git a/src/main/resources/views/platform/zgfw/lxy/dialogView.html b/src/main/resources/views/platform/zgfw/lxy/dialogView.html index f9f7b69..9d7d179 100644 --- a/src/main/resources/views/platform/zgfw/lxy/dialogView.html +++ b/src/main/resources/views/platform/zgfw/lxy/dialogView.html @@ -99,14 +99,20 @@ var now = new Date().getTime() var hdkssj = moment(row.hdkssj.valueOf()) var hdjssj = moment(row.hdjssj.valueOf()) + var bmkssj = moment(row.bmkssj.valueOf()) var bmjzsj = moment(row.bmjzsj.valueOf()) - if (now < bmjzsj) { + if (now < bmkssj) { + return { + class: 'text-info', + name: '报名未开始' + } + } else if (bmkssj <= now && now < bmjzsj) { return { class: 'text-success', name: '活动报名中' } - } else if (bmjzsj < now && now < hdkssj) { + } else if (bmjzsj <= now && now < hdkssj) { return { class: 'text-info', name: '报名已截止'