Browse Source

修改下拉加载

master
邓宏 2 years ago
parent
commit
b186adff6a
  1. 6
      pages/massif/collectList.vue

6
pages/massif/collectList.vue

@ -54,7 +54,7 @@
<view class="container flex"> <view class="container flex">
<d-search v-model="searchVal.search" @search="clean();search()"/> <d-search v-model="searchVal.search" @search="clean();search()"/>
<scroll-view scroll-y> <scroll-view scroll-y @scrolltolower="search">
<view class="card" v-for="(v,k) in list" :key="k" @click="toSpecs(v)"> <view class="card" v-for="(v,k) in list" :key="k" @click="toSpecs(v)">
<view class="name"> <view class="name">
<text>{{v.goodsType}}</text> <text>{{v.substanceName}}</text> <text class="plant-youbian"/> <text>{{v.goodsType}}</text> <text>{{v.substanceName}}</text> <text class="plant-youbian"/>
@ -76,7 +76,7 @@ export default {
baseId: this.$store.state.plantBaseInfoId, baseId: this.$store.state.plantBaseInfoId,
pageNo:1, pageNo:1,
flagGroupBy:'y', flagGroupBy:'y',
pageSize:6, pageSize:7,
search:"", search:"",
}, },
list:[], list:[],
@ -95,6 +95,7 @@ export default {
this.searchVal.pageNo=1 this.searchVal.pageNo=1
}, },
async search(){ async search(){
if(this.total==0 || this.list.length<this.total){
var res=await request("/api/Inventory/queryCollectingList",{ var res=await request("/api/Inventory/queryCollectingList",{
method:"post", method:"post",
body: this.searchVal body: this.searchVal
@ -111,6 +112,7 @@ export default {
showCancel:false, showCancel:false,
}) })
} }
}
}, },
toSpecs(e){ toSpecs(e){
uni.navigateTo({ uni.navigateTo({

Loading…
Cancel
Save