11 changed files with 50 additions and 46 deletions
@ -1,54 +1,58 @@ |
|||||
<template> |
<template> |
||||
<div> |
<div> |
||||
<div class="container"> |
<div class="container"> |
||||
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="myCommonsService" class="card" |
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="myCommonsService" class="card" |
||||
:offset="50"> |
:offset="50"> |
||||
<div class="card m-bottom10" v-for="(item,index) in EnjoyableList" :key="index" @click="$router.push({ path: `/detailServices`,query:{id:item.id} })"> |
<div class="card m-bottom10" v-for="(item, index) in EnjoyableList" :key="index" |
||||
<div class="flex flex-x flex-center2"> |
@click="$router.push({ path: `/detailServices`, query: { id: item.id } })"> |
||||
<van-tag v-if="item.status" color="#EBF1FE" text-color="#3974F6" size="large">{{ item.status? "进行中":"已结束" }}</van-tag> |
<div class="flex flex-x flex-center2"> |
||||
<van-tag v-if="!item.status" color="#F5F5F5" text-color="#AAAAAA" size="large">{{ item.status? "进行中":"已结束" }}</van-tag> |
<van-tag v-if="item.status" color="#EBF1FE" text-color="#3974F6" size="large">{{ item.status ? |
||||
<div class="font-size13 C1 m-left12">{{ item.startDate }}</div> |
"进行中":"已结束" }}</van-tag> |
||||
</div> |
<van-tag v-if="!item.status" color="#F5F5F5" text-color="#AAAAAA" size="large">{{ item.status ? |
||||
<div class="m-top10">{{ item.title }}</div> |
"进行中":"已结束" }}</van-tag> |
||||
<div class="flex flex-x m-top10 "> |
<div class="font-size13 C1 m-left12">{{ item.startDate }}</div> |
||||
<div class="font-size15 AAA">享受服务条件:</div> |
</div> |
||||
<div class="font-size15 AAA">{{ item.resiSearchTagName }}</div> |
<div class="m-top10">{{ item.title }}</div> |
||||
</div> |
<div class="flex flex-x m-top10 "> |
||||
|
<div class="font-size15 AAA">享受服务条件:</div> |
||||
|
<div class="font-size15 AAA">{{ item.resiSearchTagName }}</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</van-list> |
||||
</div> |
</div> |
||||
</van-list> |
|
||||
</div> |
|
||||
</div> |
</div> |
||||
</template> |
</template> |
||||
<script> |
<script> |
||||
import { myCommonsService } from '@/api/user' |
import { myCommonsService } from '@/api/user' |
||||
export default{ |
export default { |
||||
data(){ |
data() { |
||||
return{ |
return { |
||||
EnjoyableList:[], |
EnjoyableList: [], |
||||
finished: false, |
finished: false, |
||||
loading: true, |
loading: true, |
||||
showRegister: false, |
showRegister: false, |
||||
pageSize:10, |
pageSize: 10, |
||||
pageNo:1 |
pageNo: 1 |
||||
} |
} |
||||
}, |
}, |
||||
created(){ |
created() { |
||||
this.myCommonsService() |
this.myCommonsService() |
||||
}, |
}, |
||||
methods:{ |
methods: { |
||||
async myCommonsService() { |
async myCommonsService() { |
||||
let res = await myCommonsService() |
let res = await myCommonsService() |
||||
if (res.code === 0) { |
if (res.code === 0) { |
||||
|
debugger |
||||
this.loading = false; |
this.loading = false; |
||||
if (res.data.list.length < this.pageSize) { |
if (!res.data || res.data.list.length < this.pageSize) { |
||||
this.finished = true; |
this.finished = true; |
||||
} |
} |
||||
this.EnjoyableList = this.EnjoyableList.concat(res.data.list); |
if(res.data){ |
||||
|
this.EnjoyableList = this.EnjoyableList.concat(res.data.list); |
||||
|
} |
||||
} |
} |
||||
}, |
}, |
||||
} |
|
||||
} |
} |
||||
|
} |
||||
</script> |
</script> |
||||
<style lang="scss" scoped> |
<style lang="scss" scoped></style> |
||||
|
|
||||
</style> |
|
Loading…
Reference in new issue