flyzto 1 settimana fa
parent
commit
968db910ce

+ 5 - 2
server/models/GamesPs.js

@@ -95,13 +95,16 @@ const getRuleType = (rule) => {
 const matchGame = (relation, sk) => {
   const keys = [];
   Object.keys(relation).forEach(platform => {
-    const { leagueName, teamHomeName, teamAwayName } = relation[platform] ?? {};
+    if (!relation[platform]) {
+      return;
+    }
+    const { leagueName, teamHomeName, teamAwayName } = relation[platform];
     if (platform == 'ps') {
       keys.push(leagueName);
     }
     keys.push(teamHomeName, teamAwayName);
   });
-  return keys.some(key => key.includes(sk));
+  return keys.some(key => key?.includes(sk));
 }
 
 /**

+ 4 - 4
web/apps/web-antd/src/views/match/solutions/index.vue

@@ -1,6 +1,6 @@
 <script setup>
 import { requestClient } from '#/api/request';
-import { Button, message, Form, InputNumber, RadioGroup, Radio, Drawer, Input, Switch } from 'ant-design-vue';
+import { Button, message, Form, InputNumber, RadioGroup, Radio, Checkbox, Drawer, Input, Switch } from 'ant-design-vue';
 import { ref, reactive, computed, watch, onMounted, onUnmounted } from 'vue';
 import dayjs from 'dayjs';
 
@@ -260,9 +260,9 @@ onUnmounted(() => {
       </div>
       <div class="solution-header">
         <span>PS</span>
-        <span>OB</span>
-        <span>HG</span>
-        <span>IM</span>
+        <span><Checkbox>OB</Checkbox></span>
+        <span><Checkbox>HG</Checkbox></span>
+        <span><Checkbox>IM</Checkbox></span>
         <!-- <em>利润</em> -->
       </div>
     </div>