|
|
@@ -123,15 +123,19 @@ const eventMatch = () => {
|
|
|
|
|
|
GLOBAL_DATA.relationLength = relationLength;
|
|
|
|
|
|
+ /** 日志 盘口信息 */
|
|
|
const eventsLogsMap = {
|
|
|
expireEvents: [],
|
|
|
removeEvents: [],
|
|
|
noPsRelations: [],
|
|
|
};
|
|
|
+ /** 日志 End */
|
|
|
|
|
|
const passableEvents = relations.map(({ id, rel }) => {
|
|
|
const eventsMap = {};
|
|
|
const oddsMap = {};
|
|
|
+
|
|
|
+ /** 日志 没有ps关系 */
|
|
|
if (!rel.hasOwnProperty('ps')) {
|
|
|
eventsLogsMap.noPsRelations.push({
|
|
|
rel,
|
|
|
@@ -139,6 +143,8 @@ const eventMatch = () => {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
+ /** 日志 End */
|
|
|
+
|
|
|
Object.keys(rel).forEach(platform => {
|
|
|
const { leagueName, teamHomeName, teamAwayName, timestamp, stage, score, evtime, events, sptime, special } = rel[platform];
|
|
|
if (!events && !special) {
|
|
|
@@ -148,6 +154,8 @@ const eventMatch = () => {
|
|
|
eventsMap.info = { leagueName, teamHomeName, teamAwayName, id, timestamp, stage, score };
|
|
|
}
|
|
|
const { odds, evExpire, spExpire, removeCount } = extractOdds({ evtime, events, sptime, special });
|
|
|
+
|
|
|
+ /** 日志 盘口过期 */
|
|
|
if (evExpire || spExpire) {
|
|
|
eventsLogsMap.expireEvents.push({
|
|
|
rel,
|
|
|
@@ -156,6 +164,7 @@ const eventMatch = () => {
|
|
|
spExpire,
|
|
|
});
|
|
|
}
|
|
|
+ /** 日志 盘口移除 */
|
|
|
if (removeCount) {
|
|
|
eventsLogsMap.removeEvents.push({
|
|
|
rel,
|
|
|
@@ -163,6 +172,8 @@ const eventMatch = () => {
|
|
|
removeCount,
|
|
|
});
|
|
|
}
|
|
|
+ /** 日志 End */
|
|
|
+
|
|
|
Object.keys(odds).forEach(ior => {
|
|
|
if (!oddsMap[ior]) {
|
|
|
oddsMap[ior] = {};
|
|
|
@@ -173,7 +184,7 @@ const eventMatch = () => {
|
|
|
eventsMap.odds = oddsMap;
|
|
|
return eventsMap;
|
|
|
})
|
|
|
- .filter(item => item.info);
|
|
|
+ .filter(item => item?.info);
|
|
|
|
|
|
const solutions = eventsCombination(passableEvents);
|
|
|
|