qinhouyu 1 anno fa
parent
commit
6cec7cde03
1 ha cambiato i file con 9 aggiunte e 5 eliminazioni
  1. 9 5
      pages/toGovernmentList/toGovernmentList.vue

+ 9 - 5
pages/toGovernmentList/toGovernmentList.vue

@@ -11,7 +11,7 @@
 				  v-model="value"
 				  placeholder="请选择排序"
 				  :localdata="range"
-				  @change="getList(value)"
+				  @change="getList(value,'加载',1)"
 			></uni-data-select>
 		</view>
 	    <view class="rnwdList">
@@ -154,11 +154,16 @@ export default {
 			this.listParams.titleName = this.searchValue
 			this.getList()
 		},
-		getList(val = null,toastVal = '加载'){
+		getList(val = null,toastVal = '加载',clear){
+			if(clear==1){this.listParams.pageNum=1}
 			this.listParams.flag = val || ''
-			this.qbwd = this.topList
 			listWxs(this.listParams).then(res => {
-				this.qbwd = [...this.qbwd,...res.rows]
+				if(this.listParams.pageNum==1){
+					this.qbwd = [...this.topList,...res.rows]
+				}
+				else{
+					this.qbwd = [...this.qbwd,...res.rows]
+				}
 				this.total = res.total
 				uni.showToast({
 					title:`${toastVal}成功`
@@ -195,7 +200,6 @@ export default {
         isTop:1
       }).then(e => {
         this.topList = e.data
-        this.qbwd = this.topList
         this.getList()
       })
 	},