亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

分頁條件查詢點擊下一頁后變成全部數據?

分頁條件查詢點擊下一頁后變成全部數據?

慕少森 2019-03-20 18:19:48
一個頁面有table表格, 里面有很多數據, 有搜索框, 當點擊搜索的時候, 可以進行篩選, 但是點擊下一頁的時候, 數據變成全部的數據, 分頁也跟著變了以下是點擊搜索的時候篩選的數據3.當點擊下一頁的時候數據變成全部數據jsexport default {  data() {    return {      botanyData: [],      activeName2: "first",      query: {        pageNum: 1,        pageSize: 10,        currentPage: 1,        recordCount: 0      },      seek: {        familyName: "",        speciesName: "",        genusName: ""      },      familyName: "",      speciesName: "",      genusName: ""    };  },  methods: {    // 植物數據    wildPlantData() {      this.$http        .get(this.$api.wildPlant, {          params: { pageNum: this.query.currentPage }        })        .then(res => {          if (res.status == 200) {            this.botanyData = res.data.data.pageBean.recordList;            this.query.recordCount = res.data.data.pageBean.recordCount;            this.query.pageSize = res.data.data.pageBean.pageSize;            this.query.currentPage = res.data.data.pageBean.currentPage;          } else {            throw res.message;          }        })        .catch(err => {          console.log("wildPlantData有異常", err);        });    },    // 查詢    queryData() {      this.seek.familyName = this.familyName;      this.seek.speciesName = this.speciesName;      this.seek.genusName = this.genusName;      this.$http        .get(this.$api.wildPlant, { params: this.seek })        .then(res => {          if (res.status == 200) {            this.botanyData = res.data.data.pageBean.recordList;            this.query.recordCount = res.data.data.pageBean.recordCount;            this.query.pageSize = res.data.data.pageBean.pageSize;            this.query.currentPage = res.data.data.pageBean.currentPage;          } else {            throw res.message;          }        })        .catch(err => {          console.log("queryData有異常", err);        });    }, 
查看完整描述

1 回答

?
眼眸繁星

TA貢獻1873條經驗 獲得超9個贊

用開發者工具看看你請求的參數,以及返回的數據


查看完整回答
反對 回復 2019-03-27
  • 1 回答
  • 0 關注
  • 1062 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號