Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ const act = {
|
|||||||
template: /*language=HTML*/ `
|
template: /*language=HTML*/ `
|
||||||
<!-- 活动 -->
|
<!-- 活动 -->
|
||||||
<div class="section-wrapper">
|
<div class="section-wrapper">
|
||||||
<div class="section-act" >
|
<div class="section-act">
|
||||||
<!-- 标题 -->
|
<!-- 标题 -->
|
||||||
<div class="section-act-title">
|
<div class="section-act-title">
|
||||||
<span>工会活动</span>
|
<span>工会活动</span>
|
||||||
@@ -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}}
|
||||||
@@ -44,13 +47,13 @@ const act = {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
data(){
|
data() {
|
||||||
return{
|
return {
|
||||||
actList: [],
|
actList: [],
|
||||||
swiper: null
|
swiper: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
/*查询活动*/
|
/*查询活动*/
|
||||||
listAct() {
|
listAct() {
|
||||||
this.$axios.post("/platform/home/listHomeActivity").then((res) => {
|
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) {
|
if (!act.url) {
|
||||||
this.$message.warning("管理员未配置活动链接")
|
this.$message.warning("管理员未配置活动链接")
|
||||||
return
|
return
|
||||||
@@ -102,7 +117,7 @@ const act = {
|
|||||||
window.open(act.url)
|
window.open(act.url)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted() {
|
||||||
this.listAct()
|
this.listAct()
|
||||||
},
|
},
|
||||||
style: /*language=CSS*/ `
|
style: /*language=CSS*/ `
|
||||||
@@ -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%;
|
||||||
|
|||||||
Reference in New Issue
Block a user