dodo hold 1 жил өмнө
parent
commit
957df171c6

+ 4 - 4
src/components/account-warning/index.vue

@@ -6,7 +6,7 @@
         <a-tag 
           v-for="platform in platformNames" 
           :key="platform"
-          :color="getPlatformStatus(platform).hasOffline ? '#f53f3f' : '#165dff'"
+          :color="getPlatformStatus(platform).hasOffline ? '#f53f3f' : 'blue'"
           :style="{ marginRight: '8px' }"
           :class="{ 'warning-pulse': getPlatformStatus(platform).hasOffline }"
         >
@@ -24,7 +24,7 @@
               <a-tag
                 v-for="(stats, type) in accountWarningData[platform]"
                 :key="type"
-                :color="stats[1] === 0 ? '#f53f3f' : '#165dff'"
+                :color="stats[0] !== stats[1] ? 'red' : 'blue'"
                 size="small"
                 :style="{ marginRight: '4px', marginBottom: '4px' }"
               >
@@ -93,11 +93,11 @@ const getPlatformStatus = (platform: string) => {
   const platformData = accountWarningData.value[platform];
   if (!platformData) return { status: '无数据', hasOffline: false };
   
-  const hasOffline = Object.values(platformData).some(([, onlineCount]) => onlineCount === 0);
+  const hasOffline = Object.values(platformData).some(([totalCount, onlineCount]) => totalCount !== onlineCount);
   
   if (hasOffline) {
     const offlineTypes = Object.entries(platformData)
-      .filter(([, [, onlineCount]]) => onlineCount === 0)
+      .filter(([, [totalCount, onlineCount]]) => totalCount !== onlineCount)
       .map(([type]) => type);
     return { 
       status: `异常(${offlineTypes.join(',')})`,