|
@@ -21,19 +21,6 @@ const getSolutions = async () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const getGamesEvents = async () => {
|
|
|
|
|
- try {
|
|
|
|
|
- const data = await requestClient.get('/triangle/get_games_events');
|
|
|
|
|
- return data;
|
|
|
|
|
- }
|
|
|
|
|
- catch (error) {
|
|
|
|
|
- console.error('Failed to fetch games events:', error);
|
|
|
|
|
- message.error('获取比赛盘口失败');
|
|
|
|
|
- return {};
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
// const moveToFront = (arr, index) => {
|
|
// const moveToFront = (arr, index) => {
|
|
|
// if (index <= 0 || index >= arr.length) {
|
|
// if (index <= 0 || index >= arr.length) {
|
|
|
// return arr;
|
|
// return arr;
|
|
@@ -174,7 +161,7 @@ const formatEvents = (events, cprKeys) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const updateSolutions = async () => {
|
|
const updateSolutions = async () => {
|
|
|
- const [solutionsList, eventsList] = await Promise.all([getSolutions(), getGamesEvents()]);
|
|
|
|
|
|
|
+ const { solutions: solutionsList, gamesEvents: eventsList } = await getSolutions();
|
|
|
solutions.value = solutionsList.map(item => {
|
|
solutions.value = solutionsList.map(item => {
|
|
|
const { cpr, info, sol: { cross_type, jc_index, gold_side_a, gold_side_b, gold_side_m, win_side_a, win_side_b, win_side_m, win_average } } = item;
|
|
const { cpr, info, sol: { cross_type, jc_index, gold_side_a, gold_side_b, gold_side_m, win_side_a, win_side_b, win_side_m, win_average } } = item;
|
|
|
const cprKeys = cpr.map(item => item.k);
|
|
const cprKeys = cpr.map(item => item.k);
|