思路:监听页面的总条数,并对总条数进行判断。
当页面总条数 = (当前页数-1)*当前页条数,currentPage减1,重新获取列表
watch:{
pageTotal(){
if(this.pageTotal==(this.currentPage-1)*this.pageSize&& this.pageTotal!=0){
this.currentPage-=1;
getDiscountList(this);//获取列表数据
}
}
}