|
@@ -19,11 +19,11 @@
|
|
|
<div class="searchList">
|
|
|
<p
|
|
|
class="waring"
|
|
|
- v-if="!searchVal&&searchLis.length==0"
|
|
|
+ v-if="!searchVal&&!hasMore&&searchLis.length==0"
|
|
|
>请输入搜索内容</p>
|
|
|
<p
|
|
|
class="waring"
|
|
|
- v-if="searchVal&&searchLis.length==0"
|
|
|
+ v-if="hasMore&&searchVal"
|
|
|
>暂无搜索结果</p>
|
|
|
<ul>
|
|
|
<li
|
|
@@ -48,7 +48,8 @@ export default {
|
|
|
return {
|
|
|
searchVal: '',
|
|
|
searchLis: [],
|
|
|
- tmpItem:{}
|
|
|
+ tmpItem:{},
|
|
|
+ hasMore:false
|
|
|
}
|
|
|
},
|
|
|
watch:{
|
|
@@ -94,6 +95,11 @@ export default {
|
|
|
const result = res.data;
|
|
|
if (result.code == 0) {
|
|
|
this.searchLis = result.data
|
|
|
+ if(result.data.length>0){
|
|
|
+ this.hasMore = false
|
|
|
+ }else{
|
|
|
+ this.hasMore = true
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
}
|