Merge remote-tracking branch 'origin/main'

This commit is contained in:
@jyuhsin
2025-09-25 21:58:14 +08:00
2 changed files with 41 additions and 13 deletions
@@ -29,14 +29,14 @@ public class SysHomeV4Controller {
} }
// @At("/home")
// @Ok("beetl:/layouts/v4/home.html")
// @SaCheckLogin
// public void home() {
//
// }
@At("/home") @At("/home")
@Ok("beetl:/layouts/v4/home.html")
@SaCheckLogin
public void home() {
}
@At("/home2")
@Ok("beetl:/layouts/v4/home/index.html") @Ok("beetl:/layouts/v4/home/index.html")
@SaCheckLogin @SaCheckLogin
public void home2() { public void home2() {
@@ -18,6 +18,9 @@ const act = {
<div class="img-box"> <div class="img-box">
<img :src="activity.cover || 'https://www.ncu.edu.cn/__local/8/52/2C/644986B4C9A030F7B65300178A6_8679CB08_18467.jpg'" <img :src="activity.cover || 'https://www.ncu.edu.cn/__local/8/52/2C/644986B4C9A030F7B65300178A6_8679CB08_18467.jpg'"
alt=""> alt="">
<span class="status">
{{getStatusText(activity)}}
</span>
</div> </div>
<h4 class="title"> <h4 class="title">
{{ activity.name}} {{ activity.name}}
@@ -94,6 +97,18 @@ const act = {
} }
}) })
}, },
// 活动状态
getStatusText(item) {
if (this.$moment().unix() > this.$moment(item.endDate).unix()) {
return "已结束"
} else if (this.$moment().unix() < this.$moment(item.startDate).unix()) {
return "未开始"
} else {
return "进行中"
}
},
go(act) { go(act) {
if (!act.url) { if (!act.url) {
this.$message.warning("管理员未配置活动链接") this.$message.warning("管理员未配置活动链接")
@@ -221,8 +236,21 @@ const act = {
width: 100%; width: 100%;
height: 200px; height: 200px;
overflow: hidden; overflow: hidden;
position: relative;
} }
.activity-swiper .swiper-slide .item .img-box .status {
position: absolute;
left: 0;
top: 0;
background: #c11623;
padding: 6px 2px;
min-width: 50px;
color: #ffffff;
border-radius: 0 0 50% 0;
}
.activity-swiper .swiper-slide .item .img-box img { .activity-swiper .swiper-slide .item .img-box img {
width: 100%; width: 100%;
height: 100%; height: 100%;