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

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) {
return request({
url: '/note/note/userGetNoteInfo' + noteId,
url: '/note/note/userGetNoteInfo/' + noteId,
method: 'get'
})
}

View File

@ -506,12 +506,15 @@
var that = this;
//
var i = that.queryParams.pageNum + 1;
var m = that.noteParams.pageNum + 1;
that.$set(that.queryParams, 'pageNum', i)
that.$set(that.noteParams, 'pageNum', m)
// console.log("this.queryParams.pageNum:" + that.queryParams.pageNum)
var listcount = Math.ceil(that.total / 15);
console.log("该目录共有页数:" + listcount)
if (i > listcount) {
if (i > listcount||m > listcount) {
//
that.noMore = true;
that.listnoMore = true;
@ -527,7 +530,7 @@
this.getListConcat();
break;
case 1:
this.getNoteList();
this.getNoteListConcat();
break;
default:
}
@ -543,7 +546,9 @@
that.property=e;
console.log("queryParams"+this.queryParams.pageNum);
console.log("noteParams"+this.noteParams.pageNum);
//
this.queryParams.pageNum=1;
this.noteParams.pageNum=1;
switch(e) {
case 0:
this.getList();
@ -692,7 +697,32 @@
};
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() {
this.loading = true;
@ -790,16 +820,16 @@
/** 查询便签管理列表 */
getNoteList() {
this.loading = true;
selectBymenuNote(this.queryParams).then(response => {
selectBymenuNote(this.noteParams).then(response => {
this.bookmarkList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/**查询签 滚动加载分页拼接*/
/**查询便签 滚动加载分页拼接*/
getNoteListConcat(){
this.loading = true;
selectBymenuNote(this.queryParams).then(response => {
selectBymenuNote(this.noteParams).then(response => {
if (response.total != 0 && response.code == 200) {
this.bookmarkList = this.bookmarkList.concat(response.rows);
this.total = response.total;