|
@@ -1,8 +1,8 @@
|
|
|
<template>
|
|
|
<view class="my-collect-page">
|
|
|
- <view :class="['top-wrap',keywords?'top-wrap-ptb':'']">
|
|
|
+ <view :class="['top-wrap',!(!isSearchRes&&!keywords)?'top-wrap-ptb':'']">
|
|
|
<searchBox placeholder="搜索" @change="onChange" @search="onSearch" />
|
|
|
- <view class="tab-box" v-show="!keywords">
|
|
|
+ <view class="tab-box" v-show="!isSearchRes&&!keywords">
|
|
|
<text
|
|
|
:class="['tab-item',active==item.val?'tab-active':'']"
|
|
|
v-for="item in opts"
|
|
@@ -91,6 +91,7 @@ export default {
|
|
|
finished:false,
|
|
|
list:[],
|
|
|
keywords:'',
|
|
|
+ isSearchRes:false
|
|
|
}
|
|
|
},
|
|
|
onLoad(){
|
|
@@ -101,7 +102,7 @@ export default {
|
|
|
this.page=1
|
|
|
this.list=[]
|
|
|
this.finished=false
|
|
|
- this.keywords=''
|
|
|
+ this.isSearchRes=false
|
|
|
this.getList()
|
|
|
setTimeout(() => {
|
|
|
uni.stopPullDownRefresh()
|
|
@@ -115,6 +116,7 @@ export default {
|
|
|
methods: {
|
|
|
onChange(e){
|
|
|
this.keywords=e
|
|
|
+ this.finished=false
|
|
|
this.list=[]
|
|
|
},
|
|
|
|
|
@@ -123,6 +125,12 @@ export default {
|
|
|
this.page=1
|
|
|
this.finished=false
|
|
|
this.list=[]
|
|
|
+ if(this.keywords){
|
|
|
+ this.isSearchRes=true
|
|
|
+ }else{
|
|
|
+ this.isSearchRes=false
|
|
|
+ }
|
|
|
+
|
|
|
this.getList()
|
|
|
},
|
|
|
|
|
@@ -132,6 +140,7 @@ export default {
|
|
|
this.finished=false
|
|
|
this.list=[]
|
|
|
this.keywords=''
|
|
|
+ this.isSearchRes=false
|
|
|
this.getList()
|
|
|
},
|
|
|
|