|
@ -124,8 +124,8 @@ |
|
|
<d-search v-model="searchVal.search" @search="clean();search()"/> |
|
|
<d-search v-model="searchVal.search" @search="clean();search()"/> |
|
|
|
|
|
|
|
|
<view class="btns shadow bg-white"> |
|
|
<view class="btns shadow bg-white"> |
|
|
<button class="cu-btn bg-white" :class="{active:searchVal.substanceType=='nz'}" @click="searchVal.substanceType='nz';clean();search()">农资</button> |
|
|
<button class="cu-btn bg-white" :class="{active:searchVal.substanceType=='nz'}" @click="trigger('nz')">农资</button> |
|
|
<button class="cu-btn bg-white" :class="{active:searchVal.substanceType=='ncp'}" @click="searchVal.substanceType='ncp';clean();search()">农产品</button> |
|
|
<button class="cu-btn bg-white" :class="{active:searchVal.substanceType=='ncp'}" @click="trigger('ncp')">农产品</button> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<scroll-view scroll-y @scrolltolower="search"> |
|
|
<scroll-view scroll-y @scrolltolower="search"> |
|
@ -175,6 +175,13 @@ export default { |
|
|
this.search() |
|
|
this.search() |
|
|
}, |
|
|
}, |
|
|
methods:{ |
|
|
methods:{ |
|
|
|
|
|
trigger(e){ |
|
|
|
|
|
if(this.searchVal.substanceType!=e){ |
|
|
|
|
|
this.searchVal.substanceType=e; |
|
|
|
|
|
this.clean(); |
|
|
|
|
|
this.search() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
clean(){ |
|
|
clean(){ |
|
|
this.list=[] |
|
|
this.list=[] |
|
|
this.total=0 |
|
|
this.total=0 |
|
|