Showing
4 changed files
with
10 additions
and
7 deletions
| @@ -116,7 +116,7 @@ export struct SpacialTopicPageComponent { | @@ -116,7 +116,7 @@ export struct SpacialTopicPageComponent { | ||
| 116 | let pageId = this.action.params.extra?.pageId | 116 | let pageId = this.action.params.extra?.pageId |
| 117 | console.log('pageIdpageId',pageId) | 117 | console.log('pageIdpageId',pageId) |
| 118 | if(pageId){ | 118 | if(pageId){ |
| 119 | - let pageInfoMsg = await PageRepository.fetchMorningEveningPageInfo(pageId) | 119 | + let pageInfoMsg = await PageRepository.fetchMorningEveningPageInfo(pageId,contentId) |
| 120 | let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType) | 120 | let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType) |
| 121 | if (detailBeans?.length > 0) { | 121 | if (detailBeans?.length > 0) { |
| 122 | this.contentDetailData = JSON.parse(JSON.stringify(detailBeans[0])); | 122 | this.contentDetailData = JSON.parse(JSON.stringify(detailBeans[0])); |
| @@ -192,9 +192,12 @@ export class PageRepository { | @@ -192,9 +192,12 @@ export class PageRepository { | ||
| 192 | /** | 192 | /** |
| 193 | * 早晚报pageInfo请求 | 193 | * 早晚报pageInfo请求 |
| 194 | * */ | 194 | * */ |
| 195 | - static getMorningEveningPageInfoUrl(pageId: string) { | 195 | + static getMorningEveningPageInfoUrl(pageId: string,topicId:string) { |
| 196 | let url = HttpUrlUtils.getHost() + HttpUrlUtils.PAGE_INFO_PATH; | 196 | let url = HttpUrlUtils.getHost() + HttpUrlUtils.PAGE_INFO_PATH; |
| 197 | url = url + "?pageId=" + pageId; | 197 | url = url + "?pageId=" + pageId; |
| 198 | + if(!StringUtils.isEmpty(topicId)){ | ||
| 199 | + url = url+ "?topicId=" + topicId; | ||
| 200 | + } | ||
| 198 | Logger.info(TAG, "getMorningEveningPageInfoUrl url = " + url) | 201 | Logger.info(TAG, "getMorningEveningPageInfoUrl url = " + url) |
| 199 | return url; | 202 | return url; |
| 200 | } | 203 | } |
| @@ -392,8 +395,8 @@ export class PageRepository { | @@ -392,8 +395,8 @@ export class PageRepository { | ||
| 392 | /** | 395 | /** |
| 393 | * 获取早晚报pageInfo | 396 | * 获取早晚报pageInfo |
| 394 | * */ | 397 | * */ |
| 395 | - static fetchMorningEveningPageInfo(pageId: string) { | ||
| 396 | - let url = PageRepository.getMorningEveningPageInfoUrl(pageId) | 398 | + static fetchMorningEveningPageInfo(pageId: string,topicId:string) { |
| 399 | + let url = PageRepository.getMorningEveningPageInfoUrl(pageId,topicId) | ||
| 397 | return WDHttp.get<ResponseDTO<PageInfoBean>>(url) | 400 | return WDHttp.get<ResponseDTO<PageInfoBean>>(url) |
| 398 | }; | 401 | }; |
| 399 | 402 | ||
| @@ -418,7 +421,7 @@ export class PageRepository { | @@ -418,7 +421,7 @@ export class PageRepository { | ||
| 418 | * 获取播报pageInfo | 421 | * 获取播报pageInfo |
| 419 | * */ | 422 | * */ |
| 420 | static fetchBroadcastPageInfo(pageId: string) { | 423 | static fetchBroadcastPageInfo(pageId: string) { |
| 421 | - let url = PageRepository.getMorningEveningPageInfoUrl(pageId) | 424 | + let url = PageRepository.getMorningEveningPageInfoUrl(pageId,'') |
| 422 | return WDHttp.get<ResponseDTO<PageInfoBean>>(url) | 425 | return WDHttp.get<ResponseDTO<PageInfoBean>>(url) |
| 423 | }; | 426 | }; |
| 424 | 427 |
| @@ -9,7 +9,7 @@ export class BroadcastViewModel { | @@ -9,7 +9,7 @@ export class BroadcastViewModel { | ||
| 9 | static async getBroadcastViewPageInfo(pageId: string): Promise<PageInfoBean> { | 9 | static async getBroadcastViewPageInfo(pageId: string): Promise<PageInfoBean> { |
| 10 | return new Promise<PageInfoBean>((success, error) => { | 10 | return new Promise<PageInfoBean>((success, error) => { |
| 11 | Logger.info(TAG, `getBroadcastViewPageInfo pageInfo start`); | 11 | Logger.info(TAG, `getBroadcastViewPageInfo pageInfo start`); |
| 12 | - PageRepository.fetchMorningEveningPageInfo(pageId).then((resDTO: ResponseDTO<PageInfoBean>) => { | 12 | + PageRepository.fetchMorningEveningPageInfo(pageId,'').then((resDTO: ResponseDTO<PageInfoBean>) => { |
| 13 | if (!resDTO || !resDTO.data) { | 13 | if (!resDTO || !resDTO.data) { |
| 14 | Logger.error(TAG, 'getBroadcastViewPageInfo then navResDTO is empty'); | 14 | Logger.error(TAG, 'getBroadcastViewPageInfo then navResDTO is empty'); |
| 15 | error('resDTO is empty'); | 15 | error('resDTO is empty'); |
| @@ -36,7 +36,7 @@ export class MorningEveningViewModel { | @@ -36,7 +36,7 @@ export class MorningEveningViewModel { | ||
| 36 | static async getMorningEveningPageInfo(pageId: string): Promise<PageInfoBean> { | 36 | static async getMorningEveningPageInfo(pageId: string): Promise<PageInfoBean> { |
| 37 | return new Promise<PageInfoBean>((success, error) => { | 37 | return new Promise<PageInfoBean>((success, error) => { |
| 38 | Logger.info(TAG, `getMorningEveningPageInfo pageInfo start`); | 38 | Logger.info(TAG, `getMorningEveningPageInfo pageInfo start`); |
| 39 | - PageRepository.fetchMorningEveningPageInfo(pageId).then((resDTO: ResponseDTO<PageInfoBean>) => { | 39 | + PageRepository.fetchMorningEveningPageInfo(pageId,'').then((resDTO: ResponseDTO<PageInfoBean>) => { |
| 40 | if (!resDTO || !resDTO.data) { | 40 | if (!resDTO || !resDTO.data) { |
| 41 | Logger.error(TAG, 'getMorningEveningPageInfo then navResDTO is empty'); | 41 | Logger.error(TAG, 'getMorningEveningPageInfo then navResDTO is empty'); |
| 42 | error('resDTO is empty'); | 42 | error('resDTO is empty'); |
-
Please register or login to post a comment