|
|
@@ -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>
|
|
|
|