From 1a4d35a08d05e014663c144771976abb0edaa933 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期五, 26 七月 2024 17:41:30 +0800 Subject: [PATCH] 监管场景信息管理 --- behaviors/loading.js | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/behaviors/loading.js b/behaviors/loading.js index 68e63f3..5c45ba7 100644 --- a/behaviors/loading.js +++ b/behaviors/loading.js @@ -81,12 +81,12 @@ _fetch() { if (typeof this._fetchData === 'function') { - this._fetchData(this.data.cPage) + const promise = this._fetchData(this.data.cPage); + if (!promise) return; + promise .then(head => { if (head) { - let cPage = head.currentPage - ? parseInt(head.currentPage) - : parseInt(head.page); + let cPage = head.currentPage ? parseInt(head.currentPage) : parseInt(head.page); let tPage = parseInt(head.totalPage); let totalCount = head.totalCount ? parseInt(head.totalCount) : 0; this._setPagination(cPage, tPage, totalCount); -- Gitblit v1.9.3