You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
zhishifufei_uniapp/components/Course/offlineStyleCourse.vue

121 lines
2.5 KiB

<template>
<view>
<view v-for="item in specialList" :key="item.id" class="offline-special-item flex" @click="$emit('detail', item)">
<view class="image">
<image :src="item.pic" mode="aspectFill" :alt="item.title" />
</view>
<view class="text">
<view class="special-title">{{ item.title }}</view>
<view class="advert-info">
<image src="@/static/images/advert-time.png" mode="aspectFill"></image>
报名时间:{{ item.apply_start_time }} - {{ item.apply_end_time }}
</view>
<view class="advert-info">
<image src="@/static/images/advert-time.png" mode="aspectFill"></image>
活动时间:{{ item.start_time }} - {{ item.end_time }}
</view>
<view class="advert-info">
<image src="@/static/images/advert-position.png" mode="aspectFill"></image>
活动地址{{ item.address }}
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
specialList: {
type: Array,
default: [],
}
},
methods: {
getJumpUrl(item) {
return item.is_light ? this.singleDetailsURL : this.detailsURL + "?id=" + item.id;
},
},
};
</script>
<style lang="scss" scoped>
.offline-special-item {
margin-bottom: 19rpx;
background: #fff;
padding: 25rpx 32rpx;
&:last-child {
margin-bottom: 0;
}
}
.offline-special-item .image {
position: relative;
width: 200rpx;
height: 160rpx;
}
.offline-special-item image {
display: block;
width: 100%;
height: 100%;
border-radius: 10rpx;
object-fit: cover;
}
.offline-special-item .text {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
margin-left: 20rpx;
padding-top: 12rpx;
}
.offline-special-item .special-title {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 28rpx;
line-height: 28rpx;
color: #333333;
}
.offline-special-item .label {
margin-top: 16rpx;
font-size: 0;
}
.offline-special-item .label text {
display: inline-block;
height: 38rpx;
padding: 0 12rpx;
border-radius: 4rpx;
background-color: #ECF6FC;
vertical-align: middle;
font-size: 20rpx;
line-height: 38rpx;
color: #2c8eff;
}
.offline-special-item .advert-info {
color: #999;
font-size: 20rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-top: 20rpx;
line-height: 24rpx;
display: flex;
align-items: center;
margin-top: 16rpx;
>image {
width: 24rpx;
height: 24rpx;
margin-right: 5rpx;
}
}
</style>