浏览代码

Revert "fix 方案缺失问题"

This reverts commit a4c896d28d0bb38050a8b11bc3c958db34b459ef.
flyzto 4 月之前
父节点
当前提交
97474ef800
共有 2 个文件被更改,包括 1 次插入32 次删除
  1. 1 8
      server/models/GamesPs.js
  2. 0 24
      web/apps/web-antd/src/views/dashboard/workspace/index.vue

+ 1 - 8
server/models/GamesPs.js

@@ -252,14 +252,7 @@ const syncBaseEvents = ({ mk, games, outrights }) => {
           match
         };
       }).filter(item => item.match.every(entry => entry.value !== 0));
-      let uptime = 0;
-      if (evtime && sptime) {
-        uptime = Math.min(evtime, sptime);
-      }
-      else if (!sptime) {
-        uptime = evtime ?? 0;
-      }
-      return { ...gameInfo, matches, uptime };
+      return { ...gameInfo, matches, uptime: Math.min(evtime ?? 0, sptime ?? 0) };
     });
 
     if (gamesList.filter(item => item.uptime > 0).length) {

+ 0 - 24
web/apps/web-antd/src/views/dashboard/workspace/index.vue

@@ -21,11 +21,8 @@ import { preferences } from '@vben/preferences';
 import { useUserStore } from '@vben/stores';
 import { openWindow } from '@vben/utils';
 
-import { requestClient } from '#/api/request';
-
 import AnalyticsVisitsSource from '../analytics/analytics-visits-source.vue';
 
-
 const userStore = useUserStore();
 
 // 这是一个示例数据,实际项目中需要根据实际情况进行调整
@@ -234,27 +231,6 @@ function navTo(nav: WorkbenchProjectItem | WorkbenchQuickNavItem) {
     console.warn(`Unknown URL for navigation item: ${nav.title} -> ${nav.url}`);
   }
 }
-
-const getGamesRelation = async () => {
-  const gamesRelation = await requestClient.get('/pstery/get_games_relation', { params: { mk: 1 } });
-  const gamesSolution = await requestClient.get('/pstery/get_solutions');
-  gamesSolution.solutions.forEach((solution: any) => {
-    const { info: { id }} = solution;
-    const relation = gamesRelation.find((relation: any) => relation.id === id);
-    if (!relation) {
-      console.log('relation not found', id);
-    }
-    else {
-      if (!relation.solutions) {
-        relation.solutions = [];
-      }
-      relation.solutions.push(solution);
-    }
-  });
-  console.log('gamesRelation', gamesRelation);
-}
-
-getGamesRelation();
 </script>
 
 <template>