Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
7 changed files
with
606 additions
and
105 deletions
| @@ -662,6 +662,11 @@ export class HttpUrlUtils { | @@ -662,6 +662,11 @@ export class HttpUrlUtils { | ||
| 662 | return url | 662 | return url |
| 663 | } | 663 | } |
| 664 | 664 | ||
| 665 | + static getInteractListDataUrl() { | ||
| 666 | + let url = HttpUrlUtils._hostUrl + HttpUrlUtils.INTERACT_DATA_PATH | ||
| 667 | + return url | ||
| 668 | + } | ||
| 669 | + | ||
| 665 | // static getYcgCommonHeaders(): HashMap<string, string> { | 670 | // static getYcgCommonHeaders(): HashMap<string, string> { |
| 666 | // let headers: HashMap<string, string> = new HashMap<string, string>() | 671 | // let headers: HashMap<string, string> = new HashMap<string, string>() |
| 667 | // | 672 | // |
| @@ -90,6 +90,7 @@ export struct OtherHomePageBottomCommentComponent{ | @@ -90,6 +90,7 @@ export struct OtherHomePageBottomCommentComponent{ | ||
| 90 | MinePageDatasModel.getOtherCommentListData(object,getContext(this)).then((value)=>{ | 90 | MinePageDatasModel.getOtherCommentListData(object,getContext(this)).then((value)=>{ |
| 91 | if (!this.data_comment || value.list.length == 0){ | 91 | if (!this.data_comment || value.list.length == 0){ |
| 92 | this.hasMore = false | 92 | this.hasMore = false |
| 93 | + this.isLoading = false | ||
| 93 | }else{ | 94 | }else{ |
| 94 | this.getCommentListStatus(value) | 95 | this.getCommentListStatus(value) |
| 95 | } | 96 | } |
| 1 | -import { ContentDTO, FullColumnImgUrlDTO, InteractDataDTO, RmhInfoDTO, VideoInfoDTO } from 'wdBean/Index' | 1 | +import { ContentDTO, |
| 2 | + contentListParams, | ||
| 3 | + FullColumnImgUrlDTO, InteractDataDTO, RmhInfoDTO, VideoInfoDTO } from 'wdBean/Index' | ||
| 2 | import { LiveInfoDTO } from 'wdBean/src/main/ets/bean/detail/LiveInfoDTO' | 4 | import { LiveInfoDTO } from 'wdBean/src/main/ets/bean/detail/LiveInfoDTO' |
| 3 | import { VoiceInfoDTO } from 'wdBean/src/main/ets/bean/detail/VoiceInfoDTO' | 5 | import { VoiceInfoDTO } from 'wdBean/src/main/ets/bean/detail/VoiceInfoDTO' |
| 4 | import { LazyDataSource, StringUtils } from 'wdKit/Index' | 6 | import { LazyDataSource, StringUtils } from 'wdKit/Index' |
| 5 | import SearcherAboutDataModel from '../../model/SearcherAboutDataModel' | 7 | import SearcherAboutDataModel from '../../model/SearcherAboutDataModel' |
| 8 | +import { SearchResultContentData } from '../../viewmodel/SearchResultContentData' | ||
| 9 | +import { SearchRmhDescription } from '../../viewmodel/SearchResultContentItem' | ||
| 6 | import { CardParser } from '../CardParser' | 10 | import { CardParser } from '../CardParser' |
| 7 | import { ListHasNoMoreDataUI } from '../reusable/ListHasNoMoreDataUI' | 11 | import { ListHasNoMoreDataUI } from '../reusable/ListHasNoMoreDataUI' |
| 8 | 12 | ||
| @@ -13,6 +17,7 @@ export struct SearchResultContentComponent{ | @@ -13,6 +17,7 @@ export struct SearchResultContentComponent{ | ||
| 13 | @State keywords:string = "" | 17 | @State keywords:string = "" |
| 14 | @State searchType:string = "" | 18 | @State searchType:string = "" |
| 15 | @State data: LazyDataSource<ContentDTO> = new LazyDataSource(); | 19 | @State data: LazyDataSource<ContentDTO> = new LazyDataSource(); |
| 20 | + @State data_rmh: SearchRmhDescription[] = [] | ||
| 16 | @State count:number = 0; | 21 | @State count:number = 0; |
| 17 | @State isLoading:boolean = false | 22 | @State isLoading:boolean = false |
| 18 | @State hasMore:boolean = true | 23 | @State hasMore:boolean = true |
| @@ -42,130 +47,213 @@ export struct SearchResultContentComponent{ | @@ -42,130 +47,213 @@ export struct SearchResultContentComponent{ | ||
| 42 | SearcherAboutDataModel.getSearchResultListData("20",`${this.curPageNum}`,this.searchType,this.keywords,getContext(this)).then((value)=>{ | 47 | SearcherAboutDataModel.getSearchResultListData("20",`${this.curPageNum}`,this.searchType,this.keywords,getContext(this)).then((value)=>{ |
| 43 | if (!this.data || value.list.length == 0){ | 48 | if (!this.data || value.list.length == 0){ |
| 44 | this.hasMore = false | 49 | this.hasMore = false |
| 50 | + this.isLoading = false | ||
| 45 | }else{ | 51 | }else{ |
| 46 | - value.list.forEach((value)=>{ | 52 | + if(value.list[0].dataList!=null){ |
| 53 | + this.data_rmh = value.list[0].dataList | ||
| 54 | + //TODO 查询创作者详情接口 | ||
| 47 | 55 | ||
| 48 | - let photos:FullColumnImgUrlDTO[] = [] | ||
| 49 | - if(value.data.appStyle === 4){ | ||
| 50 | - value.data.appStyleImages.split("&&").forEach((value)=>{ | ||
| 51 | - photos.push({url:value} as FullColumnImgUrlDTO) | ||
| 52 | - }) | ||
| 53 | - } | ||
| 54 | - | ||
| 55 | - //TODO 48 个赋值 | ||
| 56 | - let contentDTO:ContentDTO = { | ||
| 57 | - appStyle: value.data.appStyle + "", | ||
| 58 | - cityCode: value.data.cityCode, | ||
| 59 | - coverSize: "", | ||
| 60 | - coverType: -1, | ||
| 61 | - coverUrl: value.data.appStyleImages.split("&&")[0], | ||
| 62 | - description: value.data.description, | ||
| 63 | - districtCode: value.data.districtCode, | ||
| 64 | - endTime: value.data.endTime, | ||
| 65 | - hImageUrl: "", | ||
| 66 | - heatValue: "", | ||
| 67 | - innerUrl: "", | ||
| 68 | - landscape: Number.parseInt(value.data.landscape), | ||
| 69 | - // lengthTime:null, | ||
| 70 | - linkUrl: value.data.linkUrl, | ||
| 71 | - openLikes: Number.parseInt(value.data.openLikes), | ||
| 72 | - openUrl: "", | ||
| 73 | - pageId: value.data.pageId, | ||
| 74 | - programAuth: "", | ||
| 75 | - programId: "", | ||
| 76 | - programName: "", | ||
| 77 | - programSource: -1, | ||
| 78 | - programType: -1, | ||
| 79 | - provinceCode: value.data.provinceCode, | ||
| 80 | - showTitleEd: value.data.showTitleEd, | ||
| 81 | - showTitleIng: value.data.showTitleIng, | ||
| 82 | - showTitleNo: value.data.showTitleNo, | ||
| 83 | - startTime: value.data.startTime, | ||
| 84 | - subType: "", | ||
| 85 | - subtitle: "", | ||
| 86 | - title: value.data.title, | ||
| 87 | - vImageUrl: "", | ||
| 88 | - screenType: "", | ||
| 89 | - source: StringUtils.isEmpty(value.data.creatorName) ? value.data.sourceName : value.data.creatorName, | ||
| 90 | - objectId: "", | ||
| 91 | - objectType: value.data.type, | ||
| 92 | - channelId: value.data.channelId, | ||
| 93 | - relId: value.data.relId, | ||
| 94 | - relType: value.data.relType, | ||
| 95 | - newsTitle: value.data.titleLiteral, | ||
| 96 | - publishTime: value.data.publishTime, | ||
| 97 | - visitorComment: -1, | ||
| 98 | - fullColumnImgUrls: photos, | ||
| 99 | - newsSummary: "", | ||
| 100 | - hasMore: -1, | ||
| 101 | - slideShows: [], | ||
| 102 | - voiceInfo: {} as VoiceInfoDTO, | ||
| 103 | - tagWord: -1, | ||
| 104 | - isSelect: true, | ||
| 105 | - rmhInfo: {} as RmhInfoDTO, | ||
| 106 | - photoNum: -1, | ||
| 107 | - liveInfo: {} as LiveInfoDTO, | ||
| 108 | - videoInfo: { | ||
| 109 | - videoDuration: Number.parseInt(value.data.duration) | ||
| 110 | - } as VideoInfoDTO, | ||
| 111 | - interactData: {} as InteractDataDTO, | ||
| 112 | - corner: '', | ||
| 113 | - rmhPlatform: 0, | ||
| 114 | - newTags: '', | ||
| 115 | - isSearch: true | ||
| 116 | - } | ||
| 117 | - | ||
| 118 | - this.data.push(contentDTO) | ||
| 119 | - }) | ||
| 120 | - this.data.notifyDataReload() | ||
| 121 | - this.count = this.data.totalCount() | ||
| 122 | - if (this.data.totalCount() < value.totalCount) { | ||
| 123 | - this.curPageNum++ | ||
| 124 | - }else { | ||
| 125 | - this.hasMore = false | ||
| 126 | } | 56 | } |
| 57 | + this.getInteractData(value) | ||
| 127 | } | 58 | } |
| 128 | }).catch((err:Error)=>{ | 59 | }).catch((err:Error)=>{ |
| 129 | console.log(TAG,JSON.stringify(err)) | 60 | console.log(TAG,JSON.stringify(err)) |
| 61 | + this.isLoading = false | ||
| 130 | }) | 62 | }) |
| 131 | } | 63 | } |
| 132 | - this.isLoading = false | ||
| 133 | } | 64 | } |
| 134 | 65 | ||
| 66 | + getInteractData(resultData:SearchResultContentData){ | ||
| 67 | + if(resultData.list[0].dataList!=null){ | ||
| 68 | + resultData.list.splice(0,1) | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + let data : contentListParams = { | ||
| 72 | + contentList: [] | ||
| 73 | + } | ||
| 74 | + resultData.list.forEach((item)=>{ | ||
| 75 | + data.contentList.push({ | ||
| 76 | + contentId: item.data.id + '', | ||
| 77 | + contentType: Number.parseInt(item.data.type) | ||
| 78 | + }) | ||
| 79 | + }) | ||
| 80 | + | ||
| 81 | + SearcherAboutDataModel.getInteractListData(data,getContext(this)).then((newValue)=>{ | ||
| 82 | + newValue.forEach((item)=>{ | ||
| 83 | + resultData.list.forEach((data)=>{ | ||
| 84 | + if (item.contentId == data.data.id) { | ||
| 85 | + data.data.collectNum = item.collectNum+"" | ||
| 86 | + data.data.commentNum = item.commentNum+"" | ||
| 87 | + data.data.likeNum = item.likeNum+"" | ||
| 88 | + data.data.readNum = item.readNum+"" | ||
| 89 | + data.data.shareNum = item.shareNum+"" | ||
| 90 | + } | ||
| 91 | + }) | ||
| 92 | + }) | ||
| 93 | + | ||
| 94 | + resultData.list.forEach((value)=>{ | ||
| 95 | + let photos:FullColumnImgUrlDTO[] = [] | ||
| 96 | + if(value.data.appStyle === 4){ | ||
| 97 | + value.data.appStyleImages.split("&&").forEach((value)=>{ | ||
| 98 | + photos.push({url:value} as FullColumnImgUrlDTO) | ||
| 99 | + }) | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + //TODO 48 个赋值 | ||
| 103 | + let contentDTO:ContentDTO = { | ||
| 104 | + appStyle: value.data.appStyle + "", | ||
| 105 | + cityCode: value.data.cityCode, | ||
| 106 | + coverSize: "", | ||
| 107 | + coverType: -1, | ||
| 108 | + coverUrl: value.data.appStyleImages.split("&&")[0], | ||
| 109 | + description: value.data.description, | ||
| 110 | + districtCode: value.data.districtCode, | ||
| 111 | + endTime: value.data.endTime, | ||
| 112 | + hImageUrl: "", | ||
| 113 | + heatValue: "", | ||
| 114 | + innerUrl: "", | ||
| 115 | + landscape: Number.parseInt(value.data.landscape), | ||
| 116 | + // lengthTime:null, | ||
| 117 | + linkUrl: value.data.linkUrl, | ||
| 118 | + openLikes: Number.parseInt(value.data.openLikes), | ||
| 119 | + openUrl: "", | ||
| 120 | + pageId: value.data.pageId, | ||
| 121 | + programAuth: "", | ||
| 122 | + programId: "", | ||
| 123 | + programName: "", | ||
| 124 | + programSource: -1, | ||
| 125 | + programType: -1, | ||
| 126 | + provinceCode: value.data.provinceCode, | ||
| 127 | + showTitleEd: value.data.showTitleEd, | ||
| 128 | + showTitleIng: value.data.showTitleIng, | ||
| 129 | + showTitleNo: value.data.showTitleNo, | ||
| 130 | + startTime: value.data.startTime, | ||
| 131 | + subType: "", | ||
| 132 | + subtitle: "", | ||
| 133 | + title: value.data.title, | ||
| 134 | + vImageUrl: "", | ||
| 135 | + screenType: "", | ||
| 136 | + source: StringUtils.isEmpty(value.data.creatorName) ? value.data.sourceName : value.data.creatorName, | ||
| 137 | + objectId: "", | ||
| 138 | + objectType: value.data.type, | ||
| 139 | + channelId: value.data.channelId, | ||
| 140 | + relId: value.data.relId, | ||
| 141 | + relType: value.data.relType, | ||
| 142 | + newsTitle: value.data.titleLiteral, | ||
| 143 | + publishTime: value.data.publishTime, | ||
| 144 | + visitorComment: -1, | ||
| 145 | + fullColumnImgUrls: photos, | ||
| 146 | + newsSummary: "", | ||
| 147 | + hasMore: -1, | ||
| 148 | + slideShows: [], | ||
| 149 | + voiceInfo: {} as VoiceInfoDTO, | ||
| 150 | + tagWord: -1, | ||
| 151 | + isSelect: true, | ||
| 152 | + rmhInfo: {} as RmhInfoDTO, | ||
| 153 | + photoNum: -1, | ||
| 154 | + liveInfo: {} as LiveInfoDTO, | ||
| 155 | + videoInfo: { | ||
| 156 | + videoDuration: Number.parseInt(value.data.duration) | ||
| 157 | + } as VideoInfoDTO, | ||
| 158 | + interactData: {} as InteractDataDTO, | ||
| 159 | + corner: '', | ||
| 160 | + rmhPlatform: 0, | ||
| 161 | + newTags: '' | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + this.data.push(contentDTO) | ||
| 165 | + }) | ||
| 166 | + this.data.notifyDataReload() | ||
| 167 | + this.count = this.data.totalCount() | ||
| 168 | + if (this.data.totalCount() < resultData.totalCount) { | ||
| 169 | + this.curPageNum++ | ||
| 170 | + }else { | ||
| 171 | + this.hasMore = false | ||
| 172 | + } | ||
| 173 | + this.isLoading = false | ||
| 174 | + }).catch((err:Error)=>{ | ||
| 175 | + console.log(TAG,"请求失败") | ||
| 176 | + this.isLoading = false | ||
| 177 | + }) | ||
| 178 | + } | ||
| 135 | 179 | ||
| 136 | build() { | 180 | build() { |
| 137 | Column() { | 181 | Column() { |
| 138 | if(this.count == 0){ | 182 | if(this.count == 0){ |
| 139 | ListHasNoMoreDataUI({style:2}) | 183 | ListHasNoMoreDataUI({style:2}) |
| 140 | }else{ | 184 | }else{ |
| 141 | - //List | ||
| 142 | - List({ space: '6lpx' }) { | ||
| 143 | - LazyForEach(this.data, (item: ContentDTO, index: number) => { | ||
| 144 | - ListItem() { | ||
| 145 | - CardParser({contentDTO:item}) | 185 | + Column(){ |
| 186 | + if (this.data_rmh!=null && this.data_rmh.length > 0) { | ||
| 187 | + //List | ||
| 188 | + List() { | ||
| 189 | + ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => { | ||
| 190 | + ListItem() { | ||
| 191 | + Column(){ | ||
| 192 | + Image($r('app.media.default_head')) | ||
| 193 | + .width('84lpx') | ||
| 194 | + .height('84lpx') | ||
| 195 | + .margin({bottom:'15lpx'}) | ||
| 196 | + Text(item.creatorName) | ||
| 197 | + .fontSize('20lpx') | ||
| 198 | + }.alignItems(HorizontalAlign.Center) | ||
| 199 | + | ||
| 200 | + }.onClick(()=>{ | ||
| 201 | + //TODO 跳转 | ||
| 202 | + }) | ||
| 203 | + .width('150lpx') | ||
| 204 | + }) | ||
| 146 | } | 205 | } |
| 147 | - .onClick(()=>{ | ||
| 148 | - //TODO 跳转 | 206 | + .cachedCount(6) |
| 207 | + .edgeEffect(EdgeEffect.None) | ||
| 208 | + .scrollBar(BarState.Off) | ||
| 209 | + .listDirection(Axis.Horizontal) | ||
| 210 | + .width('100%') | ||
| 211 | + .height('150lpx') | ||
| 212 | + .onReachEnd(()=>{ | ||
| 213 | + if(!this.isLoading){ | ||
| 214 | + //进入更多关注页 | ||
| 215 | + } | ||
| 149 | }) | 216 | }) |
| 150 | - }, (item: ContentDTO, index: number) => index.toString()) | 217 | + } |
| 218 | + //List | ||
| 219 | + List({ space: '6lpx' }) { | ||
| 220 | + LazyForEach(this.data, (item: ContentDTO, index: number) => { | ||
| 221 | + ListItem() { | ||
| 222 | + Column(){ | ||
| 223 | + CardParser({contentDTO:item}) | ||
| 224 | + if(index != this.data.totalCount()-1 ){ | ||
| 225 | + Divider() | ||
| 226 | + .width('100%') | ||
| 227 | + .height('1lpx') | ||
| 228 | + .color($r('app.color.color_F5F5F5')) | ||
| 229 | + .strokeWidth('1lpx') | ||
| 230 | + } | ||
| 231 | + } | ||
| 232 | + } | ||
| 233 | + .onClick(()=>{ | ||
| 234 | + //TODO 跳转 | ||
| 235 | + }) | ||
| 236 | + }, (item: ContentDTO, index: number) => index.toString()) | ||
| 151 | 237 | ||
| 152 | - //没有更多数据 显示提示 | ||
| 153 | - if(!this.hasMore){ | ||
| 154 | - ListItem(){ | ||
| 155 | - ListHasNoMoreDataUI() | 238 | + //没有更多数据 显示提示 |
| 239 | + if(!this.hasMore){ | ||
| 240 | + ListItem(){ | ||
| 241 | + ListHasNoMoreDataUI() | ||
| 242 | + } | ||
| 156 | } | 243 | } |
| 157 | - } | ||
| 158 | - }.cachedCount(4) | ||
| 159 | - .scrollBar(BarState.Off) | ||
| 160 | - .margin({top:'23lpx',left:'23lpx',right:'23lpx'}) | ||
| 161 | - .layoutWeight(1) | ||
| 162 | - .onReachEnd(()=>{ | ||
| 163 | - console.log(TAG,"触底了"); | ||
| 164 | - if(!this.isLoading){ | ||
| 165 | - //加载分页数据 | ||
| 166 | - this.getNewSearchResultData() | ||
| 167 | - } | ||
| 168 | - }) | 244 | + }.cachedCount(6) |
| 245 | + .edgeEffect(EdgeEffect.None) | ||
| 246 | + .scrollBar(BarState.Off) | ||
| 247 | + .margin({top:'23lpx',left:'23lpx',right:'23lpx'}) | ||
| 248 | + .layoutWeight(1) | ||
| 249 | + .onReachEnd(()=>{ | ||
| 250 | + console.log(TAG,"触底了"); | ||
| 251 | + if(!this.isLoading){ | ||
| 252 | + //加载分页数据 | ||
| 253 | + this.getNewSearchResultData() | ||
| 254 | + } | ||
| 255 | + }) | ||
| 256 | + } | ||
| 169 | } | 257 | } |
| 170 | } | 258 | } |
| 171 | .backgroundColor($r('app.color.white')) | 259 | .backgroundColor($r('app.color.white')) |
| @@ -6,6 +6,7 @@ import { SearchHistoryItem } from '../viewmodel/SearchHistoryItem'; | @@ -6,6 +6,7 @@ import { SearchHistoryItem } from '../viewmodel/SearchHistoryItem'; | ||
| 6 | import { SearchHotContentItem } from '../viewmodel/SearchHotContentItem'; | 6 | import { SearchHotContentItem } from '../viewmodel/SearchHotContentItem'; |
| 7 | import { SearchResultCountItem } from '../viewmodel/SearchResultCountItem'; | 7 | import { SearchResultCountItem } from '../viewmodel/SearchResultCountItem'; |
| 8 | import { SearchResultContentData } from '../viewmodel/SearchResultContentData'; | 8 | import { SearchResultContentData } from '../viewmodel/SearchResultContentData'; |
| 9 | +import { contentListParams, InteractDataDTO } from 'wdBean/Index'; | ||
| 9 | 10 | ||
| 10 | const TAG = "SearcherAboutDataModel" | 11 | const TAG = "SearcherAboutDataModel" |
| 11 | 12 | ||
| @@ -82,6 +83,8 @@ class SearcherAboutDataModel{ | @@ -82,6 +83,8 @@ class SearcherAboutDataModel{ | ||
| 82 | if(this.searchHistoryData.length>10){ | 83 | if(this.searchHistoryData.length>10){ |
| 83 | this.searchHistoryData.splice(10,this.searchHistoryData.length - 10) | 84 | this.searchHistoryData.splice(10,this.searchHistoryData.length - 10) |
| 84 | } | 85 | } |
| 86 | + // this.putSearchHistoryData("大家") | ||
| 87 | + // this.putSearchHistoryData("人民") | ||
| 85 | 88 | ||
| 86 | return this.searchHistoryData | 89 | return this.searchHistoryData |
| 87 | } | 90 | } |
| @@ -278,6 +281,44 @@ class SearcherAboutDataModel{ | @@ -278,6 +281,44 @@ class SearcherAboutDataModel{ | ||
| 278 | return compRes.data | 281 | return compRes.data |
| 279 | } | 282 | } |
| 280 | 283 | ||
| 284 | + /** | ||
| 285 | + * 搜索结果 展示列表(交互详情 评论收藏点赞分享数量) | ||
| 286 | + */ | ||
| 287 | + getInteractListData(data : contentListParams,context: Context): Promise<InteractDataDTO[]> { | ||
| 288 | + return new Promise<InteractDataDTO[]>((success, error) => { | ||
| 289 | + Logger.info(TAG, `getInteractListData start`); | ||
| 290 | + this.fetchInteractListData(data).then((navResDTO: ResponseDTO<InteractDataDTO[]>) => { | ||
| 291 | + if (!navResDTO || navResDTO.code != 0) { | ||
| 292 | + success(this.getInteractListDataLocal(context)) | ||
| 293 | + return | ||
| 294 | + } | ||
| 295 | + Logger.info(TAG, "getInteractListData then,SearchResultListResDTO.timeStamp:" + navResDTO.timestamp); | ||
| 296 | + let navigationBean = navResDTO.data as InteractDataDTO[] | ||
| 297 | + success(navigationBean); | ||
| 298 | + }).catch((err: Error) => { | ||
| 299 | + Logger.error(TAG, `getInteractListData catch, error.name : ${err.name}, error.message:${err.message}`); | ||
| 300 | + success(this.getInteractListDataLocal(context)) | ||
| 301 | + }) | ||
| 302 | + }) | ||
| 303 | + } | ||
| 304 | + | ||
| 305 | + fetchInteractListData(data : contentListParams) { | ||
| 306 | + let url = HttpUrlUtils.getInteractListDataUrl() | ||
| 307 | + let headers: HashMap<string, string> = HttpUrlUtils.getCommonHeaders(); | ||
| 308 | + return WDHttp.post<ResponseDTO<InteractDataDTO[]>>(url,data, headers) | ||
| 309 | + }; | ||
| 310 | + | ||
| 311 | + async getInteractListDataLocal(context: Context): Promise<InteractDataDTO[]> { | ||
| 312 | + Logger.info(TAG, `getInteractListDataLocal start`); | ||
| 313 | + let compRes: ResponseDTO<InteractDataDTO[]> | null = await ResourcesUtils.getResourcesJson<ResponseDTO<InteractDataDTO[]>>(context,'search_result_interact_list_data.json' ); | ||
| 314 | + if (!compRes || !compRes.data) { | ||
| 315 | + Logger.info(TAG, `getInteractListDataLocal compRes is empty`); | ||
| 316 | + return [] | ||
| 317 | + } | ||
| 318 | + Logger.info(TAG, `getInteractListDataLocal getResourcesJsonSync compRes : ${JSON.stringify(compRes)}`); | ||
| 319 | + return compRes.data | ||
| 320 | + } | ||
| 321 | + | ||
| 281 | 322 | ||
| 282 | } | 323 | } |
| 283 | 324 |
| @@ -4,6 +4,7 @@ import { SearchResultContentItem } from './SearchResultContentItem' | @@ -4,6 +4,7 @@ import { SearchResultContentItem } from './SearchResultContentItem' | ||
| 4 | export class SearchResultContentData{ | 4 | export class SearchResultContentData{ |
| 5 | list:SearchResultContentItem[] = [] | 5 | list:SearchResultContentItem[] = [] |
| 6 | 6 | ||
| 7 | + | ||
| 7 | keyword:string = "" | 8 | keyword:string = "" |
| 8 | pageNum: number = 0 | 9 | pageNum: number = 0 |
| 9 | pageSize: number = 20 | 10 | pageSize: number = 20 |
| 1 | 1 | ||
| 2 | export class SearchResultContentItem{ | 2 | export class SearchResultContentItem{ |
| 3 | data:SearchDescription = new SearchDescription() | 3 | data:SearchDescription = new SearchDescription() |
| 4 | + dataList:SearchRmhDescription[] = [] | ||
| 4 | resultType:string = "" | 5 | resultType:string = "" |
| 5 | } | 6 | } |
| 6 | 7 | ||
| @@ -172,6 +173,180 @@ class SearchDescription{ | @@ -172,6 +173,180 @@ class SearchDescription{ | ||
| 172 | sourceName: string = "" | 173 | sourceName: string = "" |
| 173 | shareImageBucket: string = "" | 174 | shareImageBucket: string = "" |
| 174 | landscape: string = "" | 175 | landscape: string = "" |
| 176 | + collectNum: string = "" | ||
| 177 | + commentNum: string = "" | ||
| 178 | + likeNum: string= "" | ||
| 179 | + readNum: string= "" | ||
| 180 | + shareNum: string= "" | ||
| 175 | 181 | ||
| 182 | +} | ||
| 176 | 183 | ||
| 184 | +export class SearchRmhDescription{ | ||
| 185 | + likeEnable: string= "" | ||
| 186 | + previewUri: string= "" | ||
| 187 | + firstFrameImageBucket: string= "" | ||
| 188 | + appImg: string= "" | ||
| 189 | + onlineStatus: string= "" | ||
| 190 | + createUserName: string= "" | ||
| 191 | + contentCheck: string= "" | ||
| 192 | + type: string= "" | ||
| 193 | + titleOsst: string= "" | ||
| 194 | + coverHImageBucket: string= "" | ||
| 195 | + shareImageUri: string= "" | ||
| 196 | + searchTypeInt: string= "" | ||
| 197 | + authIcon: string= "" | ||
| 198 | + id: string= "" | ||
| 199 | + newOld: string= "" | ||
| 200 | + seoTags: string= "" | ||
| 201 | + publishTime: string= "" | ||
| 202 | + feedControl: string= "" | ||
| 203 | + saveType: string= "" | ||
| 204 | + userTypeInt: string= "" | ||
| 205 | + userOrigin: string= "" | ||
| 206 | + creatorType: string= "" | ||
| 207 | + planStartTime: string= "" | ||
| 208 | + waresSwitch: string= "" | ||
| 209 | + introductionLiteral: string= "" | ||
| 210 | + topicType: string= "" | ||
| 211 | + hotFlag: string= "" | ||
| 212 | + coverUrl: string= "" | ||
| 213 | + itemId: string= "" | ||
| 214 | + titleEn: string= "" | ||
| 215 | + matrixId: string= "" | ||
| 216 | + tplId: string= "" | ||
| 217 | + joinActivity: string= "" | ||
| 218 | + status: string= "" | ||
| 219 | + headerPhotoUrl: string= "" | ||
| 220 | + zhSearch: string= "" | ||
| 221 | + activityControl: string= "" | ||
| 222 | + city: string= "" | ||
| 223 | + showTitleIng: string= "" | ||
| 224 | + shareFlag: string= "" | ||
| 225 | + creatorName: string= "" | ||
| 226 | + className: string= "" | ||
| 227 | + showTitleNo: string= "" | ||
| 228 | + liveSwitch: string= "" | ||
| 229 | + likesStyle: string= "" | ||
| 230 | + dataKey: string= "" | ||
| 231 | + search: string= "" | ||
| 232 | + puserId: string= "" | ||
| 233 | + top: string= "" | ||
| 234 | + titleLiteral: string= "" | ||
| 235 | + countryCode: string= "" | ||
| 236 | + startTime: string= "" | ||
| 237 | + shareDescription: string= "" | ||
| 238 | + channelId: string= "" | ||
| 239 | + openComment: string= "" | ||
| 240 | + creatorClassify: string= "" | ||
| 241 | + previewBucket: string= "" | ||
| 242 | + picCount: string= "" | ||
| 243 | + recommendControl: string= "" | ||
| 244 | + creatorNameLiteral: string= "" | ||
| 245 | + subjects: string= "" | ||
| 246 | + updateUser: string= "" | ||
| 247 | + i: string= "" | ||
| 248 | + updateTime: string= "" | ||
| 249 | + userId: string= "" | ||
| 250 | + showTitleEd: string= "" | ||
| 251 | + authTo: string= "" | ||
| 252 | + rmhPlatformInt: string= "" | ||
| 253 | + giftEnable: string= "" | ||
| 254 | + titleEnosst: string= "" | ||
| 255 | + shareCoverUrl: string= "" | ||
| 256 | + deleted: string= "" | ||
| 257 | + zhOperateFlag: string= "" | ||
| 258 | + shareTitle: string= "" | ||
| 259 | + scrollUpdated: string= "" | ||
| 260 | + createTime: string= "" | ||
| 261 | + creatorBan: string= "" | ||
| 262 | + publishTimeInt: string= "" | ||
| 263 | + organization: string= "" | ||
| 264 | + channelName: string= "" | ||
| 265 | + createUser: string= "" | ||
| 266 | + currentPoliticsFlag: string= "" | ||
| 267 | + endTime: string= "" | ||
| 268 | + sourceId: string= "" | ||
| 269 | + country: string= "" | ||
| 270 | + secondClassify: string= "" | ||
| 271 | + createUserId: string= "" | ||
| 272 | + firstFrameImageUri: string= "" | ||
| 273 | + pubTime: string= "" | ||
| 274 | + openLikes: string= "" | ||
| 275 | + contentText: string= "" | ||
| 276 | + relType: string= "" | ||
| 277 | + authImg: string= "" | ||
| 278 | + roomId: string= "" | ||
| 279 | + nameLiteral: string= "" | ||
| 280 | + mainControl: string= "" | ||
| 281 | + coverVImageBucket: string= "" | ||
| 282 | + linkUrl: string= "" | ||
| 283 | + openDownload: string= "" | ||
| 284 | + zhChannelPageImg: string= "" | ||
| 285 | + appStandImg: string= "" | ||
| 286 | + shareSummary: string= "" | ||
| 287 | + firstPublishTimeInt: string= "" | ||
| 288 | + rmhPlatform: string= "" | ||
| 289 | + creatorNameOsst: string= "" | ||
| 290 | + searchType: string= "" | ||
| 291 | + author: string= "" | ||
| 292 | + askAnswerFlag: string= "" | ||
| 293 | + seoTagName: string= "" | ||
| 294 | + weight: string= "" | ||
| 295 | + pageId: string= "" | ||
| 296 | + firstPublishTime: string= "" | ||
| 297 | + coverVImageUri: string= "" | ||
| 298 | + publishType: string= "" | ||
| 299 | + isVr: string= "" | ||
| 300 | + name: string= "" | ||
| 301 | + shareUrl: string= "" | ||
| 302 | + userType: string= "" | ||
| 303 | + firstProcessTime: string= "" | ||
| 304 | + hasRecord: string= "" | ||
| 305 | + shareTitleOsst: string= "" | ||
| 306 | + classify: string= "" | ||
| 307 | + itemType: string= "" | ||
| 308 | + nameOsst: string= "" | ||
| 309 | + districtCode: string= "" | ||
| 310 | + hidden: string= "" | ||
| 311 | + cityCode: string= "" | ||
| 312 | + liveType: string= "" | ||
| 313 | + appStyleImages: string= "" | ||
| 314 | + titleShow: string= "" | ||
| 315 | + cornerMark: string= "" | ||
| 316 | + creatorId: string= "" | ||
| 317 | + levelScore: string= "" | ||
| 318 | + description: string= "" | ||
| 319 | + liveStartTime: string= "" | ||
| 320 | + likeStyle: string= "" | ||
| 321 | + title: string= "" | ||
| 322 | + content: string= "" | ||
| 323 | + platform: string= "" | ||
| 324 | + duration: string= "" | ||
| 325 | + shareDescriptionLiteral: string= "" | ||
| 326 | + createTimeInt: string= "" | ||
| 327 | + liveEndTime: string= "" | ||
| 328 | + topicTemplate: string= "" | ||
| 329 | + barrageEnable: string= "" | ||
| 330 | + introduction: string= "" | ||
| 331 | + notice: string= "" | ||
| 332 | + shareTitleLiteral: string= "" | ||
| 333 | + coverHImageUri: string= "" | ||
| 334 | + relId: string= "" | ||
| 335 | + classCode: string= "" | ||
| 336 | + grayScale: string= "" | ||
| 337 | + appStyle: string= "" | ||
| 338 | + authTitle: string= "" | ||
| 339 | + provinceCode: string= "" | ||
| 340 | + tenancy: string= "" | ||
| 341 | + platformId: string= "" | ||
| 342 | + classSubName: string= "" | ||
| 343 | + recommended: string= "" | ||
| 344 | + descriptionLiteral: string= "" | ||
| 345 | + banControl: string= "" | ||
| 346 | + auditingStatus: string= "" | ||
| 347 | + planEndTime: string= "" | ||
| 348 | + speakControl: string= "" | ||
| 349 | + sourceName: string= "" | ||
| 350 | + shareImageBucket: string= "" | ||
| 351 | + landscape: string= "" | ||
| 177 | } | 352 | } |
sight_harmony/products/phone/src/main/resources/rawfile/search_result_interact_list_data.json
0 → 100644
| 1 | +{ | ||
| 2 | + "code": "0", | ||
| 3 | + "data": [ | ||
| 4 | + { | ||
| 5 | + "collectNum": 1, | ||
| 6 | + "commentNum": 1, | ||
| 7 | + "contentId": "30044118767", | ||
| 8 | + "contentType": 8, | ||
| 9 | + "likeNum": 20, | ||
| 10 | + "readNum": 7839, | ||
| 11 | + "shareNum": 1 | ||
| 12 | + }, | ||
| 13 | + { | ||
| 14 | + "collectNum": 0, | ||
| 15 | + "commentNum": 0, | ||
| 16 | + "contentId": "30043914123", | ||
| 17 | + "contentType": 8, | ||
| 18 | + "likeNum": 20, | ||
| 19 | + "readNum": 4986, | ||
| 20 | + "shareNum": 2 | ||
| 21 | + }, | ||
| 22 | + { | ||
| 23 | + "collectNum": 0, | ||
| 24 | + "commentNum": 0, | ||
| 25 | + "contentId": "30044329241", | ||
| 26 | + "contentType": 8, | ||
| 27 | + "likeNum": 0, | ||
| 28 | + "readNum": 416, | ||
| 29 | + "shareNum": 0 | ||
| 30 | + }, | ||
| 31 | + { | ||
| 32 | + "collectNum": 0, | ||
| 33 | + "commentNum": 2, | ||
| 34 | + "contentId": "30044323528", | ||
| 35 | + "contentType": 8, | ||
| 36 | + "likeNum": 3, | ||
| 37 | + "readNum": 1139, | ||
| 38 | + "shareNum": 4 | ||
| 39 | + }, | ||
| 40 | + { | ||
| 41 | + "collectNum": 0, | ||
| 42 | + "commentNum": 0, | ||
| 43 | + "contentId": "30044318896", | ||
| 44 | + "contentType": 8, | ||
| 45 | + "likeNum": 0, | ||
| 46 | + "readNum": 1266, | ||
| 47 | + "shareNum": 1 | ||
| 48 | + }, | ||
| 49 | + { | ||
| 50 | + "collectNum": 11, | ||
| 51 | + "commentNum": 13, | ||
| 52 | + "contentId": "30044318735", | ||
| 53 | + "contentType": 8, | ||
| 54 | + "likeNum": 12, | ||
| 55 | + "readNum": 3842, | ||
| 56 | + "shareNum": 0 | ||
| 57 | + }, | ||
| 58 | + { | ||
| 59 | + "collectNum": 0, | ||
| 60 | + "commentNum": 0, | ||
| 61 | + "contentId": "30044303875", | ||
| 62 | + "contentType": 8, | ||
| 63 | + "likeNum": 0, | ||
| 64 | + "readNum": 2689, | ||
| 65 | + "shareNum": 0 | ||
| 66 | + }, | ||
| 67 | + { | ||
| 68 | + "collectNum": 0, | ||
| 69 | + "commentNum": 0, | ||
| 70 | + "contentId": "30044210715", | ||
| 71 | + "contentType": 8, | ||
| 72 | + "likeNum": 0, | ||
| 73 | + "readNum": 173, | ||
| 74 | + "shareNum": 0 | ||
| 75 | + }, | ||
| 76 | + { | ||
| 77 | + "collectNum": 0, | ||
| 78 | + "commentNum": 0, | ||
| 79 | + "contentId": "30002401426", | ||
| 80 | + "contentType": 8, | ||
| 81 | + "likeNum": 0, | ||
| 82 | + "readNum": 9002, | ||
| 83 | + "shareNum": 1 | ||
| 84 | + }, | ||
| 85 | + { | ||
| 86 | + "collectNum": 0, | ||
| 87 | + "commentNum": 0, | ||
| 88 | + "contentId": "30044297214", | ||
| 89 | + "contentType": 8, | ||
| 90 | + "likeNum": 20, | ||
| 91 | + "readNum": 3079, | ||
| 92 | + "shareNum": 6 | ||
| 93 | + }, | ||
| 94 | + { | ||
| 95 | + "collectNum": 0, | ||
| 96 | + "commentNum": 0, | ||
| 97 | + "contentId": "30002735426", | ||
| 98 | + "contentType": 8, | ||
| 99 | + "likeNum": 0, | ||
| 100 | + "readNum": 3816, | ||
| 101 | + "shareNum": 0 | ||
| 102 | + }, | ||
| 103 | + { | ||
| 104 | + "collectNum": 5, | ||
| 105 | + "commentNum": 1, | ||
| 106 | + "contentId": "30002891779", | ||
| 107 | + "contentType": 8, | ||
| 108 | + "likeNum": 2, | ||
| 109 | + "readNum": 30474, | ||
| 110 | + "shareNum": 4 | ||
| 111 | + }, | ||
| 112 | + { | ||
| 113 | + "collectNum": 0, | ||
| 114 | + "commentNum": 4, | ||
| 115 | + "contentId": "30044242849", | ||
| 116 | + "contentType": 8, | ||
| 117 | + "likeNum": 4, | ||
| 118 | + "readNum": 1099, | ||
| 119 | + "shareNum": 4 | ||
| 120 | + }, | ||
| 121 | + { | ||
| 122 | + "collectNum": 0, | ||
| 123 | + "commentNum": 0, | ||
| 124 | + "contentId": "30044064967", | ||
| 125 | + "contentType": 8, | ||
| 126 | + "likeNum": 9, | ||
| 127 | + "readNum": 63139, | ||
| 128 | + "shareNum": 5 | ||
| 129 | + }, | ||
| 130 | + { | ||
| 131 | + "collectNum": 0, | ||
| 132 | + "commentNum": 0, | ||
| 133 | + "contentId": "30044214313", | ||
| 134 | + "contentType": 8, | ||
| 135 | + "likeNum": 1, | ||
| 136 | + "readNum": 5966, | ||
| 137 | + "shareNum": 1 | ||
| 138 | + }, | ||
| 139 | + { | ||
| 140 | + "collectNum": 0, | ||
| 141 | + "commentNum": 0, | ||
| 142 | + "contentId": "30044174144", | ||
| 143 | + "contentType": 8, | ||
| 144 | + "likeNum": 20, | ||
| 145 | + "readNum": 5150, | ||
| 146 | + "shareNum": 0 | ||
| 147 | + }, | ||
| 148 | + { | ||
| 149 | + "collectNum": 0, | ||
| 150 | + "commentNum": 0, | ||
| 151 | + "contentId": "30044036728", | ||
| 152 | + "contentType": 8, | ||
| 153 | + "likeNum": 20, | ||
| 154 | + "readNum": 4217, | ||
| 155 | + "shareNum": 0 | ||
| 156 | + }, | ||
| 157 | + { | ||
| 158 | + "collectNum": 3, | ||
| 159 | + "commentNum": 0, | ||
| 160 | + "contentId": "30044123091", | ||
| 161 | + "contentType": 8, | ||
| 162 | + "likeNum": 20, | ||
| 163 | + "readNum": 16697, | ||
| 164 | + "shareNum": 0 | ||
| 165 | + }, | ||
| 166 | + { | ||
| 167 | + "collectNum": 0, | ||
| 168 | + "commentNum": 0, | ||
| 169 | + "contentId": "30044055254", | ||
| 170 | + "contentType": 8, | ||
| 171 | + "likeNum": 20, | ||
| 172 | + "readNum": 11551, | ||
| 173 | + "shareNum": 0 | ||
| 174 | + }, | ||
| 175 | + { | ||
| 176 | + "collectNum": 0, | ||
| 177 | + "commentNum": 0, | ||
| 178 | + "contentId": "30043994115", | ||
| 179 | + "contentType": 8, | ||
| 180 | + "likeNum": 0, | ||
| 181 | + "readNum": 2370, | ||
| 182 | + "shareNum": 3 | ||
| 183 | + } | ||
| 184 | + ], | ||
| 185 | + "message": "Success", | ||
| 186 | + "meta": null, | ||
| 187 | + "requestId": "", | ||
| 188 | + "success": true, | ||
| 189 | + "timestamp": 1712889166521 | ||
| 190 | +} |
-
Please register or login to post a comment