邓洁 : 修改搜索细节
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="root">
|
||||
<view class="sticky">
|
||||
<InputAndSwiper @getQueryInfo="getInput" :bannerURL="swiperList" :refresh="isRefresh"></InputAndSwiper>
|
||||
<InputAndSwiper @getQueryInfo="getInput" :bannerURL="swiperList" ref="input"></InputAndSwiper>
|
||||
<view class="marginLR10">
|
||||
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
||||
</view>
|
||||
@@ -9,7 +9,6 @@
|
||||
<view class="marginLR10">
|
||||
<SearchShopList :showStyle="1" :searchInfoList="searchInfoList" />
|
||||
</view>
|
||||
|
||||
<view v-if="showNull" class="showNull">
|
||||
<text>没有符合条件的数据, 请下拉刷新重置数据~
|
||||
</text>
|
||||
@@ -33,12 +32,12 @@
|
||||
customQuery: {},
|
||||
searchListLength: '',
|
||||
showNull: false,
|
||||
refresh: false,
|
||||
isRefresh: false
|
||||
refresh: false
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.refresh = true
|
||||
this.$refs.input.resetInfo()
|
||||
// if (this.showNull = true) {
|
||||
const q = this.$u.queryParams({
|
||||
type: 2,
|
||||
@@ -55,7 +54,7 @@
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!this.refresh && this.searchListLength !== 0) {
|
||||
this.isRefresh = true
|
||||
this.$refs.input.resetInfo()
|
||||
this.pageNum++
|
||||
this.getShopList()
|
||||
console.log("触底加载");
|
||||
@@ -91,6 +90,11 @@
|
||||
this.$api.getShopList(q).then(res => {
|
||||
this.searchListLength = res.data.data.length
|
||||
this.searchInfoList = res.data.data
|
||||
if (res.data.data.length == 0) {
|
||||
this.showNull = true
|
||||
} else {
|
||||
this.showNull = false
|
||||
}
|
||||
})
|
||||
},
|
||||
getShopList(q, type) {
|
||||
|
||||
Reference in New Issue
Block a user