张善主

fix(专题): 请求页面数据,增加参数

... ... @@ -116,7 +116,7 @@ export struct SpacialTopicPageComponent {
let pageId = this.action.params.extra?.pageId
console.log('pageIdpageId',pageId)
if(pageId){
let pageInfoMsg = await PageRepository.fetchMorningEveningPageInfo(pageId)
let pageInfoMsg = await PageRepository.fetchMorningEveningPageInfo(pageId,contentId)
let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType)
if (detailBeans?.length > 0) {
this.contentDetailData = JSON.parse(JSON.stringify(detailBeans[0]));
... ...
... ... @@ -192,9 +192,12 @@ export class PageRepository {
/**
* 早晚报pageInfo请求
* */
static getMorningEveningPageInfoUrl(pageId: string) {
static getMorningEveningPageInfoUrl(pageId: string,topicId:string) {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.PAGE_INFO_PATH;
url = url + "?pageId=" + pageId;
if(!StringUtils.isEmpty(topicId)){
url = url+ "?topicId=" + topicId;
}
Logger.info(TAG, "getMorningEveningPageInfoUrl url = " + url)
return url;
}
... ... @@ -392,8 +395,8 @@ export class PageRepository {
/**
* 获取早晚报pageInfo
* */
static fetchMorningEveningPageInfo(pageId: string) {
let url = PageRepository.getMorningEveningPageInfoUrl(pageId)
static fetchMorningEveningPageInfo(pageId: string,topicId:string) {
let url = PageRepository.getMorningEveningPageInfoUrl(pageId,topicId)
return WDHttp.get<ResponseDTO<PageInfoBean>>(url)
};
... ... @@ -418,7 +421,7 @@ export class PageRepository {
* 获取播报pageInfo
* */
static fetchBroadcastPageInfo(pageId: string) {
let url = PageRepository.getMorningEveningPageInfoUrl(pageId)
let url = PageRepository.getMorningEveningPageInfoUrl(pageId,'')
return WDHttp.get<ResponseDTO<PageInfoBean>>(url)
};
... ...
... ... @@ -9,7 +9,7 @@ export class BroadcastViewModel {
static async getBroadcastViewPageInfo(pageId: string): Promise<PageInfoBean> {
return new Promise<PageInfoBean>((success, error) => {
Logger.info(TAG, `getBroadcastViewPageInfo pageInfo start`);
PageRepository.fetchMorningEveningPageInfo(pageId).then((resDTO: ResponseDTO<PageInfoBean>) => {
PageRepository.fetchMorningEveningPageInfo(pageId,'').then((resDTO: ResponseDTO<PageInfoBean>) => {
if (!resDTO || !resDTO.data) {
Logger.error(TAG, 'getBroadcastViewPageInfo then navResDTO is empty');
error('resDTO is empty');
... ...
... ... @@ -36,7 +36,7 @@ export class MorningEveningViewModel {
static async getMorningEveningPageInfo(pageId: string): Promise<PageInfoBean> {
return new Promise<PageInfoBean>((success, error) => {
Logger.info(TAG, `getMorningEveningPageInfo pageInfo start`);
PageRepository.fetchMorningEveningPageInfo(pageId).then((resDTO: ResponseDTO<PageInfoBean>) => {
PageRepository.fetchMorningEveningPageInfo(pageId,'').then((resDTO: ResponseDTO<PageInfoBean>) => {
if (!resDTO || !resDTO.data) {
Logger.error(TAG, 'getMorningEveningPageInfo then navResDTO is empty');
error('resDTO is empty');
... ...