Commit 56bdaccb authored by xiejb's avatar xiejb

货主的共多少条 显示 根据是否为 搜索结果判断

parent 477cbcdf
......@@ -17,8 +17,10 @@
<div slot="action" class="font14" @click="onSearch">搜索</div>
</van-search>
<div class="search">
<search-result :result-num="searchNum"></search-result>
<van-checkbox class="" @click="allItemClick()" v-model="isAllChecked">全选</van-checkbox>
<div class="searchNum">
<search-result v-show="searchNumShow" :result-num="searchNum"></search-result>
</div>
<van-checkbox class="checkbox" @click="allItemClick()" v-model="isAllChecked">全选</van-checkbox>
</div>
<div class="w100 listHeight" ref="scrollRef">
<van-pull-refresh
......@@ -86,7 +88,8 @@ export default {
checked: '',
checkedList: [],
choosedPost: [],
isAllChecked: false
isAllChecked: false,
searchNumShow: false
}
},
computed: {
......@@ -263,12 +266,18 @@ export default {
_this.searchNum = rt.data.length + ''
this.postDataList = []
}
if (this.isJudgeStrNull(_this.keywords)) {
this.searchNumShow = true
} else {
this.searchNumShow = false
}
if (this.isRefreshing) {
// console.log('111111')
this.postDataList = this.postDataListAction(rt.data)
_this.searchNum = _this.postDataList.length + ''
} else if (rt.data || rt.data.length > 0) {
this.postDataList = this.postDataList.concat(this.postDataListAction(rt.data))
// console.log('222222')
_this.searchNum = _this.postDataList.length + ''
}
if (this.choosedPost.length === this.postDataList.length) {
this.isAllChecked = true
......@@ -279,13 +288,13 @@ export default {
_this.isRefreshing = false
// 重置加载更多提示
_this.loading = false
// 若当前加载的页数没有满足每页的数量代表完全加载
// if (rt.data.length < 10) {
if (rt.data.length < _this.pageSize) {
_this.finished = true
// } else {
} else {
// 加载成功后下一页自增1
// _this.currentPage++
// }
_this.currentPage++
_this.finished = false
}
} else {
_this.$toast(rt.message)
// _this.$toast('列表获取失败')
......@@ -335,6 +344,13 @@ export default {
background-color: #F5F5F5;
display: flex;
padding-right: 10px;
min-height: 35px;
.searchNum{
width: 80%;
}
.checkbox{
width: 20%;
}
.content {
flex: 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment