Bladeren bron

进球数展示

flyzto 3 maanden geleden
bovenliggende
commit
b3ff983373

+ 4 - 0
web/apps/web-antd/src/views/match/components/match_card.vue

@@ -11,6 +11,10 @@ const parseEventKey = (key) => {
     const ratio = key.split('_')[1];
     return `大/小 ${ratio}`;
   }
+  else if (key?.startsWith('ot')) {
+    const ratio = key.split('_')[1];
+    return `进球数 ${ratio}`;
+  }
   return key;
 }
 defineProps({

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

@@ -138,8 +138,15 @@ const PS_IOR_KEYS = [
   ['-2', 'ior_rh_25', 'ior_wmh_2', 'ior_rac_15'],
   ['+1', 'ior_rah_05', 'ior_wmc_1', 'ior_rc_15'],
   ['+2', 'ior_rah_15', 'ior_wmc_2', 'ior_rc_25'],
-  ['0-1', 'ior_ot_0', 'ior_os_0-1', 'ior_ot_1'],
-  ['2-3', 'ior_ot_2', 'ior_os_2-3', 'ior_ot_3'],
+  // ['0-1', 'ior_ot_0', 'ior_os_0-1', 'ior_ot_1'],
+  // ['2-3', 'ior_ot_2', 'ior_os_2-3', 'ior_ot_3'],
+  ['ot_1', '-', 'ior_ot_1', '-'],
+  ['ot_2', '-', 'ior_ot_2', '-'],
+  ['ot_3', '-', 'ior_ot_3', '-'],
+  ['ot_4', '-', 'ior_ot_4', '-'],
+  ['ot_5', '-', 'ior_ot_5', '-'],
+  ['ot_6', '-', 'ior_ot_6', '-'],
+  ['ot_7', '-', 'ior_ot_7', '-'],
 ];
 
 const formatPsEvents = (events) => {
@@ -222,29 +229,31 @@ const formatEvents = (events, cprKeys) => {
         index = 2;
       }
     }
-    else if (type === 'os') {
-      ratioKey = ratio;
-      index = 1;
-    }
+    // else if (type === 'os') {
+    //   ratioKey = ratio;
+    //   index = 1;
+    // }
     else if (type === 'ot') {
-      switch (ratio) {
-        case '0':
-          ratioKey = '0-1';
-          index = 0;
-          break;
-        case '1':
-          ratioKey = '0-1';
-          index = 2;
-          break;
-        case '2':
-          ratioKey = '2-3';
-          index = 0;
-          break;
-        case '3':
-          ratioKey = '2-3';
-          index = 2;
-          break;
-      }
+      ratioKey = `ot_${ratio}`;
+      index = 1;
+      // switch (ratio) {
+      //   case '0':
+      //     ratioKey = '0-1';
+      //     index = 0;
+      //     break;
+      //   case '1':
+      //     ratioKey = '0-1';
+      //     index = 2;
+      //     break;
+      //   case '2':
+      //     ratioKey = '2-3';
+      //     index = 0;
+      //     break;
+      //   case '3':
+      //     ratioKey = '2-3';
+      //     index = 2;
+      //     break;
+      // }
     }
     if (typeof (ratioKey) == 'number') {
       if (ratioKey > 0) {