|
@@ -27,6 +27,7 @@ export class ServiceUtilService {
|
|
const dataUser = await this.userService.fetch({ id: get(data, 'user') });
|
|
const dataUser = await this.userService.fetch({ id: get(data, 'user') });
|
|
if (dataUser) data.userInfo = { name: get(dataUser, 'name', ''), phone: get(dataUser, 'phone', '') };
|
|
if (dataUser) data.userInfo = { name: get(dataUser, 'name', ''), phone: get(dataUser, 'phone', '') };
|
|
}
|
|
}
|
|
|
|
+ return data;
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* 填充是否收藏字段: is_collection boolean类型
|
|
* 填充是否收藏字段: is_collection boolean类型
|
|
@@ -38,6 +39,7 @@ export class ServiceUtilService {
|
|
const collectionData = await this.collectionService.fetch({ user: get(user, 'id'), source: get(data, 'id') });
|
|
const collectionData = await this.collectionService.fetch({ user: get(user, 'id'), source: get(data, 'id') });
|
|
if (collectionData) data.is_collection = true;
|
|
if (collectionData) data.is_collection = true;
|
|
}
|
|
}
|
|
|
|
+ return data;
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* 填充赛事信息
|
|
* 填充赛事信息
|
|
@@ -48,6 +50,7 @@ export class ServiceUtilService {
|
|
if (!match) return;
|
|
if (!match) return;
|
|
const matchInfo = await this.matchService.fetch({ id: match });
|
|
const matchInfo = await this.matchService.fetch({ id: match });
|
|
if (matchInfo) data = { ...data, matchInfo };
|
|
if (matchInfo) data = { ...data, matchInfo };
|
|
|
|
+ return data;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|