|
|
@@ -63,3 +63,21 @@ export const getEventsByIds = (ids) => {
|
|
|
|
|
|
return normalizedIds.map(id => gamesMap[id]).filter(Boolean);
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 获取盘口详情
|
|
|
+ * @param {*} ior
|
|
|
+ * @param {*} id
|
|
|
+ * @returns
|
|
|
+ */
|
|
|
+export const getIorInfo = async(ior, id) => {
|
|
|
+ if (!id || !ior) {
|
|
|
+ return Promise.reject({ cause: 400, message: 'id and ior are required', data: { id, ior } });
|
|
|
+ }
|
|
|
+ const { gamesMap } = GLOBAL_DATA;
|
|
|
+ const iorInfo = parseIorDetail(ior, id, gamesMap);
|
|
|
+ if (iorInfo.cause === 400) {
|
|
|
+ return Promise.reject({ cause: 400, message: iorInfo.message, data: { id, ior } });
|
|
|
+ }
|
|
|
+ return Promise.resolve(iorInfo);
|
|
|
+}
|