常熟
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

7 months ago
<template>
<view class="bg">
7 months ago
<image :src="topImg" mode="aspectFill" class="topImg"></image>
<view class="box">
7 months ago
<view v-for="(item,index) in list" :key="index" class="item" @click="item.type='calendar';gotoDetailByTypeToJdsz(item)">
7 months ago
<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>
7 months ago
</view>
</template>
<script>
export default {
data() {
return {
7 months ago
topImg: '',
7 months ago
list: [],
pageNo: 1,
7 months ago
limit: 10,
isLoading: false
7 months ago
}
},
onReady() {
this.pageNo = 1
this.getList()
7 months ago
this.getTopImg()
7 months ago
},
onReachBottom() {
setTimeout(() => {
if (!this.isLoading) this.getList();
}, 500);
},
methods: {
7 months ago
async getTopImg() {
this.topImg = await this.getHeadImg('peripheralActivity')
},
7 months ago
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;
}
7 months ago
.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;
}
}
}
}
7 months ago
</style>