张善主

feat(金刚卡):点击跳转到专题页

... ... @@ -323,6 +323,8 @@ export class ProcessUtils {
extra: {
relType: content?.relType,
relId: content?.relId,
extra: content?.extra,
title: content?.newsTitle
} as ExtraDTO
} as Params,
};
... ...
... ... @@ -130,8 +130,6 @@ export { LiveInfoDTO } from './src/main/ets/bean/detail/LiveInfoDTO';
export { postRecommendListParams } from './src/main/ets/bean/detail/postRecommendListParams';
export { postThemeListParams } from './src/main/ets/bean/detail/postThemeListParams';
export { LiveDTO } from './src/main/ets/bean/peoples/LiveDTO';
export { contentVideosDTO } from './src/main/ets/bean/content/contentVideosDTO';
... ... @@ -165,3 +163,7 @@ export {
AttentionBatchDTO,
CreatorDTO
} from './src/main/ets/bean/peoples/AttentionBatchDTO';
export { GoldenPositionExtraBean } from './src/main/ets/bean/content/GoldenPositionExtraBean';
export { ClassBean } from './src/main/ets/bean/content/ClassBean';
export { CreatorsBean } from './src/main/ets/bean/content/CreatorsBean';
... ...
... ... @@ -17,4 +17,6 @@ export interface ExtraDTO extends ItemDTO {
photoList: PhotoListBean[];
swiperIndex?: number
commentId?: string;
extra?:string
title: string
}
\ No newline at end of file
... ...
import { FullColumnImgUrlDTO } from '../detail/FullColumnImgUrlDTO';
import { LiveInfoDTO } from '../detail/LiveInfoDTO';
import { VideoInfoDTO } from '../detail/VideoInfoDTO';
import { InteractDataDTO } from './InteractDataDTO';
import { slideShows } from '../morningevening/slideShows';
import { VoiceInfoDTO } from '../detail/VoiceInfoDTO';
import { RmhInfoDTO } from '../detail/RmhInfoDTO';
import { commentInfo } from './commentInfo';
import { ArrayList } from '@kit.ArkTS';
export interface ClassBean {
secondClassifyName:string
classifyName:string
}
\ No newline at end of file
... ...
... ... @@ -82,4 +82,5 @@ export interface ContentDTO {
bottomNavId:string;
// 链接类型: 0:无链接;1:内链(文章);2:外链
openType:string
extra:string
}
\ No newline at end of file
... ...
export interface CreatorsBean {
id:number
name:string
}
\ No newline at end of file
... ...
import { ArrayList } from '@kit.ArkTS';
import { ClassBean } from './ClassBean';
import { CreatorsBean } from './CreatorsBean';
export interface GoldenPositionExtraBean {
sort:number
pageNum:number
pageSize:number
channelId:string
topicId:string
keyWord:string
aggregateType:string
poolCode:string
showPublishStartTime:string
showPublishEndTime:string
keywordsType:string
keywords:ArrayList<string>
classifys: ArrayList<ClassBean>
creatorTags: ArrayList<CreatorsBean>
}
\ No newline at end of file
... ...
export interface postThemeListParams {
sort: number;
pageNum: number;
pageSize: number;
}
\ No newline at end of file
import { ContentDTO } from 'wdBean';
import { ContentDTO , Action,GoldenPositionExtraBean} from 'wdBean';
import { CommonConstants ,ViewType} from 'wdConstant';
import PageViewModel from '../../viewmodel/PageViewModel';
import RefreshLayout from '../page/RefreshLayout';
... ... @@ -22,9 +22,14 @@ struct ThemeListPage {
currentPage: number = 1;
pageSize: number = 20;
title: string = '金刚位聚合页'
extra: string = ''
aboutToAppear(): void {
PageViewModel.postThemeList(this.sort, this.currentPage, this.pageSize).then((liveReviewDTO) => {
let par:Action = router.getParams() as Action;
let params = par?.params;
this.extra = params?.extra?.extra || '';
this.title = params?.extra?.title || '';
PageViewModel.postThemeList(this.sort, this.currentPage, this.pageSize,this.extra).then((liveReviewDTO) => {
console.log(`postThemeList${JSON.stringify(liveReviewDTO)}`)
this.data.push(...liveReviewDTO.list)
if(this.data.getDataArray().length > 0){
... ...
... ... @@ -194,7 +194,8 @@ export struct SearchResultContentComponent{
isSearch: true,
publishTimestamp:"",
bottomNavId:'',
openType:''
openType:'',
extra:''
}
this.data.push(contentDTO)
... ...
... ... @@ -22,7 +22,7 @@ import {
postExecuteLikeParams,
postInteractAccentionOperateParams,
postRecommendListParams,
postThemeListParams
GoldenPositionExtraBean
} from 'wdBean';
import { PageUIReqBean } from '../components/page/bean/PageUIReqBean';
... ... @@ -437,7 +437,7 @@ export class PageRepository {
* @param params
* @returns
* */
static postThemeList(params: postThemeListParams) {
static postThemeList(params: GoldenPositionExtraBean) {
let url = HttpUrlUtils.getThemeListUrl()
Logger.info(TAG, "postThemeList url = " + url + JSON.stringify(params))
return WDHttp.post<ResponseDTO<LiveReviewDTO>>(url, params)
... ...
... ... @@ -8,7 +8,8 @@ import {
NavigationBodyDTO,
PageDTO,
PageInfoBean,
PageInfoDTO
PageInfoDTO,
GoldenPositionExtraBean
} from 'wdBean';
import { CollectionUtils, Logger, ResourcesUtils, StringUtils } from 'wdKit';
... ... @@ -379,10 +380,13 @@ export class PageViewModel extends BaseViewModel {
})
}
async postThemeList(sort: number, pageNum: number, pageSize: number) : Promise<LiveReviewDTO> {
async postThemeList(sort: number, pageNum: number, pageSize: number,extra: string) : Promise<LiveReviewDTO> {
let bean: GoldenPositionExtraBean = JSON.parse(extra)
bean.pageNum = pageNum
bean.pageSize = pageSize
return new Promise<LiveReviewDTO>((success, error) => {
Logger.info(TAG, `postThemeList pageInfo start`);
PageRepository.postThemeList({ sort, pageNum, pageSize }).then((resDTO) => {
PageRepository.postThemeList(bean).then((resDTO) => {
if (!resDTO || !resDTO.data) {
Logger.error(TAG, 'postThemeList then navResDTO is empty');
error('resDTO is empty');
... ...