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")
@Ok("beetl:/layouts/v4/home.html")
@SaCheckLogin
public void home() {
}
@At("/home2")
@Ok("beetl:/layouts/v4/home/index.html")
@SaCheckLogin
public void home2() {
@@ -2,7 +2,7 @@ const act = {
template: /*language=HTML*/ `
<!-- 活动 -->
<div class="section-wrapper">
<div class="section-act" >
<div class="section-act">
<!-- 标题 -->
<div class="section-act-title">
<span>工会活动</span>
@@ -18,6 +18,9 @@ const act = {
<div class="img-box">
<img :src="activity.cover || 'https://www.ncu.edu.cn/__local/8/52/2C/644986B4C9A030F7B65300178A6_8679CB08_18467.jpg'"
alt="">
<span class="status">
{{getStatusText(activity)}}
</span>
</div>
<h4 class="title">
{{ activity.name}}
@@ -44,13 +47,13 @@ const act = {
</div>
</div>
`,
data(){
return{
data() {
return {
actList: [],
swiper: null
}
},
methods:{
methods: {
/*查询活动*/
listAct() {
this.$axios.post("/platform/home/listHomeActivity").then((res) => {
@@ -94,7 +97,19 @@ const act = {
}
})
},
go(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) {
if (!act.url) {
this.$message.warning("管理员未配置活动链接")
return
@@ -102,7 +117,7 @@ const act = {
window.open(act.url)
}
},
mounted(){
mounted() {
this.listAct()
},
style: /*language=CSS*/ `
@@ -221,8 +236,21 @@ const act = {
width: 100%;
height: 200px;
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 {
width: 100%;
height: 100%;