|
@@ -42,7 +42,7 @@ const IOR_KEYS_TYPE = {
|
|
|
// 测试环境
|
|
// 测试环境
|
|
|
// const BASE_API_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_API_URL = IS_DEV ? 'https://api.qboss.vip/api' : 'http://172.17.222.37/api';
|
|
|
|
|
|
|
+const BASE_API_URL = IS_DEV ? 'https://cb.long.bid/qbapi' : 'http://172.17.222.37/api';
|
|
|
|
|
|
|
|
const GAMES = {
|
|
const GAMES = {
|
|
|
Leagues: {},
|
|
Leagues: {},
|
|
@@ -163,6 +163,7 @@ const updateLeaguesList = ({ mk, leagues, platform='ps' }) => {
|
|
|
const getFilteredLeagues = async (mk) => {
|
|
const getFilteredLeagues = async (mk) => {
|
|
|
return axios.get(`${BASE_API_URL}/p/getLeagueTast?mk=${mk ?? ''}`, { proxy: false })
|
|
return axios.get(`${BASE_API_URL}/p/getLeagueTast?mk=${mk ?? ''}`, { proxy: false })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
|
|
+ Logs.out('getFilteredLeagues', res.data);
|
|
|
if (res.data.code == 0) {
|
|
if (res.data.code == 0) {
|
|
|
return res.data.data;
|
|
return res.data.data;
|
|
|
}
|
|
}
|
|
@@ -465,7 +466,7 @@ const syncBaseEvents = ({ mk, games, outrights }) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-const updateBaseEvents = ({ games, timestamp }) => {
|
|
|
|
|
|
|
+const updateBaseEvents = ({ games, timestamp, tp='ps_9_9_1' }) => {
|
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
|
if (!games) {
|
|
if (!games) {
|
|
|
return reject(new Error('GAMES_INVALID'));
|
|
return reject(new Error('GAMES_INVALID'));
|
|
@@ -476,7 +477,6 @@ const updateBaseEvents = ({ games, timestamp }) => {
|
|
|
|
|
|
|
|
let update = 0;
|
|
let update = 0;
|
|
|
const { UpdateTimestamp } = GAMES;
|
|
const { UpdateTimestamp } = GAMES;
|
|
|
- const tp = 'ps_9_9';
|
|
|
|
|
if (!UpdateTimestamp[tp] || UpdateTimestamp[tp] < timestamp) {
|
|
if (!UpdateTimestamp[tp] || UpdateTimestamp[tp] < timestamp) {
|
|
|
UpdateTimestamp[tp] = timestamp;
|
|
UpdateTimestamp[tp] = timestamp;
|
|
|
}
|
|
}
|
|
@@ -556,6 +556,9 @@ const updateGamesEvents = ({ platform, mk, games, outrights, timestamp, tp }) =>
|
|
|
games?.forEach(game => {
|
|
games?.forEach(game => {
|
|
|
const { eventId, evtime, events, stage, retime, score, wm } = game;
|
|
const { eventId, evtime, events, stage, retime, score, wm } = game;
|
|
|
const relatedGame = relatedMap.get(eventId);
|
|
const relatedGame = relatedMap.get(eventId);
|
|
|
|
|
+ if (!relatedGame) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
const baseEvents = baseMap.get(relatedGame.baseId)?.events ?? {};
|
|
const baseEvents = baseMap.get(relatedGame.baseId)?.events ?? {};
|
|
|
compareOdds(events, baseEvents, platform);
|
|
compareOdds(events, baseEvents, platform);
|
|
|
if (relatedGame) {
|
|
if (relatedGame) {
|
|
@@ -573,6 +576,9 @@ const updateGamesEvents = ({ platform, mk, games, outrights, timestamp, tp }) =>
|
|
|
outrights?.forEach(outright => {
|
|
outrights?.forEach(outright => {
|
|
|
const { parentId, sptime, special } = outright;
|
|
const { parentId, sptime, special } = outright;
|
|
|
const relatedGame = relatedMap.get(parentId);
|
|
const relatedGame = relatedMap.get(parentId);
|
|
|
|
|
+ if (!relatedGame) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
const baseEvents = baseMap.get(relatedGame.baseId)?.events ?? {};
|
|
const baseEvents = baseMap.get(relatedGame.baseId)?.events ?? {};
|
|
|
compareOdds(special, baseEvents, platform);
|
|
compareOdds(special, baseEvents, platform);
|
|
|
if (relatedGame) {
|
|
if (relatedGame) {
|