修复便签滚动下拉加载数据

This commit is contained in:
WangHao 2020-10-13 21:51:31 +08:00
parent 9ab209fe6b
commit 20da1d10a0
2 changed files with 38 additions and 8 deletions

View File

@ -12,7 +12,7 @@ export function selectBymenuNote(query) {
// 查询便签管理详细 // 查询便签管理详细
export function userGetNoteInfo(noteId) { export function userGetNoteInfo(noteId) {
return request({ return request({
url: '/note/note/userGetNoteInfo' + noteId, url: '/note/note/userGetNoteInfo/' + noteId,
method: 'get' method: 'get'
}) })
} }

View File

@ -506,12 +506,15 @@
var that = this; var that = this;
// //
var i = that.queryParams.pageNum + 1; var i = that.queryParams.pageNum + 1;
var m = that.noteParams.pageNum + 1;
that.$set(that.queryParams, 'pageNum', i) that.$set(that.queryParams, 'pageNum', i)
that.$set(that.noteParams, 'pageNum', m)
// console.log("this.queryParams.pageNum:" + that.queryParams.pageNum) // console.log("this.queryParams.pageNum:" + that.queryParams.pageNum)
var listcount = Math.ceil(that.total / 15); var listcount = Math.ceil(that.total / 15);
console.log("该目录共有页数:" + listcount) console.log("该目录共有页数:" + listcount)
if (i > listcount) { if (i > listcount||m > listcount) {
// //
that.noMore = true; that.noMore = true;
that.listnoMore = true; that.listnoMore = true;
@ -524,10 +527,10 @@
setTimeout(() => { setTimeout(() => {
switch(this.property) { switch(this.property) {
case 0: case 0:
this. getListConcat(); this.getListConcat();
break; break;
case 1: case 1:
this.getNoteList(); this.getNoteListConcat();
break; break;
default: default:
} }
@ -543,7 +546,9 @@
that.property=e; that.property=e;
console.log("queryParams"+this.queryParams.pageNum); console.log("queryParams"+this.queryParams.pageNum);
console.log("noteParams"+this.noteParams.pageNum); console.log("noteParams"+this.noteParams.pageNum);
//
this.queryParams.pageNum=1;
this.noteParams.pageNum=1;
switch(e) { switch(e) {
case 0: case 0:
this.getList(); this.getList();
@ -692,7 +697,32 @@
}; };
this.resetForm("form"); this.resetForm("form");
}, //
resetNote() {
this.form = {
noteId: undefined,
userId: undefined,
title: undefined,
description: undefined,
menuId: undefined,
background: undefined,
noteCount: undefined,
noteSort: undefined,
isState: undefined,
readProgress: undefined,
isStar: undefined,
isDelete: undefined,
topFlag: undefined,
isShare: undefined,
isEncryption: undefined,
createTime: undefined,
updateTime: undefined,
createUserName: undefined
};
this.resetForm("form");
}, },
/** 回收站**/ /** 回收站**/
getrecycleList() { getrecycleList() {
this.loading = true; this.loading = true;
@ -790,16 +820,16 @@
/** 查询便签管理列表 */ /** 查询便签管理列表 */
getNoteList() { getNoteList() {
this.loading = true; this.loading = true;
selectBymenuNote(this.queryParams).then(response => { selectBymenuNote(this.noteParams).then(response => {
this.bookmarkList = response.rows; this.bookmarkList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
}, },
/**查询签 滚动加载分页拼接*/ /**查询便签 滚动加载分页拼接*/
getNoteListConcat(){ getNoteListConcat(){
this.loading = true; this.loading = true;
selectBymenuNote(this.queryParams).then(response => { selectBymenuNote(this.noteParams).then(response => {
if (response.total != 0 && response.code == 200) { if (response.total != 0 && response.code == 200) {
this.bookmarkList = this.bookmarkList.concat(response.rows); this.bookmarkList = this.bookmarkList.concat(response.rows);
this.total = response.total; this.total = response.total;