2025-08-29 09:51:02 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<view class="event_content">
|
2025-12-15 18:19:04 +08:00
|
|
|
|
<view
|
|
|
|
|
|
class="event_item"
|
|
|
|
|
|
v-for="(i, index) in props?.data"
|
|
|
|
|
|
:key="`item_${index}`"
|
|
|
|
|
|
@click="toDetaile(i)"
|
|
|
|
|
|
>
|
2025-08-29 09:51:02 +08:00
|
|
|
|
<view class="event_item_img">
|
2025-12-15 18:19:04 +08:00
|
|
|
|
<image v-if="i?.cover_image?.length" :src="i?.cover_image[0]?.url" mode="aspectFill" />
|
|
|
|
|
|
<view v-else class="event_item_img_default">
|
|
|
|
|
|
<uni-icons type="images" size="60" color="#eee"></uni-icons>
|
|
|
|
|
|
</view>
|
2026-01-30 09:54:26 +08:00
|
|
|
|
<view :class="`event_item_status event_item_status_${i?.status}`">
|
|
|
|
|
|
<hs-enum-tag :value="i?.status" :Enums="ActivitiesStatusEnum" />
|
2025-12-15 18:19:04 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="event_item_name"> {{ i?.title }} </view>
|
|
|
|
|
|
<view class="event_item_data">
|
|
|
|
|
|
活动时间:{{ showDay(i?.start_time) }} 至 {{ showDay(i?.end_time) }}
|
2025-08-29 09:51:02 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
2025-12-15 18:19:04 +08:00
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
|
const props = defineProps(['data'])
|
2026-01-30 09:54:26 +08:00
|
|
|
|
import { ActivitiesStatusEnum } from '@/gen/Enums'
|
2025-12-15 18:19:04 +08:00
|
|
|
|
import { showDay } from '@/common/libraries/day'
|
2026-01-30 09:54:26 +08:00
|
|
|
|
import { getIsInRangeInclusive } from '@/common/libraries/day'
|
2025-12-15 18:19:04 +08:00
|
|
|
|
import { gotoEventToPage } from '@/common/libraries/naviHelper'
|
|
|
|
|
|
const toDetaile = (e: { id: string }) => {
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: `/INDEX/activities_show/index?id=${e.id}`
|
|
|
|
|
|
})
|
2025-08-29 09:51:02 +08:00
|
|
|
|
}
|
2025-12-15 18:19:04 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2025-08-29 09:51:02 +08:00
|
|
|
|
.event_content {
|
2025-12-15 18:19:04 +08:00
|
|
|
|
padding: 0 30rpx;
|
2025-08-29 09:51:02 +08:00
|
|
|
|
.event_item {
|
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
|
overflow: hidden;
|
2025-12-15 18:19:04 +08:00
|
|
|
|
margin-top: 30rpx;
|
2025-08-29 09:51:02 +08:00
|
|
|
|
.event_item_img {
|
|
|
|
|
|
height: 306rpx;
|
2025-12-15 18:19:04 +08:00
|
|
|
|
position: relative;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
.event_item_img_default {
|
|
|
|
|
|
padding-top: 15%;
|
|
|
|
|
|
}
|
|
|
|
|
|
.event_item_status {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
border-top-left-radius: 20rpx;
|
|
|
|
|
|
border-bottom-right-radius: 20rpx;
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
height: 50rpx;
|
|
|
|
|
|
line-height: 50rpx;
|
|
|
|
|
|
}
|
2026-01-30 09:54:26 +08:00
|
|
|
|
.event_item_status_NotStarted {
|
2025-12-15 18:19:04 +08:00
|
|
|
|
background-color: #ffa100;
|
|
|
|
|
|
}
|
|
|
|
|
|
.event_item_status_InProgress {
|
|
|
|
|
|
background-color: #4096ff;
|
|
|
|
|
|
}
|
2026-01-30 09:54:26 +08:00
|
|
|
|
.event_item_status_Finished {
|
2025-12-15 18:19:04 +08:00
|
|
|
|
background-color: #939393;
|
|
|
|
|
|
}
|
2025-08-29 09:51:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
image {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 306rpx;
|
|
|
|
|
|
border-top-left-radius: 20rpx;
|
|
|
|
|
|
border-top-right-radius: 20rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
.event_item_name {
|
|
|
|
|
|
padding: 15rpx 30rpx;
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
color: #333;
|
|
|
|
|
|
}
|
|
|
|
|
|
.event_item_data {
|
|
|
|
|
|
padding: 0 30rpx 20rpx 30rpx;
|
|
|
|
|
|
color: #666666;
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|