Browse Source

修改搜索请求

master
邓宏 2 years ago
parent
commit
d5ecc7bb59
  1. 11
      pages/stock/mana.vue

11
pages/stock/mana.vue

@ -124,8 +124,8 @@
<d-search v-model="searchVal.search" @search="clean();search()"/>
<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=='ncp'}" @click="searchVal.substanceType='ncp';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="trigger('ncp')">农产品</button>
</view>
<scroll-view scroll-y @scrolltolower="search">
@ -175,6 +175,13 @@ export default {
this.search()
},
methods:{
trigger(e){
if(this.searchVal.substanceType!=e){
this.searchVal.substanceType=e;
this.clean();
this.search()
}
},
clean(){
this.list=[]
this.total=0

Loading…
Cancel
Save