Browse Source

feat(community): 添加社区列表页面

- 创建社区列表页面模板
- 实现社区数据请求与展示
- 添加空状态提示组件
- 集成自定义底部导航栏
- 配置列表项跳转链接
- 初始化页面加载时获取数据
master
科技小王子 6 days ago
parent
commit
10886da744
  1. 44
      pages/community/index.vue
  2. BIN
      static/xiaoqu-active.png
  3. BIN
      static/xiaoqu.png

44
pages/community/index.vue

@ -0,0 +1,44 @@
<template>
<view>
<template v-if="list.length">
<u-list>
<u-list-item>
<td title="adsdsdf">小区名称</td>
<td title="adsdsdf">联系电话</td>
<td title="adsdsdf">服务等级</td>
<td title="adsdsdf">物业费单价</td>
</u-list-item>
<u-list-item v-for="(item, index) in list" :key="index">
<u-cell :title="item.name" is-link :url="`/userPages/pages/article?id=${item.articleId}`" :label="item.createTime"></u-cell>
</u-list-item>
</u-list>
</template>
<u-empty v-else text="暂无文章"/>
<custom-tabbar :current="1"/>
</view>
</template>
<script>
import CustomTabbar from "@/components/customTabbar.vue";
import {communityListReq} from "@/api/common";
export default {
name: "articleList",
components: {CustomTabbar},
data() {
return {
cateId: null,
list: []
}
},
methods: {
async getList() {
const {data} = await communityListReq()
this.list = data
}
},
onLoad({id}) {
this.getList()
}
}
</script>

BIN
static/xiaoqu-active.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
static/xiaoqu.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Loading…
Cancel
Save