Commit 56bdaccb authored by xiejb's avatar xiejb

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

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