From 1a0e4972f80278bfa9e53283374b745b6c968341 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 13 八月 2024 17:30:57 +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