Skip to content

Commit

Permalink
fix: caiyun files limit(reruin#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
reruin committed Jun 13, 2021
1 parent 095e28d commit 3584902
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions plugins/drive.caiyun.js
Original file line number Diff line number Diff line change
Expand Up @@ -650,13 +650,13 @@ class CY {

if (!fileId) {
let children = [],
pageNum = 1
startNumber = 1
while (true) {
let resp = await this.fetch('/caiyun/openapi/storage/catalog/getDisk', {
"catalogID": folderId,
"sortDirection": 1,
"startNumber": pageNum,
"endNumber": 1000,
"startNumber": startNumber,
"endNumber": startNumber + 200 - 1, // max
"filterType": 0,
"catalogSortType": 0,
"contentSortType": 0
Expand Down Expand Up @@ -705,9 +705,13 @@ class CY {
}


break;
// let count = parseInt(resp.listFiles.fileList[0].count)
// let currentCount = resp.body.pageNum * resp.body.pageSize
// break;
let count = parseInt(content.nodeCount)
if( startNumber + 200 - 1 < count ){
startNumber += 200
}else{
break
}

// if (currentCount < count) {
// //翻页
Expand Down

0 comments on commit 3584902

Please sign in to comment.