Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
张善主
2024-06-18 17:37:11 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c28d245a321ae89c71ced40e80e385299365d346
c28d245a
1 parent
f539051e
fix(专题): 请求页面数据,增加参数
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
7 deletions
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/repository/PageRepository.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/BroadcastViewModel.ets
sight_harmony/features/wdComponent/src/main/ets/viewmodel/MorningEveningViewModel.ets
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
View file @
c28d245
...
...
@@ -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]));
...
...
sight_harmony/features/wdComponent/src/main/ets/repository/PageRepository.ets
View file @
c28d245
...
...
@@ -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)
};
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/BroadcastViewModel.ets
View file @
c28d245
...
...
@@ -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');
...
...
sight_harmony/features/wdComponent/src/main/ets/viewmodel/MorningEveningViewModel.ets
View file @
c28d245
...
...
@@ -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');
...
...
Please
register
or
login
to post a comment