From 194aa4ff0a66e5994feb727d262e1c98ed7e0a8c Mon Sep 17 00:00:00 2001 From: zhouhefeng Date: Tue, 21 Apr 2026 16:38:41 +0800 Subject: [PATCH] commit --- .../web/commons/proc/NutShiroProcessor.java | 2 +- .../trainSignUp/models/TrainSignUpCourse.java | 5 +++ .../views/mobile/train/trainInfo.html | 33 +++++++++++++++---- .../trainSingUp/manage/activity_add.html | 14 +++++--- .../manage/include_activity_edit.html | 11 +++++++ 5 files changed, 53 insertions(+), 12 deletions(-) diff --git a/src/main/java/io/v/nutz/web/commons/proc/NutShiroProcessor.java b/src/main/java/io/v/nutz/web/commons/proc/NutShiroProcessor.java index 51e932c..6d7df21 100644 --- a/src/main/java/io/v/nutz/web/commons/proc/NutShiroProcessor.java +++ b/src/main/java/io/v/nutz/web/commons/proc/NutShiroProcessor.java @@ -68,7 +68,7 @@ public class NutShiroProcessor extends AbstractProcessor { //不需要认证授权的url String[] authIgnoreUrlArr = Lang.array("/", "/sso/login", -// "/platform/login", + "/platform/login", "/platform/login(/doLogin|/logout|/captcha)", "/platform/qywechat/.*", "/platform/home/(500|403|404|UnknownAccountError|LockedAccountError)", diff --git a/src/main/java/io/v/nutz/zhgh/trainSignUp/models/TrainSignUpCourse.java b/src/main/java/io/v/nutz/zhgh/trainSignUp/models/TrainSignUpCourse.java index 29831ea..d48d84f 100644 --- a/src/main/java/io/v/nutz/zhgh/trainSignUp/models/TrainSignUpCourse.java +++ b/src/main/java/io/v/nutz/zhgh/trainSignUp/models/TrainSignUpCourse.java @@ -76,6 +76,11 @@ public class TrainSignUpCourse extends BaseModel implements Serializable { @Comment("报名人数是否限制") private Boolean courseIsLimitApply; + @Column + @ColDefine(type = ColType.BOOLEAN) + @Comment("课程是否开启") + private Boolean isOpen; + @Column @ColDefine(type = ColType.INT) @Comment("序号") diff --git a/src/main/resources/views/mobile/train/trainInfo.html b/src/main/resources/views/mobile/train/trainInfo.html index e7b6351..8ea8160 100644 --- a/src/main/resources/views/mobile/train/trainInfo.html +++ b/src/main/resources/views/mobile/train/trainInfo.html @@ -323,7 +323,7 @@ layout("/mobile/platform.html"){ style="color: #dd6363">点我查看微信群二维码
+ v-if="o.isOpen !== false && (activityStatus !== '1' || (o.isSign === true && moment().valueOf() < moment(activity.activitySignUpEndTime).valueOf()))"> { + return { + item: item, + index: index + } + }).sort((a, b) => { + const aOrder = a.item.isOpen === false ? 1 : 0 + const bOrder = b.item.isOpen === false ? 1 : 0 + if (aOrder !== bOrder) { + return aOrder - bOrder + } + return a.index - b.index + }).map(v => v.item) + }, tabClick(name, title) { if (this.courseType === '0' && this.activityStatus !== '1') { - this.tableData.courseList = this.tempArray.courseList.filter(o => o.assort === title) + this.tableData.courseList = this.sortCourseList(this.tempArray.courseList.filter(o => o.assort === title)) } else { - this.tableData.courseList = this.tempArray.courseList.filter(o => o.assort === title && o.courseType === this.courseType) + this.tableData.courseList = this.sortCourseList(this.tempArray.courseList.filter(o => o.assort === title && o.courseType === this.courseType)) } }, calcSignUpCount(o) { @@ -1030,10 +1046,11 @@ layout("/mobile/platform.html"){ }) if (resp.code === 0) { this.tableData = resp.data + this.tableData.courseList = this.sortCourseList(this.tableData.courseList) this.assortList = Array.from(new Set(this.tableData.courseList.map(o => o.assort).filter(o => o !== '' && o !== undefined))) this.tempArray = clone(this.tableData) if (this.assortList.length > 0 && this.activityStatus !== '1') { - this.tableData.courseList = this.tableData.courseList.filter(o => o.assort === this.assortList[0]) + this.tableData.courseList = this.sortCourseList(this.tableData.courseList.filter(o => o.assort === this.assortList[0])) } const type = this.trainTypeList.find(o => o.code === this.tableData.trainType) this.trainType = type ? type.name : '培训班' @@ -1089,12 +1106,14 @@ layout("/mobile/platform.html"){ } if (this.assortList.length > 0 && this.activityStatus !== '1') { if (value === '0') { - this.tableData.courseList = this.tempArray.courseList.filter(o => o.assort === this.assort) + this.tableData.courseList = this.sortCourseList(this.tempArray.courseList.filter(o => o.assort === this.assort)) } else { - this.tableData.courseList = this.tempArray.courseList.filter(item => item.courseType === value && item.assort === this.assort) + this.tableData.courseList = this.sortCourseList(this.tempArray.courseList.filter(item => item.courseType === value && item.assort === this.assort)) } } else { - this.tableData.courseList = value === '0' ? this.tempArray.courseList : this.tempArray.courseList.filter(item => item.courseType === value) + this.tableData.courseList = value === '0' + ? this.sortCourseList(this.tempArray.courseList) + : this.sortCourseList(this.tempArray.courseList.filter(item => item.courseType === value)) } this.closeLoading() }, diff --git a/src/main/resources/views/platform/trainSingUp/manage/activity_add.html b/src/main/resources/views/platform/trainSingUp/manage/activity_add.html index 06c396e..ce8b294 100644 --- a/src/main/resources/views/platform/trainSingUp/manage/activity_add.html +++ b/src/main/resources/views/platform/trainSingUp/manage/activity_add.html @@ -55,8 +55,8 @@ layout("/layouts/platform.html"){ notice: false, isIntegral: false, courseList: [ - {courseName: '1', courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1}, - {courseName: '2', courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1} + {courseName: '1', courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, isOpen: true}, + {courseName: '2', courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, isOpen: true} ], conditionStructure: { method: "AND", @@ -164,7 +164,7 @@ layout("/layouts/platform.html"){ }, //添加培训班 addCourse() { - this.formData.courseList.push({courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false}) + this.formData.courseList.push({courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false, isOpen: true}) }, //删除培训班 async removeTableCourse(index) { @@ -493,6 +493,9 @@ layout("/layouts/platform.html"){ if (this.formData.courseList && this.formData.courseList.length > 0) { this.formData.courseList.forEach(item => { + if (item.isOpen === undefined) { + this.$set(item, 'isOpen', true) + } const type = this.courseTypeList.find(o => o.id === item.courseType) if (type && type.isBringFamily === true) { this.$set(item, 'isBringFamily', true) @@ -502,7 +505,7 @@ layout("/layouts/platform.html"){ } }) } else { - this.formData.courseList.push({courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false}) + this.formData.courseList.push({courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false, isOpen: true}) } } } @@ -690,6 +693,9 @@ layout("/layouts/platform.html"){ }) this.formData.courseList.forEach(item => { + if (item.isOpen === undefined) { + this.$set(item, 'isOpen', true) + } const type = this.courseTypeList.find(o => o.id === item.courseType) if (type.isBringFamily === true) { this.$set(item, 'isBringFamily', true) diff --git a/src/main/resources/views/platform/trainSingUp/manage/include_activity_edit.html b/src/main/resources/views/platform/trainSingUp/manage/include_activity_edit.html index 5e4bb71..55af0d4 100644 --- a/src/main/resources/views/platform/trainSingUp/manage/include_activity_edit.html +++ b/src/main/resources/views/platform/trainSingUp/manage/include_activity_edit.html @@ -266,6 +266,17 @@ + + +