🪄 优化v1数据中,没上报内容为空的情况

This commit is contained in:
hi2hi 2025-01-24 02:43:56 +00:00
parent b6d8457649
commit 17e548abb1
2 changed files with 6 additions and 2 deletions

View File

@ -14,7 +14,7 @@ window.$$nazhuaConfig = {
// listServerStatusType: 'progress', // 服务器状态类型--列表
// listServerRealTimeShowLoad: true, // 列表显示服务器实时负载
// detailServerStatusType: 'progress', // 服务器状态类型--详情页
// serverStatusLinear: true, // 服务器状态渐变线性显示
serverStatusLinear: true, // 服务器状态渐变线性显示
// disableSarasaTermSC: true, // 禁用Sarasa Term SC字体
// hideWorldMap: false, // 隐藏地图
// hideHomeWorldMap: false, // 隐藏首页地图

View File

@ -100,7 +100,11 @@ export default function (v1Data) {
v0Data[key] = Mapping.each(magics[$magic[1]], v1Data);
if (key === 'State') {
// 修复Load1、Load5、Load15字段为空时的问题
['Load1', 'Load5', 'Load15'].forEach((k) => {
[
'Load1', 'Load5', 'Load15',
'NetInTransfer', 'NetOutTransfer',
'NetInSpeed', 'NetOutSpeed',
].forEach((k) => {
if (!validate.isSet(v0Data[key][k])) {
v0Data[key][k] = 0;
}