|
@@ -29,17 +29,19 @@
|
|
<view v-if="isEmpty" class="empty-container">
|
|
<view v-if="isEmpty" class="empty-container">
|
|
<image
|
|
<image
|
|
class="club-empty-image"
|
|
class="club-empty-image"
|
|
- src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AY2ZjAABpmnBICH4247.png"
|
|
|
|
|
|
+ src="/static/ws/empty_club.png"
|
|
mode="aspectFit"
|
|
mode="aspectFit"
|
|
lazy-load
|
|
lazy-load
|
|
></image>
|
|
></image>
|
|
- <view class="txt">暂无机构数据</view>
|
|
|
|
|
|
+ <view class="txt">机构列表空空如也~</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- :style="{ height: scrollHeight }" -->
|
|
<view v-else class="club-list">
|
|
<view v-else class="club-list">
|
|
<scroll-view
|
|
<scroll-view
|
|
|
|
+ class="club-scroll"
|
|
scroll-y="true"
|
|
scroll-y="true"
|
|
- :style="{ height: scrollHeight }"
|
|
|
|
@scrolltolower="getOnReachBottomData"
|
|
@scrolltolower="getOnReachBottomData"
|
|
|
|
+ :style="{height: scrollHeight}"
|
|
>
|
|
>
|
|
<!-- 机构数据 -->
|
|
<!-- 机构数据 -->
|
|
<view class="list" v-for="item in clubList" :key="item.userId">
|
|
<view class="list" v-for="item in clubList" :key="item.userId">
|
|
@@ -123,20 +125,21 @@ export default {
|
|
this.organizeId = data.id
|
|
this.organizeId = data.id
|
|
// 初始化列表
|
|
// 初始化列表
|
|
this.init()
|
|
this.init()
|
|
|
|
+ console.log(this.clubList)
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 初始化机构列表
|
|
// 初始化机构列表
|
|
async init() {
|
|
async init() {
|
|
this.pageNum = 1
|
|
this.pageNum = 1
|
|
this.clubList = await this.getClubList()
|
|
this.clubList = await this.getClubList()
|
|
- if(this.clubList.length>0){
|
|
|
|
|
|
+ if (this.clubList.length > 0) {
|
|
this.isEmpty = false
|
|
this.isEmpty = false
|
|
}
|
|
}
|
|
- console.log(this.clubList)
|
|
|
|
},
|
|
},
|
|
// 设置scroll高度
|
|
// 设置scroll高度
|
|
setScrollHeight() {
|
|
setScrollHeight() {
|
|
- this.scrollHeight = this.$store.state.windowHeight - 61 + 'px'
|
|
|
|
|
|
+ console.log(this.$store.state.windowHeight)
|
|
|
|
+ this.scrollHeight = this.$store.state.windowHeight - 100 - 40 + 'px'
|
|
},
|
|
},
|
|
async searchClubList() {
|
|
async searchClubList() {
|
|
// 如果搜索框为空
|
|
// 如果搜索框为空
|
|
@@ -149,6 +152,9 @@ export default {
|
|
async searchKeyWords() {
|
|
async searchKeyWords() {
|
|
this.pageNum = 1
|
|
this.pageNum = 1
|
|
this.clubList = await this.getClubList()
|
|
this.clubList = await this.getClubList()
|
|
|
|
+ if (this.clubList.length <= 0) {
|
|
|
|
+ this.isEmpty = true
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 初始化机构列表
|
|
// 初始化机构列表
|
|
async getClubList() {
|
|
async getClubList() {
|
|
@@ -170,7 +176,7 @@ export default {
|
|
)
|
|
)
|
|
this.pageNum = res.pageNum
|
|
this.pageNum = res.pageNum
|
|
this.hasNextPage = res.hasNextPage
|
|
this.hasNextPage = res.hasNextPage
|
|
-
|
|
|
|
|
|
+
|
|
return res.list
|
|
return res.list
|
|
},
|
|
},
|
|
// 加载下一页数据
|
|
// 加载下一页数据
|
|
@@ -312,7 +318,13 @@ page,
|
|
}
|
|
}
|
|
.club-main {
|
|
.club-main {
|
|
position: relative;
|
|
position: relative;
|
|
- padding-top: 122rpx;
|
|
|
|
|
|
+ padding-top: 57px;
|
|
|
|
+ .club-scroll {
|
|
|
|
+ // height: 100vh;
|
|
|
|
+ // box-sizing: border-box;
|
|
|
|
+ // padding-top: 122rpx;
|
|
|
|
+ }
|
|
|
|
+
|
|
.list {
|
|
.list {
|
|
align-items: flex-start;
|
|
align-items: flex-start;
|
|
width: 702rpx;
|
|
width: 702rpx;
|
|
@@ -333,6 +345,7 @@ page,
|
|
image {
|
|
image {
|
|
width: 180rpx;
|
|
width: 180rpx;
|
|
height: 180rpx;
|
|
height: 180rpx;
|
|
|
|
+ border-radius: 8rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|