|
@@ -1,9 +1,9 @@
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import axios from 'axios';
|
|
|
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
|
import { ref, reactive, computed, watch, onMounted, onUnmounted } from 'vue';
|
|
import { ref, reactive, computed, watch, onMounted, onUnmounted } from 'vue';
|
|
|
import { message } from 'ant-design-vue';
|
|
import { message } from 'ant-design-vue';
|
|
|
import { ReloadOutlined, PlusOutlined, LinkOutlined, DisconnectOutlined } from '@ant-design/icons-vue';
|
|
import { ReloadOutlined, PlusOutlined, LinkOutlined, DisconnectOutlined } from '@ant-design/icons-vue';
|
|
|
|
|
+import api from '@/libs/api';
|
|
|
|
|
|
|
|
const search = ref('');
|
|
const search = ref('');
|
|
|
// const games = ref(null);
|
|
// const games = ref(null);
|
|
@@ -18,7 +18,7 @@ const onSearch = (value) => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// const updateGames = async () => {
|
|
// const updateGames = async () => {
|
|
|
-// return axios.get('/api/games/get_games').then(res => {
|
|
|
|
|
|
|
+// return api.get('/api/games/get_games').then(res => {
|
|
|
// if (res.data.statusCode === 200) {
|
|
// if (res.data.statusCode === 200) {
|
|
|
// games.value = res.data.data;
|
|
// games.value = res.data.data;
|
|
|
// }
|
|
// }
|
|
@@ -71,7 +71,7 @@ const setGamesRelation = () => {
|
|
|
platforms: selectedGames,
|
|
platforms: selectedGames,
|
|
|
timestamp: selectedGames.polymarket.timestamp,
|
|
timestamp: selectedGames.polymarket.timestamp,
|
|
|
};
|
|
};
|
|
|
- axios.post('/api/games/set_relation', gameRelation)
|
|
|
|
|
|
|
+ api.post('/api/games/set_relation', gameRelation)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
if (res.data.statusCode === 200) {
|
|
if (res.data.statusCode === 200) {
|
|
|
message.success('添加成功');
|
|
message.success('添加成功');
|
|
@@ -94,7 +94,7 @@ const setGamesRelation = () => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const removeGamesRelation = (relation) => {
|
|
const removeGamesRelation = (relation) => {
|
|
|
- axios.post('/api/games/remove_relation', { id: relation.id })
|
|
|
|
|
|
|
+ api.post('/api/games/remove_relation', { id: relation.id })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
if (res.data.statusCode === 200) {
|
|
if (res.data.statusCode === 200) {
|
|
|
message.success('删除成功');
|
|
message.success('删除成功');
|
|
@@ -111,7 +111,7 @@ const removeGamesRelation = (relation) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const updateGamesRelations = async () => {
|
|
const updateGamesRelations = async () => {
|
|
|
- return axios.get('/api/games/get_relations')
|
|
|
|
|
|
|
+ return api.get('/api/games/get_relations')
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
if (res.data.statusCode === 200) {
|
|
if (res.data.statusCode === 200) {
|
|
|
gamesRelations.value = res.data.data;
|
|
gamesRelations.value = res.data.data;
|
|
@@ -390,4 +390,4 @@ onUnmounted(() => {
|
|
|
.game-date-time {
|
|
.game-date-time {
|
|
|
color: #666;
|
|
color: #666;
|
|
|
}
|
|
}
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|