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.
109 lines
2.1 KiB
109 lines
2.1 KiB
<template>
|
|
<view class="bg">
|
|
<image :src="topImg" mode="aspectFill" class="topImg"></image>
|
|
|
|
<view class="box">
|
|
<view v-for="(item,index) in list" :key="index" class="item" @click="item.type='calendar';gotoDetailByTypeToJdsz(item)">
|
|
<image :src="showImgs(item.post_url)" mode="aspectFill" class="img"></image>
|
|
<view class="content flex-column">
|
|
<view class="title text-overflow">{{item.name}}</view>
|
|
<view class="subtitle text-overflow">活动时间:{{ item.begin_date }}—{{ item.end_date }}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
topImg: '',
|
|
list: [],
|
|
pageNo: 1,
|
|
limit: 10,
|
|
isLoading: false
|
|
}
|
|
},
|
|
onReady() {
|
|
this.pageNo = 1
|
|
this.getList()
|
|
this.getTopImg()
|
|
},
|
|
onReachBottom() {
|
|
setTimeout(() => {
|
|
if (!this.isLoading) this.getList();
|
|
}, 500);
|
|
},
|
|
methods: {
|
|
async getTopImg() {
|
|
this.topImg = await this.getHeadImg('peripheralActivity')
|
|
},
|
|
getList() {
|
|
this.Post({
|
|
apiType: 'jdsz',
|
|
page_no: this.pageNo,
|
|
page_num: this.limit
|
|
}, '/api/pbservice/Actcalendar/getActList').then(res => {
|
|
if(res) {
|
|
if(res.data.rows.length < this.limit) this.isLoading = true
|
|
this.list = this.list.concat(res.data.rows)
|
|
this.pageNo ++
|
|
}
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.bg {
|
|
width: 750rpx;
|
|
min-height: 100vh;
|
|
background: #F7F7F7;
|
|
}
|
|
|
|
.topImg {
|
|
width: 100%;
|
|
height: 533.33rpx;
|
|
}
|
|
|
|
.box {
|
|
position: relative;
|
|
top: -217rpx;
|
|
|
|
.item {
|
|
width: 697rpx;
|
|
height: 417rpx;
|
|
background: rgba(255,255,255,0.6);
|
|
box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(89,166,160,0.32);
|
|
border-radius: 13rpx;
|
|
margin: 0 auto 30rpx;
|
|
|
|
.img {
|
|
width: 697rpx;
|
|
height: 300rpx;
|
|
border-radius: 13rpx 13rpx 0rpx 0rpx;
|
|
display: block;
|
|
}
|
|
|
|
.content {
|
|
height: 117rpx;
|
|
padding: 0 22rpx;
|
|
justify-content: space-around;
|
|
|
|
.title {
|
|
font-weight: bold;
|
|
font-size: 31rpx;
|
|
color: #111111;
|
|
}
|
|
|
|
.subtitle {
|
|
font-weight: 500;
|
|
font-size: 24rpx;
|
|
color: #111111;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|