8 changed files with 215 additions and 14 deletions
@ -0,0 +1,12 @@ |
|||||
|
// axios
|
||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 上报事件
|
||||
|
export function communitySatisfactionPageList(data) { |
||||
|
return request({ |
||||
|
url: `/actual/base/peopleRoomOverview/communitySatisfactionPageList`, |
||||
|
method: 'post', |
||||
|
message: '加载中...', |
||||
|
data |
||||
|
}) |
||||
|
} |
@ -0,0 +1,90 @@ |
|||||
|
<template> |
||||
|
<div class='container'> |
||||
|
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="communitySatisfactionPageList" class="card" |
||||
|
:offset="50"> |
||||
|
<div class="activity_content flex" v-for="(item, index) in list" :key="index"@click="$router.push({ path: `/activityDetail` })"> |
||||
|
<img :src="item.coverPic" alt="" class="mr10 img_round" style="width: 75px;height: 95px;"> |
||||
|
<div class="flex flex-y flex1 flex-end" style="overflow: hidden;"> |
||||
|
<div class="van-ellipsis">{{ item.activityName }}</div> |
||||
|
<div class="address font-size14 van-ellipsis gray">地点:{{ item.address }}</div> |
||||
|
<div class="time gray font-size14">时间:{{ item.startTime }}</div> |
||||
|
<div class="flex flex-end"> |
||||
|
<div> |
||||
|
<span>报名人数:</span> <span class="font-size18 orange">{{ item.participants }}</span>/<span |
||||
|
class="font-size14">{{ item.participants }}人</span> |
||||
|
</div> |
||||
|
<van-button type="info" size="small" round @click="handelClickJump('activityDetail')" |
||||
|
:disabled="item.online !== 1">报名</van-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</van-list> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { communityActivity } from '@/api/home'; |
||||
|
|
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
list: [], |
||||
|
pageSize: 5, |
||||
|
pageNo: 1, |
||||
|
agencyId: null, |
||||
|
finished: false, |
||||
|
loading: true, |
||||
|
showRegister: false, |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
this.agencyId = this.$store.state.app.agencyId; |
||||
|
this.communityActivity(); |
||||
|
}, |
||||
|
methods: { |
||||
|
async communityActivity() { |
||||
|
const {pageNo,pageSize,agencyId} = this |
||||
|
let parm = { |
||||
|
agencyId, |
||||
|
pageNo, |
||||
|
pageSize, |
||||
|
userId:this.$store.state.app.userInfo.id |
||||
|
} |
||||
|
let res = await communityActivity(parm) |
||||
|
if (res) { |
||||
|
this.loading = false; |
||||
|
if (res.length < this.pageSize) { |
||||
|
this.finished = true; |
||||
|
} |
||||
|
this.list = this.list.concat(res); |
||||
|
} |
||||
|
}, |
||||
|
handelClickJump(path) { |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
components: {}, |
||||
|
computed: {}, |
||||
|
watch: {}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang='less' scoped> |
||||
|
.activity_content { |
||||
|
padding-bottom: 15px; |
||||
|
box-sizing: border-box; |
||||
|
width: 100%; |
||||
|
border-bottom: 1px solid #EAEAEA; |
||||
|
margin-top: 14px; |
||||
|
min-height: 110px; |
||||
|
|
||||
|
.img { |
||||
|
width: 231px; |
||||
|
height: 33px; |
||||
|
} |
||||
|
|
||||
|
&:last-child { |
||||
|
border-bottom: none; |
||||
|
} |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,86 @@ |
|||||
|
<template> |
||||
|
<div class='container'> |
||||
|
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="communitySatisfactionPageList" class="card" |
||||
|
:offset="50"> |
||||
|
<div class="activity_content flex" v-for="(item, index) in list" :key="index"@click="$router.push({ path: `/activityDetail` })"> |
||||
|
<img :src="item.coverPic" alt="" class="mr10 img_round" style="width: 75px;height: 95px;"> |
||||
|
<div class="flex flex-y flex1 flex-end" style="overflow: hidden;"> |
||||
|
<div class="van-ellipsis">{{ item.activityName }}</div> |
||||
|
<div class="address font-size14 van-ellipsis gray">地点:{{ item.address }}</div> |
||||
|
<div class="time gray font-size14">时间:{{ item.startTime }}</div> |
||||
|
<div class="flex flex-end"> |
||||
|
<div> |
||||
|
<span>报名人数:</span> <span class="font-size18 orange">{{ item.participants }}</span>/<span |
||||
|
class="font-size14">{{ item.participants }}人</span> |
||||
|
</div> |
||||
|
<van-button type="info" size="small" round @click="handelClickJump('activityDetail')" |
||||
|
:disabled="item.online !== 1">报名</van-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</van-list> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { communitySatisfactionPageList } from '@/api/satisfaction'; |
||||
|
|
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
list: [], |
||||
|
pageSize: 5, |
||||
|
pageNo: 1, |
||||
|
agencyId: null, |
||||
|
finished: false, |
||||
|
loading: true, |
||||
|
showRegister: false, |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
this.agencyId = this.$store.state.app.agencyId; |
||||
|
this.communitySatisfactionPageList(); |
||||
|
}, |
||||
|
methods: { |
||||
|
async communitySatisfactionPageList() { |
||||
|
let parm = { |
||||
|
residList:[ this.$store.state.app.userInfo.id] |
||||
|
} |
||||
|
let res = await communitySatisfactionPageList(parm) |
||||
|
if (res) { |
||||
|
this.loading = false; |
||||
|
if (res.length < this.pageSize) { |
||||
|
this.finished = true; |
||||
|
} |
||||
|
this.list = this.list.concat(res); |
||||
|
} |
||||
|
}, |
||||
|
handelClickJump(path) { |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
components: {}, |
||||
|
computed: {}, |
||||
|
watch: {}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang='less' scoped> |
||||
|
.activity_content { |
||||
|
padding-bottom: 15px; |
||||
|
box-sizing: border-box; |
||||
|
width: 100%; |
||||
|
border-bottom: 1px solid #EAEAEA; |
||||
|
margin-top: 14px; |
||||
|
min-height: 110px; |
||||
|
|
||||
|
.img { |
||||
|
width: 231px; |
||||
|
height: 33px; |
||||
|
} |
||||
|
|
||||
|
&:last-child { |
||||
|
border-bottom: none; |
||||
|
} |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue