|
@@ -31,9 +31,9 @@ const PS_IOR_KEYS = [
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
// 测试环境
|
|
// 测试环境
|
|
|
-// const BASE_URL = 'https://dev.api.czxd8.com/api/p';
|
|
|
|
|
|
|
+// const BASE_API_URL = 'https://dev.api.czxd8.com/api/p';
|
|
|
const IS_DEV = process.env.NODE_ENV == 'development';
|
|
const IS_DEV = process.env.NODE_ENV == 'development';
|
|
|
-const BASE_URL = IS_DEV ? 'https://api.qboss.vip/api/p' : 'http://172.17.222.37/api/p';
|
|
|
|
|
|
|
+const BASE_API_URL = IS_DEV ? 'https://api.qboss.vip/api' : 'http://172.17.222.37/api';
|
|
|
|
|
|
|
|
const GAMES = {
|
|
const GAMES = {
|
|
|
Leagues: {},
|
|
Leagues: {},
|
|
@@ -77,7 +77,7 @@ const syncLeaguesList = ({ mk, leagues }) => {
|
|
|
if (IS_DEV) {
|
|
if (IS_DEV) {
|
|
|
return Logs.out('syncLeaguesList', { mk, leagues });
|
|
return Logs.out('syncLeaguesList', { mk, leagues });
|
|
|
}
|
|
}
|
|
|
- axios.post(`${BASE_URL}/syncLeague`, { mk, leagues })
|
|
|
|
|
|
|
+ axios.post(`${BASE_API_URL}/p/syncLeague`, { mk, leagues })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
// Logs.out('syncLeaguesList', res.data);
|
|
// Logs.out('syncLeaguesList', res.data);
|
|
|
})
|
|
})
|
|
@@ -114,7 +114,7 @@ const updateLeaguesList = ({ mk, leagues }) => {
|
|
|
* 获取筛选过的联赛
|
|
* 获取筛选过的联赛
|
|
|
*/
|
|
*/
|
|
|
const getFilteredLeagues = async (mk) => {
|
|
const getFilteredLeagues = async (mk) => {
|
|
|
- return axios.get(`${BASE_URL}/getLeagueTast?mk=${mk}`)
|
|
|
|
|
|
|
+ return axios.get(`${BASE_API_URL}/p/getLeagueTast?mk=${mk}`)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
return res.data.data;
|
|
@@ -130,7 +130,7 @@ const syncGamesList = ({ platform, mk, games }) => {
|
|
|
if (IS_DEV) {
|
|
if (IS_DEV) {
|
|
|
return Logs.out('syncGamesList', { platform, mk, games });
|
|
return Logs.out('syncGamesList', { platform, mk, games });
|
|
|
}
|
|
}
|
|
|
- axios.post(`${BASE_URL}/syncGames`, { platform, mk, games })
|
|
|
|
|
|
|
+ axios.post(`${BASE_API_URL}/p/syncGames`, { platform, mk, games })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
// Logs.out('syncGamesList', { platform, mk, count: games.length }, res.data);
|
|
// Logs.out('syncGamesList', { platform, mk, count: games.length }, res.data);
|
|
|
})
|
|
})
|
|
@@ -193,7 +193,7 @@ const submitOdds = ({ platform, mk, games }) => {
|
|
|
if (IS_DEV) {
|
|
if (IS_DEV) {
|
|
|
return Logs.out('syncOdds', { platform, mk, games });
|
|
return Logs.out('syncOdds', { platform, mk, games });
|
|
|
}
|
|
}
|
|
|
- axios.post(`${BASE_URL}/syncOdds`, { platform, mk, games})
|
|
|
|
|
|
|
+ axios.post(`${BASE_API_URL}/p/syncOdds`, { platform, mk, games})
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
// Logs.out('syncOdds', { platform, mk, count: games.length }, res.data);
|
|
// Logs.out('syncOdds', { platform, mk, count: games.length }, res.data);
|
|
|
})
|
|
})
|
|
@@ -444,7 +444,7 @@ const getDevGameTast = () => {
|
|
|
const fetchGamesRelation = async (mk='') => {
|
|
const fetchGamesRelation = async (mk='') => {
|
|
|
const getGameTast = Promise.all([
|
|
const getGameTast = Promise.all([
|
|
|
getDevGameTast(),
|
|
getDevGameTast(),
|
|
|
- axios.get(`${BASE_URL}/getGameTast?mk=${mk}`)
|
|
|
|
|
|
|
+ axios.get(`${BASE_API_URL}/p/getGameTast?mk=${mk}`)
|
|
|
]);
|
|
]);
|
|
|
return getGameTast.then(([res1, res2]) => {
|
|
return getGameTast.then(([res1, res2]) => {
|
|
|
const resData = res1.data ?? res2.data;
|
|
const resData = res1.data ?? res2.data;
|
|
@@ -631,7 +631,7 @@ const syncGamesResult = async (result) => {
|
|
|
if (IS_DEV) {
|
|
if (IS_DEV) {
|
|
|
return Logs.out('updateGamesResult', result);
|
|
return Logs.out('updateGamesResult', result);
|
|
|
}
|
|
}
|
|
|
- axios.post(`${BASE_URL}/syncMatchResult`, result)
|
|
|
|
|
|
|
+ axios.post(`${BASE_API_URL}/p/syncMatchResult`, result)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
// Logs.out('syncMatchResult', res.data);
|
|
// Logs.out('syncMatchResult', res.data);
|
|
|
})
|
|
})
|
|
@@ -655,7 +655,7 @@ const syncSolutions = (solutions) => {
|
|
|
if (IS_DEV) {
|
|
if (IS_DEV) {
|
|
|
return Logs.out('syncSolutions', solutions);
|
|
return Logs.out('syncSolutions', solutions);
|
|
|
}
|
|
}
|
|
|
- axios.post(`${BASE_URL}/syncDsOpportunity`, solutions)
|
|
|
|
|
|
|
+ axios.post(`${BASE_API_URL}/p/syncDsOpportunity`, solutions)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
// Logs.out('syncSolutions', res.data);
|
|
// Logs.out('syncSolutions', res.data);
|
|
|
})
|
|
})
|
|
@@ -911,7 +911,7 @@ const notifyException = (message) => {
|
|
|
return Logs.out('notifyException', { message });
|
|
return Logs.out('notifyException', { message });
|
|
|
}
|
|
}
|
|
|
const chat_id = -4800633221;
|
|
const chat_id = -4800633221;
|
|
|
- axios.get('https://api.qboss.vip/api/telegram/jump', { params: { chat_id, message } })
|
|
|
|
|
|
|
+ axios.get(`${BASE_API_URL}/telegram/jump`, { params: { chat_id, message } })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
Logs.out('notifyException', res.data);
|
|
Logs.out('notifyException', res.data);
|
|
|
})
|
|
})
|