王士厅
Showing 23 changed files with 516 additions and 196 deletions
@@ -175,3 +175,6 @@ export { ReserveItemBean } from './src/main/ets/bean/live/ReserveItemBean'; @@ -175,3 +175,6 @@ export { ReserveItemBean } from './src/main/ets/bean/live/ReserveItemBean';
175 175
176 176
177 export { FeedbackTypeBean } from './src/main/ets/bean/detail/FeedbackTypeBean'; 177 export { FeedbackTypeBean } from './src/main/ets/bean/detail/FeedbackTypeBean';
  178 +export { FeedBackParams } from './src/main/ets/bean/content/FeedBackParams';
  179 +
  180 +
@@ -85,6 +85,8 @@ export class ContentDTO implements BaseDTO { @@ -85,6 +85,8 @@ export class ContentDTO implements BaseDTO {
85 // 链接类型: 0:无链接;1:内链(文章);2:外链 85 // 链接类型: 0:无链接;1:内链(文章);2:外链
86 openType: string = ''; 86 openType: string = '';
87 extra: string = '' 87 extra: string = ''
  88 + sameContentList:ContentDTO[] = []
  89 + sameContentListJson:string = ""
88 /* 90 /*
89 本地辅助字段 91 本地辅助字段
90 */ 92 */
  1 +export interface FeedBackParams {
  2 + content:string
  3 + classifyFlagIds:string
  4 + userContact:string
  5 + userName:string
  6 + appVersion:string
  7 + appDevice:string
  8 +}
1 export interface FeedbackTypeBean { 1 export interface FeedbackTypeBean {
2 classifyName: string; 2 classifyName: string;
3 id: number; 3 id: number;
4 - isselect: boolean; 4 + isSelect: boolean;
5 } 5 }
@@ -16,6 +16,8 @@ export { LikeComponent } from "./src/main/ets/components/view/LikeComponent" @@ -16,6 +16,8 @@ export { LikeComponent } from "./src/main/ets/components/view/LikeComponent"
16 16
17 export { TopNavigationComponent } from "./src/main/ets/components/page/TopNavigationComponent" 17 export { TopNavigationComponent } from "./src/main/ets/components/page/TopNavigationComponent"
18 18
  19 +export { TopNavigationComponentNew } from "./src/main/ets/components/page/TopNavigationComponentNew"
  20 +
19 export { LabelComponent } from "./src/main/ets/components/view/LabelComponent" 21 export { LabelComponent } from "./src/main/ets/components/view/LabelComponent"
20 22
21 export { BannerComponent } from "./src/main/ets/components/view/BannerComponent" 23 export { BannerComponent } from "./src/main/ets/components/view/BannerComponent"
1 -import { FeedbackTypeBean, PhotoListBean } from 'wdBean/Index'; 1 +import { FeedBackParams, FeedbackTypeBean, PhotoListBean } from 'wdBean/Index';
2 import { AppUtils, 2 import { AppUtils,
3 DeviceUtil, 3 DeviceUtil,
4 FastClickUtil, Logger, NetworkUtil, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index'; 4 FastClickUtil, Logger, NetworkUtil, StringUtils, ToastUtils, UserDataLocal } from 'wdKit/Index';
@@ -60,9 +60,9 @@ export struct FeedBackActivity { @@ -60,9 +60,9 @@ export struct FeedBackActivity {
60 GridCol({ 60 GridCol({
61 }) { 61 }) {
62 Row(){ 62 Row(){
63 - Toggle({ type: ToggleType.Checkbox, isOn: false }) 63 + Toggle({ type: ToggleType.Checkbox, isOn: feedbackTypeBean.isSelect })
64 .onChange((select) => { 64 .onChange((select) => {
65 - feedbackTypeBean.isselect = select 65 + feedbackTypeBean.isSelect = select
66 this.canSubmit = this.checkSubmit() 66 this.canSubmit = this.checkSubmit()
67 }) 67 })
68 Text(feedbackTypeBean.classifyName) 68 Text(feedbackTypeBean.classifyName)
@@ -325,8 +325,8 @@ export struct FeedBackActivity { @@ -325,8 +325,8 @@ export struct FeedBackActivity {
325 //问题类型必选 325 //问题类型必选
326 let selectType = "" 326 let selectType = ""
327 this.feedbackTypeBeans.forEach((value) => { 327 this.feedbackTypeBeans.forEach((value) => {
328 - if(value.isselect){  
329 - selectType = selectType+"," 328 + if(value.isSelect){
  329 + selectType = selectType+value.id+","
330 } 330 }
331 }) 331 })
332 if(!StringUtils.isEmpty(selectType)){ 332 if(!StringUtils.isEmpty(selectType)){
@@ -343,29 +343,31 @@ export struct FeedBackActivity { @@ -343,29 +343,31 @@ export struct FeedBackActivity {
343 } 343 }
344 344
345 try { 345 try {
346 - let map: HashMap<String,String> = {} as HashMap<String,String>  
347 - //反馈内容  
348 - map.set("content", this.contact);  
349 - //投诉类型 id  
350 - map.set("classifyFlagIds", selectType);  
351 - if(!StringUtils.isEmpty(this.email)){ 346 + let feedBackParams: FeedBackParams = {
  347 + //反馈内容
  348 + "content": this.contact,
  349 + //投诉类型 id
  350 + "classifyFlagIds": selectType,
  351 + //设备
  352 + "appVersion": "V" + AppUtils.getAppVersionName(),
  353 + "appDevice": "harmony" + DeviceUtil.getDisplayVersion() + " " + DeviceUtil.getProductModel()
  354 + } as FeedBackParams
352 //邮箱 355 //邮箱
353 - map.set("userContact", this.email); 356 + if(!StringUtils.isEmpty(this.email)){
  357 + feedBackParams.userContact = this.email
354 } 358 }
355 //用户名称 359 //用户名称
356 - if (!StringUtils.isEmpty(UserDataLocal.getUserName())) {  
357 - map.set("userName", UserDataLocal.getUserName()); 360 + if(!StringUtils.isEmpty(UserDataLocal.getUserName())){
  361 + feedBackParams.userName = UserDataLocal.getUserName()
358 } 362 }
359 - //设备  
360 - map.set("appVersion", "V" + AppUtils.getAppVersionName());  
361 - map.set("appDevice", "harmony" + DeviceUtil.getDisplayVersion() + " " + DeviceUtil.getProductModel()); 363 +
362 // //投诉图片 364 // //投诉图片
363 // if (imageUrl.size() > 0) { 365 // if (imageUrl.size() > 0) {
364 // String[] str = imageUrl.toArray(new String[imageUrl.size()]); 366 // String[] str = imageUrl.toArray(new String[imageUrl.size()]);
365 // map.set("imageUrls", str); 367 // map.set("imageUrls", str);
366 // } 368 // }
367 - await MultiPictureDetailViewModel.feedBackCommit(map)  
368 - 369 + await MultiPictureDetailViewModel.feedBackCommit(feedBackParams)
  370 + router.back();
369 } catch (exception) { 371 } catch (exception) {
370 console.log('请求失败',JSON.stringify(exception)) 372 console.log('请求失败',JSON.stringify(exception))
371 } 373 }
@@ -40,9 +40,9 @@ export struct Card11Component { @@ -40,9 +40,9 @@ export struct Card11Component {
40 Column() { 40 Column() {
41 Stack() { 41 Stack() {
42 if (this.contentDTO.newTags) { 42 if (this.contentDTO.newTags) {
43 - Notes({ newTags: this.contentDTO.newTags }).height(27).align(Alignment.Center) 43 + Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
44 } else if (this.contentDTO.objectType == '5') { 44 } else if (this.contentDTO.objectType == '5') {
45 - Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center) 45 + Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center)
46 } 46 }
47 Text() { 47 Text() {
48 if (this.titleMarked) { 48 if (this.titleMarked) {
@@ -49,9 +49,11 @@ export struct Card2Component { @@ -49,9 +49,11 @@ export struct Card2Component {
49 Stack() { 49 Stack() {
50 //新闻标题 50 //新闻标题
51 if (this.contentDTO.newTags) { 51 if (this.contentDTO.newTags) {
52 - Notes({ newTags: this.contentDTO.newTags }) 52 + Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
  53 + //Notes({ newTags: this.contentDTO.newTags })
53 } else if (this.contentDTO.objectType == '5') { 54 } else if (this.contentDTO.objectType == '5') {
54 - Notes({ objectType: this.contentDTO.objectType }) 55 + Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center)
  56 + //Notes({ objectType: this.contentDTO.objectType })
55 } 57 }
56 58
57 Text() { 59 Text() {
@@ -45,29 +45,32 @@ export struct Card4Component { @@ -45,29 +45,32 @@ export struct Card4Component {
45 Column() { 45 Column() {
46 //body 46 //body
47 Column() { 47 Column() {
48 - //新闻标题  
49 - if (this.contentDTO.newTags) {  
50 - Notes({ newTags: this.contentDTO.newTags })  
51 - } else if (this.contentDTO.objectType == '5') {  
52 - Notes({ objectType: this.contentDTO.objectType })  
53 - }  
54 - Text() {  
55 - if (this.titleMarked) {  
56 - Span(this.str01)  
57 - Span(this.str02)  
58 - .fontColor(0xED2800)  
59 - Span(this.str03)  
60 - } else {  
61 - Span(this.contentDTO.newsTitle) 48 + Stack() {
  49 + if (this.contentDTO.newTags) {
  50 + Notes({ newTags: this.contentDTO.newTags }).height(19).align(Alignment.Center)
  51 + } else if (this.contentDTO.objectType == '5') {
  52 + Notes({ objectType: this.contentDTO.objectType }).height(19).align(Alignment.Center)
  53 + }
  54 + Text() {
  55 + if (this.titleMarked) {
  56 + Span(this.str01)
  57 + Span(this.str02)
  58 + .fontColor(0xED2800)
  59 + Span(this.str03)
  60 + } else {
  61 + Span(this.contentDTO.newsTitle)
  62 + }
62 } 63 }
63 - }  
64 .fontSize($r('app.float.font_size_18')) 64 .fontSize($r('app.float.font_size_18'))
65 .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222')) 65 .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
66 .maxLines(3) 66 .maxLines(3)
67 .textOverflow({ overflow: TextOverflow.Ellipsis }) 67 .textOverflow({ overflow: TextOverflow.Ellipsis })
68 - .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :  
69 - (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||  
70 - this.contentDTO.objectType == '5' ? 30 : 0) 68 + .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
  69 + (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
  70 + this.contentDTO.objectType == '5' ? 30 : 0)
  71 + }.alignContent(Alignment.TopStart)
  72 + //新闻标题
  73 +
71 //三图 74 //三图
72 Stack(){ 75 Stack(){
73 Row() { 76 Row() {
1 /** 1 /**
2 * More_Comp 2 * More_Comp
3 */ 3 */
  4 +import { ContentDTO } from 'wdBean/Index';
  5 +
4 const TAG: string = 'Card9Component'; 6 const TAG: string = 'Card9Component';
5 7
6 @Entry 8 @Entry
7 @Component 9 @Component
8 export struct MoreComponent { 10 export struct MoreComponent {
  11 + @State contentDTO: ContentDTO = new ContentDTO();
9 12
10 build() { 13 build() {
11 Row() { 14 Row() {
@@ -38,25 +38,32 @@ export struct AppointmentListChildComponent { @@ -38,25 +38,32 @@ export struct AppointmentListChildComponent {
38 .interpolation(ImageInterpolation.High) 38 .interpolation(ImageInterpolation.High)
39 39
40 40
41 - if (this.item.relType === 1) { 41 + if (this.item.status == "wait") {
42 Row() { 42 Row() {
43 Row() { 43 Row() {
44 Image($r('app.media.reserve_icon')) 44 Image($r('app.media.reserve_icon'))
45 - .width('42lpx')  
46 - .height('35lpx') 45 + .width('27lpx')
  46 + .height('27lpx')
47 .objectFit(ImageFit.Auto) 47 .objectFit(ImageFit.Auto)
48 .interpolation(ImageInterpolation.High) 48 .interpolation(ImageInterpolation.High)
  49 + .margin({right:"6lpx"})
49 50
50 Text("预约") 51 Text("预约")
51 .fontWeight(400) 52 .fontWeight(400)
52 - .fontSize('21lpx')  
53 - .backgroundColor($r('app.color.color_4D000000')) 53 + .fontSize('23lpx')
  54 + .textShadow({
  55 + radius: 2,
  56 + color: `rgba(0,0,0,0.3)`,
  57 + offsetY:2,
  58 + offsetX:0
  59 + })
54 .fontColor($r('app.color.white')) 60 .fontColor($r('app.color.white'))
55 .lineHeight('31lpx') 61 .lineHeight('31lpx')
56 .layoutWeight(1) 62 .layoutWeight(1)
57 - .textAlign(TextAlign.Center) 63 + .textAlign(TextAlign.Start)
58 }.width('94lpx') 64 }.width('94lpx')
59 .margin({ bottom: '15lpx', right: '15lpx' }) 65 .margin({ bottom: '15lpx', right: '15lpx' })
  66 + .alignItems(VerticalAlign.Center)
60 }.width('100%') 67 }.width('100%')
61 .height('100%') 68 .height('100%')
62 .alignItems(VerticalAlign.Bottom) 69 .alignItems(VerticalAlign.Bottom)
@@ -78,7 +85,7 @@ export struct AppointmentListChildComponent { @@ -78,7 +85,7 @@ export struct AppointmentListChildComponent {
78 .width('100%') 85 .width('100%')
79 Row() { 86 Row() {
80 Row() { 87 Row() {
81 - if (this.item.relType === 2) { 88 + if (this.item.status == "end") {
82 Image($r('app.media.play_status_history_icon')) 89 Image($r('app.media.play_status_history_icon'))
83 .objectFit(ImageFit.Auto) 90 .objectFit(ImageFit.Auto)
84 .interpolation(ImageInterpolation.High) 91 .interpolation(ImageInterpolation.High)
@@ -88,6 +95,16 @@ export struct AppointmentListChildComponent { @@ -88,6 +95,16 @@ export struct AppointmentListChildComponent {
88 Text('已结束').fontColor($r('app.color.color_999999')) 95 Text('已结束').fontColor($r('app.color.color_999999'))
89 .fontWeight('500lpx') 96 .fontWeight('500lpx')
90 .fontSize('23lpx') 97 .fontSize('23lpx')
  98 + }else if(this.item.status == "running"){
  99 + Image($r('app.media.play_status_icon'))
  100 + .objectFit(ImageFit.Auto)
  101 + .interpolation(ImageInterpolation.High)
  102 + .width('38lpx')
  103 + .height('38lpx')
  104 + .margin({ right: '12lpx' })
  105 + Text('已开始').fontColor($r('app.color.color_999999'))
  106 + .fontWeight('500lpx')
  107 + .fontSize('23lpx')
91 } else { 108 } else {
92 Image($r('app.media.play_status_icon')) 109 Image($r('app.media.play_status_icon'))
93 .objectFit(ImageFit.Auto) 110 .objectFit(ImageFit.Auto)
@@ -118,7 +135,7 @@ export struct AppointmentListChildComponent { @@ -118,7 +135,7 @@ export struct AppointmentListChildComponent {
118 135
119 Blank() 136 Blank()
120 .layoutWeight(1) 137 .layoutWeight(1)
121 - if (this.item.relType === 1) { 138 + if (this.item.status === "wait") {
122 Text(this.item.isAppointment ? "已预约" : "预约") 139 Text(this.item.isAppointment ? "已预约" : "预约")
123 .fontWeight(400) 140 .fontWeight(400)
124 .fontSize('23lpx') 141 .fontSize('23lpx')
@@ -132,8 +149,19 @@ export struct AppointmentListChildComponent { @@ -132,8 +149,19 @@ export struct AppointmentListChildComponent {
132 .onClick(() => { 149 .onClick(() => {
133 this.dialogController.open() 150 this.dialogController.open()
134 }) 151 })
  152 + }else if(this.item.status == "running"){
  153 + Text("去观看" )
  154 + .fontWeight(400)
  155 + .fontSize('23lpx')
  156 + .backgroundColor($r('app.color.color_ED2800'))
  157 + .fontColor($r('app.color.white'))
  158 + .lineHeight('31lpx')
  159 + .textAlign(TextAlign.Center)
  160 + .width('100lpx')
  161 + .height('46lpx')
  162 + .borderRadius('6lpx')
135 } else { 163 } else {
136 - Text(this.item.relType === 2 ? "去观看" : "看回放") 164 + Text("看回放")
137 .fontWeight(400) 165 .fontWeight(400)
138 .fontSize('23lpx') 166 .fontSize('23lpx')
139 .backgroundColor($r('app.color.color_ED2800')) 167 .backgroundColor($r('app.color.color_ED2800'))
@@ -7,17 +7,20 @@ import MinePageDatasModel from '../../../model/MinePageDatasModel'; @@ -7,17 +7,20 @@ import MinePageDatasModel from '../../../model/MinePageDatasModel';
7 import { EmptyComponent } from '../../view/EmptyComponent'; 7 import { EmptyComponent } from '../../view/EmptyComponent';
8 import { Action } from 'wdBean/Index'; 8 import { Action } from 'wdBean/Index';
9 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; 9 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
  10 +import { CustomPullToRefresh } from '../../reusable/CustomPullToRefresh';
10 11
11 const TAG = "AppointmentListUI" 12 const TAG = "AppointmentListUI"
12 13
13 @Component 14 @Component
14 export struct AppointmentListUI { 15 export struct AppointmentListUI {
15 @State data: LazyDataSource<MineAppointmentItem> = new LazyDataSource(); 16 @State data: LazyDataSource<MineAppointmentItem> = new LazyDataSource();
  17 + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
16 @State count: number = 0; 18 @State count: number = 0;
17 @State isLoading: boolean = false 19 @State isLoading: boolean = false
18 @State hasMore: boolean = true 20 @State hasMore: boolean = true
19 curPageNum: number = 1; 21 curPageNum: number = 1;
20 @State isGetRequest: boolean = false 22 @State isGetRequest: boolean = false
  23 + private scroller: Scroller = new Scroller();
21 24
22 aboutToAppear() { 25 aboutToAppear() {
23 this.getNewPageData() 26 this.getNewPageData()
@@ -26,7 +29,7 @@ export struct AppointmentListUI { @@ -26,7 +29,7 @@ export struct AppointmentListUI {
26 build() { 29 build() {
27 Column() { 30 Column() {
28 //标题栏目 31 //标题栏目
29 - CustomTitleUI({ titleName: "预约列表" }) 32 + CustomTitleUI({ titleName: "我的预约" })
30 if (this.count == 0) { 33 if (this.count == 0) {
31 if (this.isGetRequest == true) { 34 if (this.isGetRequest == true) {
32 EmptyComponent({ emptyType: 10 }) 35 EmptyComponent({ emptyType: 10 })
@@ -35,45 +38,29 @@ export struct AppointmentListUI { @@ -35,45 +38,29 @@ export struct AppointmentListUI {
35 } 38 }
36 39
37 } else { 40 } else {
38 - //刷新控件 TODO  
39 - //List  
40 - List({ space: '6lpx' }) {  
41 - LazyForEach(this.data, (item: MineAppointmentItem, index: number) => {  
42 - ListItem() {  
43 - AppointmentListChildComponent({ item: item })  
44 - }  
45 - .onClick(() => {  
46 - //TODO 跳转  
47 - let action = {  
48 - type:"2",  
49 - params:{  
50 - extra:{  
51 - relId:item.relId,  
52 - relType:item.relType.toString()  
53 - },  
54 - contentID:item.liveId.toString()  
55 - }  
56 - } as Action  
57 - WDRouterRule.jumpWithPage(WDRouterPage.detailPlayLiveCommon, action)  
58 - })  
59 - }, (item: MineAppointmentItem, index: number) => index.toString())  
60 41
61 - //没有更多数据 显示提示  
62 - if (!this.hasMore) {  
63 - ListItem() {  
64 - ListHasNoMoreDataUI() 42 + CustomPullToRefresh({
  43 + alldata:this.data,
  44 + scroller:this.scroller,
  45 + customList:()=>{
  46 + this.ListLayout()
  47 + },
  48 + onRefresh:(resolve)=>{
  49 + this.curPageNum = 1;
  50 + this.hasMore = true
  51 + this.isGetRequest = false
  52 + this.data.clear()
  53 +
  54 + if (!this.isLoading){
  55 + this.getNewPageData()
  56 + if(resolve) resolve('刷新成功')
  57 + }
  58 + },
  59 + onLoadMore:(resolve)=> {
  60 + if (!this.isLoading) {
  61 + this.isLoading = true
  62 + this.getNewPageData()
65 } 63 }
66 - }  
67 - }  
68 - .cachedCount(4)  
69 - .scrollBar(BarState.Off)  
70 - .margin({ top: '23lpx', left: '23lpx', right: '23lpx' })  
71 - .layoutWeight(1)  
72 - .onReachEnd(() => {  
73 - console.log(TAG, "触底了");  
74 - if (!this.isLoading) {  
75 - //加载分页数据  
76 - this.getNewPageData()  
77 } 64 }
78 }) 65 })
79 } 66 }
@@ -83,6 +70,42 @@ export struct AppointmentListUI { @@ -83,6 +70,42 @@ export struct AppointmentListUI {
83 .width('100%') 70 .width('100%')
84 } 71 }
85 72
  73 + @Builder ListLayout(){
  74 + List({ space:6,scroller: this.scroller }) {
  75 + LazyForEach(this.data, (item: MineAppointmentItem, index: number) => {
  76 + ListItem() {
  77 + AppointmentListChildComponent({ item: item })
  78 + }
  79 + .onClick(() => {
  80 + //TODO 跳转
  81 + let action = {
  82 + type:"2",
  83 + params:{
  84 + extra:{
  85 + relId:item.relId,
  86 + relType:item.relType.toString()
  87 + },
  88 + contentID:item.liveId.toString()
  89 + }
  90 + } as Action
  91 + WDRouterRule.jumpWithPage(WDRouterPage.detailPlayLiveCommon, action)
  92 + })
  93 + }, (item: MineAppointmentItem, index: number) => index.toString())
  94 +
  95 + //没有更多数据 显示提示
  96 + if (!this.hasMore) {
  97 + ListItem() {
  98 + ListHasNoMoreDataUI()
  99 + }.padding({bottom:px2vp(this.bottomSafeHeight) + 20})
  100 + }
  101 + }
  102 + .cachedCount(4)
  103 + .scrollBar(BarState.Off)
  104 + .edgeEffect(EdgeEffect.None)
  105 + .margin({ top: '23lpx', left: '23lpx', right: '23lpx'})
  106 + .layoutWeight(1)
  107 + }
  108 +
86 getNewPageData() { 109 getNewPageData() {
87 this.isLoading = true 110 this.isLoading = true
88 if (this.hasMore) { 111 if (this.hasMore) {
@@ -460,9 +460,19 @@ export struct TopNavigationComponent { @@ -460,9 +460,19 @@ export struct TopNavigationComponent {
460 } 460 }
461 461
462 /** 462 /**
  463 + * 判断是否当前页面处理逻辑,如消息通知,只需要切换到当前底导的处理,过滤掉非当前。
  464 + */
  465 + private isCurrentPage(): boolean {
  466 + return this._currentNavIndex === this.navIndex
  467 + }
  468 +
  469 + /**
463 * 频道id变化,即指定频道跳转场景 470 * 频道id变化,即指定频道跳转场景
464 */ 471 */
465 onAssignChannelChange() { 472 onAssignChannelChange() {
  473 + if (!this.isCurrentPage()) {
  474 + return
  475 + }
466 let channelId = this.assignChannel.channelId 476 let channelId = this.assignChannel.channelId
467 let index = -1 477 let index = -1
468 if (this._currentNavIndex === 0) { 478 if (this._currentNavIndex === 0) {
@@ -72,68 +72,70 @@ export struct TopNavigationComponentNew { @@ -72,68 +72,70 @@ export struct TopNavigationComponentNew {
72 private tabsWidth: number = 0 72 private tabsWidth: number = 0
73 73
74 build() { 74 build() {
75 - // 频道分类list  
76 - RelativeContainer() {  
77 - this.tabBar()  
78 - Swiper(this.swiperController) {  
79 - ForEach(this.currentBottomNavName === '新闻' ? this.myChannelList : this.topNavList,  
80 - (navItem: TopNavDTO, index: number) => {  
81 - if (this.currentBottomNavName === '人民号' && navItem.name === '关注') {  
82 - PeopleShipMainComponent({  
83 - currentTopNavSelectedIndex: $currentTopNavSelectedIndex,  
84 - navIndex: index,  
85 - pageId: navItem.pageId + '',  
86 - channelId: navItem.channelId + '',  
87 - })  
88 - } else  
89 - if (!this.isBroadcast(navItem) && !this.isLayout(navItem)) {  
90 - PageComponent({ 75 + Column() {
  76 + // 频道分类list
  77 + RelativeContainer() {
  78 + this.tabBar()
  79 + Swiper(this.swiperController) {
  80 + ForEach(this.currentBottomNavName === '新闻' ? this.myChannelList : this.topNavList,
  81 + (navItem: TopNavDTO, index: number) => {
  82 + if (this.currentBottomNavName === '人民号' && navItem.name === '关注') {
  83 + PeopleShipMainComponent({
91 currentTopNavSelectedIndex: $currentTopNavSelectedIndex, 84 currentTopNavSelectedIndex: $currentTopNavSelectedIndex,
92 navIndex: index, 85 navIndex: index,
93 pageId: navItem.pageId + '', 86 pageId: navItem.pageId + '',
94 channelId: navItem.channelId + '', 87 channelId: navItem.channelId + '',
95 - autoRefresh: this.autoRefresh2Page  
96 }) 88 })
97 - } else {  
98 - channelSkeleton() 89 + } else
  90 + if (!this.isBroadcast(navItem) && !this.isLayout(navItem)) {
  91 + PageComponent({
  92 + currentTopNavSelectedIndex: $currentTopNavSelectedIndex,
  93 + navIndex: index,
  94 + pageId: navItem.pageId + '',
  95 + channelId: navItem.channelId + '',
  96 + autoRefresh: this.autoRefresh2Page
  97 + })
  98 + } else {
  99 + channelSkeleton()
  100 + }
  101 + })
  102 + }
  103 + .loop(false)
  104 + .indicator(false)
  105 + .effectMode(EdgeEffect.None)
  106 + .index(this.currentTopNavSelectedIndex)
  107 + .cachedCount(0)
  108 + .id('pageContent')
  109 + .alignRules({
  110 + 'top': { 'anchor': 'tabList', 'align': VerticalAlign.Bottom },
  111 + 'middle': { 'anchor': '__container__', 'align': HorizontalAlign.Center },
  112 + 'bottom': { 'anchor': '__container__', 'align': VerticalAlign.Bottom }
  113 + })
  114 + .onChange((index) => {
  115 + Logger.info(TAG, `onChange index : ${index}`);
  116 + if (this.isBroadcastByIndex(index)) {
  117 + // 跳转到播报页面
  118 + ProcessUtils.gotoBroadcastPage(this.myChannelList[index].pageId)
  119 + let nextIndex = this.currentTopNavSelectedIndex > index ? index - 1 : index + 1
  120 + if (nextIndex < this.myChannelList.length) {
  121 + this.changePage(nextIndex)
99 } 122 }
100 - })  
101 - }  
102 - .loop(false)  
103 - .indicator(false)  
104 - .effectMode(EdgeEffect.None)  
105 - .index(this.currentTopNavSelectedIndex)  
106 - .cachedCount(0)  
107 - .id('pageContent')  
108 - .alignRules({  
109 - 'top': { 'anchor': 'tabList', 'align': VerticalAlign.Bottom },  
110 - 'middle': { 'anchor': '__container__', 'align': HorizontalAlign.Center },  
111 - 'bottom': { 'anchor': '__container__', 'align': VerticalAlign.Bottom }  
112 - })  
113 - .onChange((index) => {  
114 - Logger.info(TAG, `onChange index : ${index}`);  
115 - if (this.isBroadcastByIndex(index)) {  
116 - // 跳转到播报页面  
117 - ProcessUtils.gotoBroadcastPage(this.myChannelList[index].pageId)  
118 - let nextIndex = this.currentTopNavSelectedIndex > index ? index - 1 : index + 1  
119 - if (nextIndex < this.myChannelList.length) {  
120 - this.changePage(nextIndex)  
121 - }  
122 - } else if (this.isLayoutByIndex(index)) {  
123 - ProcessUtils.gotoENewsPaper()  
124 - let nextIndex = this.currentTopNavSelectedIndex > index ? index - 1 : index + 1  
125 - if (nextIndex < this.myChannelList.length) {  
126 - this.changePage(nextIndex) 123 + } else if (this.isLayoutByIndex(index)) {
  124 + ProcessUtils.gotoENewsPaper()
  125 + let nextIndex = this.currentTopNavSelectedIndex > index ? index - 1 : index + 1
  126 + if (nextIndex < this.myChannelList.length) {
  127 + this.changePage(nextIndex)
  128 + }
  129 + } else {
  130 + this.currentTopNavSelectedIndex = index;
  131 + this.changePage(this.currentTopNavSelectedIndex)
127 } 132 }
128 - } else {  
129 - this.currentTopNavSelectedIndex = index;  
130 - this.changePage(this.currentTopNavSelectedIndex)  
131 - }  
132 133
133 - }) 134 + })
  135 + }
  136 + .width('100%')
  137 + .height('100%')
134 } 138 }
135 - .width('100%')  
136 - .height('100%')  
137 } 139 }
138 140
139 @Builder 141 @Builder
@@ -316,7 +318,7 @@ export struct TopNavigationComponentNew { @@ -316,7 +318,7 @@ export struct TopNavigationComponentNew {
316 bottom: 2, 318 bottom: 2,
317 }) 319 })
318 .id(`col_tabBar${index}`) 320 .id(`col_tabBar${index}`)
319 - .margin({ right: this.myChannelList.length === index + 1 ? 36 : 0 }) 321 + // .margin({ right: this.myChannelList.length === index + 1 ? 36 : 0 })
320 .onClick(() => { 322 .onClick(() => {
321 Logger.debug(TAG, `onClick, index: ${index}`); 323 Logger.debug(TAG, `onClick, index: ${index}`);
322 if (this.currentTopNavSelectedIndex === index) { 324 if (this.currentTopNavSelectedIndex === index) {
@@ -487,9 +489,19 @@ export struct TopNavigationComponentNew { @@ -487,9 +489,19 @@ export struct TopNavigationComponentNew {
487 } 489 }
488 490
489 /** 491 /**
  492 + * 判断是否当前页面处理逻辑,如消息通知,只需要切换到当前底导的处理,过滤掉非当前。
  493 + */
  494 + private isCurrentPage(): boolean {
  495 + return this._currentNavIndex === this.bottomNavIndex
  496 + }
  497 +
  498 + /**
490 * 频道id变化,即指定频道跳转场景 499 * 频道id变化,即指定频道跳转场景
491 */ 500 */
492 onAssignChannelChange() { 501 onAssignChannelChange() {
  502 + if (!this.isCurrentPage()) {
  503 + return
  504 + }
493 let channelId = this.assignChannel.channelId 505 let channelId = this.assignChannel.channelId
494 let index = -1 506 let index = -1
495 if (this._currentNavIndex === 0) { 507 if (this._currentNavIndex === 0) {
@@ -537,7 +549,7 @@ export struct TopNavigationComponentNew { @@ -537,7 +549,7 @@ export struct TopNavigationComponentNew {
537 private getChannelByMine(channelId: string) { 549 private getChannelByMine(channelId: string) {
538 for (let i = 0; i < this.myChannelList.length; i++) { 550 for (let i = 0; i < this.myChannelList.length; i++) {
539 let topNavDTO: TopNavDTO = this.myChannelList[i] 551 let topNavDTO: TopNavDTO = this.myChannelList[i]
540 - if (topNavDTO.channelId?.toString() === channelId) { 552 + if (topNavDTO?.channelId?.toString() === channelId) {
541 return i 553 return i
542 } 554 }
543 } 555 }
@@ -26,7 +26,6 @@ export struct CustomTitleUI { @@ -26,7 +26,6 @@ export struct CustomTitleUI {
26 } 26 }
27 27
28 Text(this.titleName) 28 Text(this.titleName)
29 - .height('42lpx')  
30 .maxLines(1) 29 .maxLines(1)
31 .id("title") 30 .id("title")
32 .fontSize('35lpx') 31 .fontSize('35lpx')
@@ -49,7 +49,7 @@ export struct SearchComponent { @@ -49,7 +49,7 @@ export struct SearchComponent {
49 getRelatedSearchContent() { 49 getRelatedSearchContent() {
50 if(StringUtils.isNotEmpty(this.searchText)){ 50 if(StringUtils.isNotEmpty(this.searchText)){
51 SearcherAboutDataModel.getRelatedSearchContentData(encodeURI(this.searchText),getContext(this)).then((value) => { 51 SearcherAboutDataModel.getRelatedSearchContentData(encodeURI(this.searchText),getContext(this)).then((value) => {
52 - if (value != null) { 52 + if (value != null && value.length > 0) {
53 this.relatedSearchContentsData = [] 53 this.relatedSearchContentsData = []
54 value.forEach(item=>{ 54 value.forEach(item=>{
55 let tempValue:string = item 55 let tempValue:string = item
@@ -81,6 +81,9 @@ export struct SearchComponent { @@ -81,6 +81,9 @@ export struct SearchComponent {
81 this.relatedSearchContentsData.push(new SearchRelatedItem(item,tempArr)) 81 this.relatedSearchContentsData.push(new SearchRelatedItem(item,tempArr))
82 } 82 }
83 }) 83 })
  84 + }else{
  85 + this.hasInputContent = false
  86 + this.relatedSearchContentsData = []
84 } 87 }
85 }).catch((err: Error) => { 88 }).catch((err: Error) => {
86 console.log(TAG, JSON.stringify(err)) 89 console.log(TAG, JSON.stringify(err))
@@ -228,7 +231,7 @@ export struct SearchComponent { @@ -228,7 +231,7 @@ export struct SearchComponent {
228 Row() { 231 Row() {
229 //左 232 //左
230 Stack({ alignContent: Alignment.Start }) { 233 Stack({ alignContent: Alignment.Start }) {
231 - if (this.searchTextData != null && this.searchTextData.length > 0 && !this.hasInputContent) { 234 + if (this.searchTextData != null && this.searchTextData.length > 0 && !this.hasInputContent && StringUtils.isEmpty(this.searchText)) {
232 Swiper(this.swiperController) { 235 Swiper(this.swiperController) {
233 ForEach(this.searchTextData, (item: string, index: number) => { 236 ForEach(this.searchTextData, (item: string, index: number) => {
234 Text(item) 237 Text(item)
@@ -20,12 +20,16 @@ import { FollowListDetailItem } from '../../viewmodel/FollowListDetailItem' @@ -20,12 +20,16 @@ import { FollowListDetailItem } from '../../viewmodel/FollowListDetailItem'
20 import { FollowListStatusRequestItem } from '../../viewmodel/FollowListStatusRequestItem' 20 import { FollowListStatusRequestItem } from '../../viewmodel/FollowListStatusRequestItem'
21 import { QueryListIsFollowedItem } from '../../viewmodel/QueryListIsFollowedItem' 21 import { QueryListIsFollowedItem } from '../../viewmodel/QueryListIsFollowedItem'
22 import { SearchResultContentData } from '../../viewmodel/SearchResultContentData' 22 import { SearchResultContentData } from '../../viewmodel/SearchResultContentData'
23 -import { SearchResultContentItem, SearchRmhDescription } from '../../viewmodel/SearchResultContentItem' 23 +import {
  24 + SearchDescription,
  25 + SearchResultContentItem, SearchRmhDescription } from '../../viewmodel/SearchResultContentItem'
24 import { CardParser } from '../CardParser' 26 import { CardParser } from '../CardParser'
25 import { FollowChildComponent } from '../mine/follow/FollowChildComponent' 27 import { FollowChildComponent } from '../mine/follow/FollowChildComponent'
26 import { ListHasNoMoreDataUI } from '../reusable/ListHasNoMoreDataUI' 28 import { ListHasNoMoreDataUI } from '../reusable/ListHasNoMoreDataUI'
27 import { ActivityItemComponent } from './ActivityItemComponent' 29 import { ActivityItemComponent } from './ActivityItemComponent'
28 import { SearchCreatorComponent } from './SearchCreatorComponent' 30 import { SearchCreatorComponent } from './SearchCreatorComponent'
  31 +import { JSON } from '@kit.ArkTS'
  32 +import { MoreComponent } from '../cardview/MoreComponent'
29 33
30 const TAG = "SearchResultContentComponent" 34 const TAG = "SearchResultContentComponent"
31 35
@@ -34,6 +38,7 @@ export struct SearchResultContentComponent { @@ -34,6 +38,7 @@ export struct SearchResultContentComponent {
34 @State keywords: string = "" 38 @State keywords: string = ""
35 @State searchType: string = "" 39 @State searchType: string = ""
36 @State data: LazyDataSource<ContentDTO> = new LazyDataSource(); 40 @State data: LazyDataSource<ContentDTO> = new LazyDataSource();
  41 + tempList : ContentDTO[] = []
37 @State data_rmh: SearchRmhDescription[] = [] 42 @State data_rmh: SearchRmhDescription[] = []
38 @State count: number = -1; 43 @State count: number = -1;
39 @State isLoading: boolean = false 44 @State isLoading: boolean = false
@@ -62,7 +67,7 @@ export struct SearchResultContentComponent { @@ -62,7 +67,7 @@ export struct SearchResultContentComponent {
62 getNewSearchResultData() { 67 getNewSearchResultData() {
63 this.isLoading = true 68 this.isLoading = true
64 if (this.hasMore) { 69 if (this.hasMore) {
65 - SearcherAboutDataModel.getSearchResultListData("15", `${this.curPageNum}`, this.searchType, this.keywords, 70 + SearcherAboutDataModel.getSearchResultListData("20", `${this.curPageNum}`, this.searchType, this.keywords,
66 getContext(this)).then((value) => { 71 getContext(this)).then((value) => {
67 console.log('SearcherAboutDataModel', JSON.stringify(value)) 72 console.log('SearcherAboutDataModel', JSON.stringify(value))
68 if (!this.data || value.list.length == 0) { 73 if (!this.data || value.list.length == 0) {
@@ -183,9 +188,8 @@ export struct SearchResultContentComponent { @@ -183,9 +188,8 @@ export struct SearchResultContentComponent {
183 resultData.list.forEach((value:SearchResultContentItem) => { 188 resultData.list.forEach((value:SearchResultContentItem) => {
184 creatorIdList.push(value.data.creatorId) 189 creatorIdList.push(value.data.creatorId)
185 }) 190 })
  191 + let isRemain : boolean = false
186 SearcherAboutDataModel.getCreatorDetailListData({creatorIdList:creatorIdList}).then((rem) => { 192 SearcherAboutDataModel.getCreatorDetailListData({creatorIdList:creatorIdList}).then((rem) => {
187 -  
188 -  
189 resultData.list.forEach((value) => { 193 resultData.list.forEach((value) => {
190 let photos: FullColumnImgUrlDTO[] = [] 194 let photos: FullColumnImgUrlDTO[] = []
191 // if (value.data.appStyle === 4) { 195 // if (value.data.appStyle === 4) {
@@ -196,42 +200,98 @@ export struct SearchResultContentComponent { @@ -196,42 +200,98 @@ export struct SearchResultContentComponent {
196 // } 200 // }
197 let contentDTO = this.dataTransform(rem,value, photos); 201 let contentDTO = this.dataTransform(rem,value, photos);
198 if(value.data.type != "13"){ 202 if(value.data.type != "13"){
199 - this.data.push(contentDTO) 203 + this.tempList.push(contentDTO)
  204 + if(value.data.sameContentList != null && value.data.sameContentList.length > 0) {
  205 + let contentDTO2 = new ContentDTO();
  206 + contentDTO2.sameContentListJson = JSON.stringify(value.data.sameContentList)
  207 + isRemain = true
  208 + this.tempList.push(contentDTO2)
  209 + }
200 } 210 }
201 }) 211 })
202 -  
203 - 212 + if(!isRemain){
  213 + this.tempList.forEach((value) => {
  214 + this.data.push(value)
  215 + })
  216 + this.tempList = []
  217 + this.data.notifyDataReload()
  218 + this.count = this.data.totalCount()
  219 + if (this.count < resultData.totalCount) {
  220 + this.curPageNum++
  221 + } else {
  222 + this.hasMore = false
  223 + }
  224 + this.isLoading = false
  225 + }else{
  226 + this.dealSameContent(resultData.totalCount)
  227 + }
204 }).catch((err: Error) => { 228 }).catch((err: Error) => {
205 console.log(TAG, JSON.stringify(err)) 229 console.log(TAG, JSON.stringify(err))
206 }) 230 })
207 -  
208 -  
209 - this.data.notifyDataReload()  
210 - this.count = this.data.totalCount()  
211 - if (this.data.totalCount() < resultData.totalCount) {  
212 - this.curPageNum++  
213 - } else {  
214 - this.hasMore = false  
215 - } 231 + }).catch((err: Error) => {
  232 + console.log(TAG, "请求失败")
216 this.isLoading = false 233 this.isLoading = false
  234 + this.count = this.count === -1 ? 0 : this.count
  235 + })
  236 + }
217 237
218 - if (this.count === 0 && resultData.list.length > 0) {  
219 - this.count = -1  
220 - if (!this.isLoading) {  
221 - //加载分页数据  
222 - this.getNewSearchResultData() 238 + async dealSameContent(count:number){
  239 + this.tempList.forEach(async (tempValue) => {
  240 + if(StringUtils.isNotEmpty(tempValue.sameContentListJson)){
  241 + let data: contentListParams = {
  242 + contentList: []
223 } 243 }
224 - } else if (this.count <= 10 && resultData.list.length > 0) {  
225 - if (!this.isLoading) {  
226 - //加载分页数据  
227 - this.getNewSearchResultData() 244 + let resultData : SearchDescription[] = JSON.parse(tempValue.sameContentListJson) as SearchDescription[]
  245 + if(resultData!=null){
  246 + resultData.forEach((item) => {
  247 + data.contentList.push({
  248 + contentId: item.id + '',
  249 + contentType: Number.parseInt(item.type)
  250 + })
  251 + })
  252 +
  253 + let newValue = await SearcherAboutDataModel.getInteractListData(data, getContext(this))
  254 + newValue.forEach((item) => {
  255 + resultData.forEach((data) => {
  256 + if (item.contentId == data.id) {
  257 + data.collectNum = item.collectNum + ""
  258 + data.commentNum = item.commentNum + ""
  259 + data.likeNum = item.likeNum + ""
  260 + data.readNum = item.readNum + ""
  261 + data.shareNum = item.shareNum + ""
  262 + }
  263 + })
  264 + })
  265 + let creatorIdList: string[] = []
  266 + resultData.forEach((value:SearchDescription) => {
  267 + creatorIdList.push(value.creatorId)
  268 + })
  269 + let rem = await SearcherAboutDataModel.getCreatorDetailListData({creatorIdList:creatorIdList})
  270 + resultData.forEach((value) => {
  271 + let photos: FullColumnImgUrlDTO[] = []
  272 + value.appStyleImages.split("&&").forEach((value) => {
  273 + const resizeParams = this.extractResizeParams(value)
  274 + photos.push({ fullUrl: value,weight:resizeParams.width,height:resizeParams.height, } as FullColumnImgUrlDTO)
  275 + })
  276 + let contentDTO = this.dataTransform2(rem,value, photos);
  277 + tempValue.sameContentList.push(contentDTO)
  278 + })
228 } 279 }
229 } 280 }
230 - }).catch((err: Error) => {  
231 - console.log(TAG, "请求失败")  
232 - this.isLoading = false  
233 - this.count = this.count === -1 ? 0 : this.count  
234 }) 281 })
  282 +
  283 + this.tempList.forEach((value) => {
  284 + this.data.push(value)
  285 + })
  286 + this.tempList = []
  287 + this.data.notifyDataReload()
  288 + this.count = this.data.totalCount()
  289 + if (this.count < count) {
  290 + this.curPageNum++
  291 + } else {
  292 + this.hasMore = false
  293 + }
  294 + this.isLoading = false
235 } 295 }
236 296
237 build() { 297 build() {
@@ -258,6 +318,8 @@ export struct SearchResultContentComponent { @@ -258,6 +318,8 @@ export struct SearchResultContentComponent {
258 Column() { 318 Column() {
259 if (this.searchType == "activity") { 319 if (this.searchType == "activity") {
260 ActivityItemComponent({ contentDTO: item }) 320 ActivityItemComponent({ contentDTO: item })
  321 + }else if(item.sameContentList != null && item.sameContentList.length > 0){
  322 + MoreComponent({ contentDTO: item })
261 } else { 323 } else {
262 CardParser({compDTO:new CompDTO, contentDTO: item }) 324 CardParser({compDTO:new CompDTO, contentDTO: item })
263 } 325 }
@@ -284,7 +346,6 @@ export struct SearchResultContentComponent { @@ -284,7 +346,6 @@ export struct SearchResultContentComponent {
284 .onReachEnd(() => { 346 .onReachEnd(() => {
285 console.log(TAG, "触底了"); 347 console.log(TAG, "触底了");
286 if (!this.isLoading) { 348 if (!this.isLoading) {
287 - //加载分页数据  
288 this.getNewSearchResultData() 349 this.getNewSearchResultData()
289 } 350 }
290 }) 351 })
@@ -476,10 +537,94 @@ export struct SearchResultContentComponent { @@ -476,10 +537,94 @@ export struct SearchResultContentComponent {
476 contentDTO.shareFlag = value.data.shareFlag 537 contentDTO.shareFlag = value.data.shareFlag
477 contentDTO.contentText = value.data.contentText 538 contentDTO.contentText = value.data.contentText
478 return contentDTO; 539 return contentDTO;
  540 + }
479 541
  542 + private dataTransform2(rem:CreatorDetailResponseItem[],value: SearchDescription, photos: FullColumnImgUrlDTO[]): ContentDTO {
  543 + let rmhInfo = this.getRmhInfo2(rem,value)
  544 + console.log('获取photos',JSON.stringify(photos))
  545 + console.log('获取value2',JSON.stringify(value))
  546 + let contentDTO = new ContentDTO();
  547 + contentDTO.appStyle = value.appStyle + ""
  548 + contentDTO.cityCode = value.cityCode
  549 + contentDTO.coverSize = ""
  550 + contentDTO.coverType = value.type == "5" ? 1 : -1
  551 + contentDTO.coverUrl =
  552 + this.searchType == "activity" ? value.zhChannelPageImg : value.appStyleImages.split("&&")[0];
  553 + contentDTO.description = value.description
  554 + contentDTO.districtCode = value.districtCode
  555 + contentDTO.endTime = value.endTime
  556 + contentDTO.hImageUrl = ""
  557 + contentDTO.heatValue = ""
  558 + contentDTO.innerUrl = ""
  559 + contentDTO.landscape = Number.parseInt(value.landscape)
  560 + contentDTO.linkUrl = value.linkUrl
  561 + contentDTO.openLikes = Number.parseInt(value.openLikes)
  562 + contentDTO.openUrl = ""
  563 + contentDTO.pageId = value.pageId
  564 + contentDTO.programAuth = ""
  565 + contentDTO.programId = ""
  566 + contentDTO.programName = ""
  567 + contentDTO.programSource = -1
  568 + contentDTO.programType = Number.parseInt(value.status)
  569 + contentDTO.provinceCode = value.provinceCode
  570 + contentDTO.showTitleEd = value.showTitleEd
  571 + contentDTO.showTitleIng = value.showTitleIng
  572 + contentDTO.showTitleNo = value.showTitleNo
  573 + contentDTO.startTime = value.startTime
  574 + contentDTO.subType = ""
  575 + contentDTO.subtitle = ""
  576 + contentDTO.title = value.title
  577 + contentDTO.vImageUrl = ""
  578 + contentDTO.screenType = ""
  579 + contentDTO.source = StringUtils.isEmpty(value.creatorName) ? value.sourceName : value.creatorName
  580 + contentDTO.objectId = value.id
  581 + contentDTO.objectType = value.type
  582 + contentDTO.channelId = value.channelId
  583 + contentDTO.relId = value.relId
  584 + contentDTO.relType = value.relType
  585 + contentDTO.newsTitle = value.titleLiteral;
  586 + contentDTO.publishTime =
  587 + StringUtils.isNotEmpty(value.firstPublishTime) ? value.firstPublishTime : value.publishTime
  588 + contentDTO.visitorComment = -1
  589 + contentDTO.fullColumnImgUrls = photos
  590 + contentDTO.newsSummary = ""
  591 + contentDTO.hasMore = -1
  592 + contentDTO.slideShows = []
  593 + contentDTO.voiceInfo = {} as VoiceInfoDTO
  594 + contentDTO.tagWord = -1
  595 + contentDTO.isSelect = true
  596 + contentDTO.rmhInfo = {} as RmhInfoDTO
  597 + contentDTO.photoNum = -1
  598 + contentDTO.liveInfo = {} as LiveInfoDTO;
  599 + contentDTO.videoInfo = {
  600 + videoDuration: Number.parseInt(value.duration)
  601 + } as VideoInfoDTO;
  602 +
  603 + let interact = new InteractDataDTO()
  604 + interact.collectNum = value.collectNum
  605 + interact.commentNum = value.commentNum
  606 + interact.contentId = value.id
  607 + interact.contentType = Number.parseInt(value.type)
  608 + interact.likeNum = value.likeNum
  609 + interact.readNum = Number.parseInt(value.readNum)
  610 + interact.shareNum = Number.parseInt(value.shareNum)
  611 + contentDTO.interactData = interact
  612 + contentDTO.corner = ''
  613 + contentDTO.rmhPlatform = 0
  614 + contentDTO.newTags = ''
  615 + contentDTO.isSearch = true
  616 + contentDTO.publishTimestamp = ""
  617 + contentDTO.bottomNavId = '';
  618 + contentDTO.openType = '';
  619 + contentDTO.extra = '';
  620 + contentDTO.titleShow = value.type == "5" ? 1 : 0;
  621 + contentDTO.rmhInfo = rmhInfo
  622 + contentDTO.shareFlag = value.shareFlag
  623 + contentDTO.contentText = value.contentText
  624 + return contentDTO;
  625 + }
480 626
481 627
482 - }  
483 // 搜索数据转化rmhInfo 628 // 搜索数据转化rmhInfo
484 private getRmhInfo(rem:CreatorDetailResponseItem[],value:SearchResultContentItem){ 629 private getRmhInfo(rem:CreatorDetailResponseItem[],value:SearchResultContentItem){
485 let obj = value.data 630 let obj = value.data
@@ -535,6 +680,65 @@ export struct SearchResultContentComponent { @@ -535,6 +680,65 @@ export struct SearchResultContentComponent {
535 } 680 }
536 return rmhInfo 681 return rmhInfo
537 } 682 }
  683 +
  684 + // 搜索数据转化rmhInfo
  685 + private getRmhInfo2(rem:CreatorDetailResponseItem[],value:SearchDescription){
  686 + let obj = value
  687 + let rmhInfo:RmhInfoDTO = {
  688 + rmhHeadUrl:obj.headerPhotoUrl,
  689 + rmhName:obj.creatorName,
  690 + rmhId:obj.creatorId,
  691 + authIcon:obj.authIcon,
  692 + authTitle: obj.authTitle,
  693 + authTitle2: '',
  694 + banControl: 0,
  695 + cnIsAttention: 0,
  696 + cnAttention: 0,
  697 + cnlsComment: 0,
  698 + cnlsLike: 0,
  699 + cnMainControl: 0,
  700 + cnShareControl: 0,
  701 + cnIsComment: 0,
  702 + cnIsLike:0,
  703 + posterShareControl: 0,
  704 + rmhDesc: obj.introduction,
  705 + userId: obj.userId,
  706 + userType: obj.userType,
  707 + honoraryIcon:''
  708 + }
  709 + if(rem.length>0){
  710 + rem.forEach(item=>{
  711 + if(item.creatorId === obj.creatorId){
  712 + rmhInfo = {
  713 + rmhHeadUrl:item.headPhotoUrl,
  714 + rmhName:item.userName,
  715 + rmhId:item.creatorId,
  716 + authIcon:item.authIcon,
  717 + authTitle: item.authTitle,
  718 + authTitle2: '',
  719 + banControl: 0,
  720 + cnIsAttention:item.isAttention,
  721 + cnAttention: 0,
  722 + cnlsComment: 0,
  723 + cnlsLike: 0,
  724 + cnMainControl: 0,
  725 + cnShareControl: 0,
  726 + cnIsComment: 0,
  727 + cnIsLike:0,
  728 + posterShareControl: 0,
  729 + rmhDesc: item.introduction,
  730 + userId: item.userId,
  731 + userType: item.userType,
  732 + honoraryIcon:''
  733 + }
  734 + }
  735 + })
  736 + }
  737 + return rmhInfo
  738 + }
  739 +
  740 +
  741 +
538 private extractResizeParams(url: string) { 742 private extractResizeParams(url: string) {
539 const heightRegex = /h_(\d+)/; // 匹配高度参数,如h_450 743 const heightRegex = /h_(\d+)/; // 匹配高度参数,如h_450
540 const widthRegex = /w_(\d+)/; // 匹配宽度参数,如w_800 744 const widthRegex = /w_(\d+)/; // 匹配宽度参数,如w_800
@@ -8,11 +8,12 @@ import { ContentDetailDTO, @@ -8,11 +8,12 @@ import { ContentDetailDTO,
8 postBatchAttentionStatusResult, 8 postBatchAttentionStatusResult,
9 postInteractBrowsOperateParams, 9 postInteractBrowsOperateParams,
10 InteractDataDTO, 10 InteractDataDTO,
11 - FeedbackTypeBean 11 + FeedbackTypeBean,
  12 + FeedBackParams
12 } from 'wdBean'; 13 } from 'wdBean';
13 import { PageRepository } from '../repository/PageRepository'; 14 import { PageRepository } from '../repository/PageRepository';
14 import { ArrayList } from '@kit.ArkTS'; 15 import { ArrayList } from '@kit.ArkTS';
15 - 16 +import { ToastUtils} from 'wdKit/Index';
16 const TAG = 'MultiPictureDetailViewModel'; 17 const TAG = 'MultiPictureDetailViewModel';
17 18
18 export class MultiPictureDetailViewModel { 19 export class MultiPictureDetailViewModel {
@@ -158,15 +159,16 @@ export class MultiPictureDetailViewModel { @@ -158,15 +159,16 @@ export class MultiPictureDetailViewModel {
158 }) 159 })
159 } 160 }
160 161
161 - static async feedBackCommit(params:HashMap<String,String>): Promise<ResponseDTO> {  
162 - return new Promise<ResponseDTO>((success, error) => { 162 + static async feedBackCommit(params:FeedBackParams): Promise<object> {
  163 + return new Promise<object>((success, error) => {
163 Logger.info(TAG, `fetchDetailData start`); 164 Logger.info(TAG, `fetchDetailData start`);
164 - WDHttp.post(HttpUrlUtils.getHost() + HttpUrlUtils.FEEDBACK_COMMIT_PATH,params).then((resDTO: ResponseDTO) => {  
165 - 165 + WDHttp.post(HttpUrlUtils.getHost() + HttpUrlUtils.FEEDBACK_COMMIT_PATH,params).then((resDTO: object) => {
166 success(resDTO); 166 success(resDTO);
  167 + ToastUtils.shortToast('反馈成功')
167 }).catch((err: Error) => { 168 }).catch((err: Error) => {
168 Logger.error(TAG, `fetchDetailData catch, error.name : ${err.name}, error.message:${err.message}`); 169 Logger.error(TAG, `fetchDetailData catch, error.name : ${err.name}, error.message:${err.message}`);
169 error(err); 170 error(err);
  171 + ToastUtils.shortToast('反馈失败')
170 }) 172 })
171 }) 173 })
172 } 174 }
@@ -5,7 +5,7 @@ export class SearchResultContentItem{ @@ -5,7 +5,7 @@ export class SearchResultContentItem{
5 resultType:string = "" 5 resultType:string = ""
6 } 6 }
7 7
8 -class SearchDescription{ 8 +export class SearchDescription{
9 likeEnable: string = "" 9 likeEnable: string = ""
10 previewUri: string = "" 10 previewUri: string = ""
11 firstFrameImageBucket: string = "" 11 firstFrameImageBucket: string = ""
@@ -178,7 +178,7 @@ class SearchDescription{ @@ -178,7 +178,7 @@ class SearchDescription{
178 likeNum: string= "" 178 likeNum: string= ""
179 readNum: string= "" 179 readNum: string= ""
180 shareNum: string= "" 180 shareNum: string= ""
181 - 181 + sameContentList:SearchDescription[] = []
182 } 182 }
183 183
184 @Observed 184 @Observed
@@ -4,7 +4,7 @@ import { EmitterEventId, EmitterUtils, Logger, StringUtils } from 'wdKit'; @@ -4,7 +4,7 @@ import { EmitterEventId, EmitterUtils, Logger, StringUtils } from 'wdKit';
4 import { HttpUtils } from 'wdNetwork/Index'; 4 import { HttpUtils } from 'wdNetwork/Index';
5 import HomeChannelUtils, { AssignChannelParam } from 'wdRouter/Index'; 5 import HomeChannelUtils, { AssignChannelParam } from 'wdRouter/Index';
6 import { MinePageComponent } from 'wdComponent/src/main/ets/components/page/MinePageComponent'; 6 import { MinePageComponent } from 'wdComponent/src/main/ets/components/page/MinePageComponent';
7 -import { CompUtils, TopNavigationComponent } from 'wdComponent/Index'; 7 +import { CompUtils, TopNavigationComponent, TopNavigationComponentNew } from 'wdComponent/Index';
8 import { VideoChannelPage } from './VideoChannelPage'; 8 import { VideoChannelPage } from './VideoChannelPage';
9 import ChannelViewModel from 'wdComponent/src/main/ets/viewmodel/ChannelViewModel'; 9 import ChannelViewModel from 'wdComponent/src/main/ets/viewmodel/ChannelViewModel';
10 10
@@ -17,6 +17,7 @@ let storage = LocalStorage.getShared(); @@ -17,6 +17,7 @@ let storage = LocalStorage.getShared();
17 @Entry(storage) 17 @Entry(storage)
18 @Component 18 @Component
19 export struct BottomNavigationComponent { 19 export struct BottomNavigationComponent {
  20 + private isNewTopPage = true // TODO 顶导重构页面开关,false,则用原来的顶导
20 @Provide bottomRectHeight: number = 0 21 @Provide bottomRectHeight: number = 0
21 @Provide topRectHeight: number = 0 22 @Provide topRectHeight: number = 0
22 @Provide isLayoutFullScreen: boolean = false 23 @Provide isLayoutFullScreen: boolean = false
@@ -82,15 +83,28 @@ export struct BottomNavigationComponent { @@ -82,15 +83,28 @@ export struct BottomNavigationComponent {
82 autoRefresh: this.autoRefresh 83 autoRefresh: this.autoRefresh
83 }) 84 })
84 } else { 85 } else {
85 - TopNavigationComponent({  
86 - groupId: navItem.id,  
87 - topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073),  
88 - _currentNavIndex: $currentNavIndex,  
89 - navIndex: index,  
90 - currentBottomNavName: navItem.name,  
91 - assignChannel: this.assignChannel,  
92 - autoRefresh: this.autoRefresh  
93 - }) 86 + if (this.isNewTopPage) {
  87 + TopNavigationComponentNew({
  88 + groupId: navItem.id,
  89 + topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073),
  90 + _currentNavIndex: $currentNavIndex,
  91 + bottomNavIndex: index,
  92 + currentBottomNavName: navItem.name,
  93 + assignChannel: this.assignChannel,
  94 + autoRefresh: this.autoRefresh
  95 + })
  96 + } else {
  97 + TopNavigationComponent({
  98 + groupId: navItem.id,
  99 + topNavList: navItem.topNavChannelList.filter(item => item.channelId != 2073),
  100 + _currentNavIndex: $currentNavIndex,
  101 + navIndex: index,
  102 + currentBottomNavName: navItem.name,
  103 + assignChannel: this.assignChannel,
  104 + autoRefresh: this.autoRefresh
  105 + })
  106 + }
  107 +
94 } 108 }
95 } 109 }
96 .tabBar(this.tabBarBuilder(navItem, index)) 110 .tabBar(this.tabBarBuilder(navItem, index))