1
0
forked from dyf/APP

merge upstream

This commit is contained in:
2025-09-30 13:35:18 +08:00
2 changed files with 7 additions and 4 deletions

View File

@ -50,6 +50,9 @@
<view class="offlines"
v-if="item.communicationMode == 0 && item.onlineStatus == 0">离线
</view>
<view class="offlines"
v-if="item.communicationMode == 0 && item.onlineStatus == 2">故障
</view>
<view>电量{{ item.battery || '0' }}%</view>
</view>
</view>
@ -372,10 +375,9 @@
} else {
this.deviceList = [...this.deviceList, ...newDevices];
}
// 关键:正确判断是否加载完成
// 判断是否加载完成
if (this.loadedCount >= this.total || newDevices.length < this.size) {
this.finished = true;
console.log(`加载完成 - 已加载${this.loadedCount}/${this.total}`);
} else {
this.page++;
}
@ -384,7 +386,6 @@
reject(res.msg || '获取数据失败');
}
}).catch((err) => {
console.error('获取设备列表失败:', err);
reject(err);
}).finally(() => {
this.loading = false;