flyzto hai 3 meses
pai
achega
fa8be2cb38
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      server/models/GamesPs.js

+ 4 - 4
server/models/GamesPs.js

@@ -38,6 +38,7 @@ const BASE_API_URL = IS_DEV ? 'https://api.qboss.vip/api' : 'http://172.17.222.3
 const GAMES = {
   Leagues: {},
   Baselist: {},
+  BaseMatches: [],
   Relations: {},
   Solutions: {},
   UpdateTimestamp: {},
@@ -297,8 +298,6 @@ const syncBaseEvents = ({ mk, games, outrights }) => {
         }
       });
 
-      game.matches = matches; // matches 也记录下来
-
       let uptime = evtime ?? 0;
       return { ...gameInfo, matches, uptime };
     });
@@ -307,6 +306,7 @@ const syncBaseEvents = ({ mk, games, outrights }) => {
       // if (mk == 2) {
       //   Logs.out('syncBaseEvents', JSON.stringify({ mk, gamesList }, null, 2));
       // }
+      GAMES.BaseMatches = gamesList;
       submitOdds({ platform: 'ps', mk, games: gamesList });
     }
 
@@ -827,8 +827,8 @@ const getSolution = async (sid) => {
  * 通过比赛 ID 获取中单方案
  */
 const getSolutionsByIds = async (ids) => {
-  const baseList = Object.values(GAMES.Baselist).flat();
-  const baseMap = new Map(baseList.map(item => [item.eventId, item]));
+  const baseMatches = GAMES.BaseMatches;
+  const baseMap = new Map(baseMatches.map(item => [item.eventId, item]));
   const result = {};
   ids.forEach(id => {
     const baseGame = baseMap.get(id);