flyzto пре 1 месец
родитељ
комит
807e549864
1 измењених фајлова са 33 додато и 33 уклоњено
  1. 33 33
      web/src/views/games.vue

+ 33 - 33
web/src/views/games.vue

@@ -61,37 +61,37 @@ const onSearch = (value) => {
 //   selectedGames.pinnacle = null;
 // }
 
-const setGamesRelation = () => {
-  if (!selectedGames.polymarket || !selectedGames.pinnacle) {
-    message.error('请选择要添加的比赛');
-    return;
-  }
-  const gameRelation = {
-    id: selectedGames.polymarket.id,
-    platforms: selectedGames,
-    timestamp: selectedGames.polymarket.timestamp,
-  };
-  api.post('/api/games/set_relation', gameRelation)
-  .then(res => {
-    if (res.data.statusCode === 200) {
-      message.success('添加成功');
-    }
-    else {
-      throw new Error(res.data.message);
-    }
-    // resetSelectedGames();
-    return refresh();
-  })
-  .then(() => {
-    if (search.value.trim() && (!polymarketGames.value.length || !pinnacleGames.value.length)) {
-      search.value = '';
-    }
-  })
-  .catch(err => {
-    message.error(err.response?.data?.message ?? err.message);
-    console.error(err);
-  });
-};
+// const setGamesRelation = () => {
+//   if (!selectedGames.polymarket || !selectedGames.pinnacle) {
+//     message.error('请选择要添加的比赛');
+//     return;
+//   }
+//   const gameRelation = {
+//     id: selectedGames.polymarket.id,
+//     platforms: selectedGames,
+//     timestamp: selectedGames.polymarket.timestamp,
+//   };
+//   api.post('/api/games/set_relation', gameRelation)
+//   .then(res => {
+//     if (res.data.statusCode === 200) {
+//       message.success('添加成功');
+//     }
+//     else {
+//       throw new Error(res.data.message);
+//     }
+//     // resetSelectedGames();
+//     return refresh();
+//   })
+//   .then(() => {
+//     if (search.value.trim() && (!polymarketGames.value.length || !pinnacleGames.value.length)) {
+//       search.value = '';
+//     }
+//   })
+//   .catch(err => {
+//     message.error(err.response?.data?.message ?? err.message);
+//     console.error(err);
+//   });
+// };
 
 const removeGamesRelation = (relation) => {
   api.post('/api/games/remove_relation', { id: relation.id })
@@ -208,12 +208,12 @@ onUnmounted(() => {
         </template>
         刷新
       </a-button>
-      <a-button type="primary" @click="setGamesRelation">
+      <!-- <a-button type="primary" @click="setGamesRelation">
         <template #icon>
           <plus-outlined />
         </template>
         添加
-      </a-button>
+      </a-button> -->
     </template>
   </a-page-header>