|
@@ -29,6 +29,16 @@ export class TravalContentApi extends CommonContentApi {
|
|
|
super(undefined, 17, "路线");
|
|
super(undefined, 17, "路线");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ async getTravalList(id: number) {
|
|
|
|
|
+ const res = await this.getContentDetail(id, GetContentDetailItem, 17, {
|
|
|
|
|
+ 'scenic_spots': '1',
|
|
|
|
|
+ });
|
|
|
|
|
+ if (res.scenicSpotsList && Array.isArray(res.scenicSpotsList)) {
|
|
|
|
|
+ res.scenicSpotsList = (res.scenicSpotsList as any[]).map(p => transformDataModel<TravalListItem>(TravalListItem, p));
|
|
|
|
|
+ res.keywords = (res.scenicSpotsList as any[]).map(p => p.name);
|
|
|
|
|
+ }
|
|
|
|
|
+ return res;
|
|
|
|
|
+ }
|
|
|
async getTravalRouteList(params: GetContentListParams) {
|
|
async getTravalRouteList(params: GetContentListParams) {
|
|
|
params.setSelfValues({
|
|
params.setSelfValues({
|
|
|
pid: 8768,
|
|
pid: 8768,
|