wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  fix |> 20791 人民号>推荐频道,地方精选卡不应展示更多按钮,见对比截图。
  ref |> 修复离开直播详情时,没有退出直播IM问题
  fix |> 20785 【偶现】搜索结果,数据重复展示
... ... @@ -8,4 +8,5 @@ export const enum BottomNavi {
VIDEO=2,
SERVICE=3,
MINE=4,
TEMPLATE=5,
}
... ...
... ... @@ -112,6 +112,7 @@ export class ContentDTO implements BaseDTO {
sameContentList:ContentDTO[] = []
sameContentListJson:string = ""
sameContentListSize:number = 0
sameContentListId:string = ""
/*
本地辅助字段
*/
... ...
import { CompDTO, ContentDTO } from 'wdBean';
import { CommonConstants, CompStyle } from 'wdConstant/Index';
import { BottomNavi, CommonConstants, CompStyle } from 'wdConstant/Index';
import PageModel from '../viewmodel/PageModel';
import { CardParser } from './CardParser';
import { Card2Component } from './cardview/Card2Component';
... ... @@ -42,6 +42,7 @@ export struct CompParser {
@State private pageModel: PageModel = new PageModel();
@State audioItems: ContentDTO[] = [];
@State noneAudioItems: ContentDTO[] = [];
bottomNavi:BottomNavi = BottomNavi.PEOPLE
aboutToAppear(): void {
... ... @@ -167,7 +168,7 @@ export struct CompParser {
ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg })
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) {
ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg })
ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg ,bottomNavi:this.bottomNavi})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) {
// ZhSingleRow05({ compDTO })
... ...
import { CompDTO, ContentDTO } from 'wdBean';
import { CommonConstants } from 'wdConstant';
import { BottomNavi, CommonConstants } from 'wdConstant';
import { DateTimeUtils } from 'wdKit';
import { ProcessUtils } from 'wdRouter';
import { InfomationCardClick } from '../../utils/infomationCardClick';
... ... @@ -15,6 +15,7 @@ export struct ZhSingleRow04 {
@State pageId: string = '';
@State pageName: string = '';
@State compDTO: CompDTO = {} as CompDTO
bottomNavi:BottomNavi = BottomNavi.PEOPLE
build() {
Column() {
... ... @@ -32,6 +33,8 @@ export struct ZhSingleRow04 {
.lineHeight(25)
}
if(this.bottomNavi === BottomNavi.NEWS){
Row() {
Text("更多")
.fontSize($r("app.float.font_size_14"))
... ... @@ -57,6 +60,7 @@ export struct ZhSingleRow04 {
}
})
}
}
.justifyContent(FlexAlign.SpaceBetween)
.margin({ bottom: 8 })
.width('100%')
... ...
... ... @@ -125,7 +125,8 @@ export struct PageComponent {
nextCompDTO: compIndex === this.pageModel.compList.getDataArray().length - 1 ? new CompDTO() : this.pageModel.compList.get(compIndex + 1) as CompDTO,
compDTO: compDTO,
compIndex: compIndex,
pageId: this.pageId
pageId: this.pageId,
bottomNavi:this.bottomNavi
}
)
}
... ...
... ... @@ -9,6 +9,7 @@ import LoadMoreLayout from '../LoadMoreLayout'
import TemplatePageHelp from './TemplatePageHelp'
import TemplatePageModel from './TemplatePageModel'
import { TemplatePageStateType } from './TemplatePageStateType'
import { BottomNavi} from 'wdConstant/Index';
const TAG: string = 'TemplatePageComponent';
... ... @@ -126,7 +127,8 @@ export default struct TemplatePageComponent {
nextCompDTO: index === this.templatePage.compList.getDataArray().length - 1 ? new CompDTO() : this.templatePage.compList.get(index + 1) as CompDTO,
compIndex: index,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName,
bottomNavi:BottomNavi.TEMPLATE
});
}
}
... ...
... ... @@ -62,7 +62,6 @@ export struct SearchResultContentComponent {
this.curPageNum = 1
this.hasMore = true
this.isLoading = false
this.getNewSearchResultData()
}
... ... @@ -86,6 +85,10 @@ export struct SearchResultContentComponent {
}
getNewSearchResultData() {
if (this.isLoading){
return
}
this.isLoading = true
if (this.hasMore) {
SearcherAboutDataModel.getSearchResultListData("20", `${this.curPageNum}`, this.searchType, this.keywords,
... ... @@ -178,6 +181,8 @@ export struct SearchResultContentComponent {
this.isLoading = false
this.count = this.count === -1 ? 0 : this.count
})
}else{
this.isLoading = false
}
}
... ... @@ -236,14 +241,25 @@ export struct SearchResultContentComponent {
// }
let contentDTO = this.dataTransform(rem, value, photos);
if (value.data.type != "13") {
//避免 重复(偶现bug 暂时处理)
let index = this.data.getDataArray().findIndex(obj => obj.objectId == contentDTO.objectId);
if (index === -1) {
this.data.push(contentDTO)
if (value.data.sameContentList != null && value.data.sameContentList.length > 0) {
let contentDTO2 = new ContentDTO();
contentDTO2.sameContentListId = contentDTO.objectId + value.data.sameContentList[0].id
contentDTO2.sameContentListJson = JSON.stringify(value.data.sameContentList)
contentDTO2.sameContentListSize = value.data.sameContentList.length
let index = this.data.getDataArray().findIndex(obj => obj.sameContentListId == contentDTO2.sameContentListId)
if (index === -1){
this.data.push(contentDTO2)
}
}
}
}
})
this.tempList = []
... ... @@ -256,6 +272,7 @@ export struct SearchResultContentComponent {
}
this.isLoading = false
}).catch((err: Error) => {
this.isLoading = false
console.log(TAG, JSON.stringify(err))
})
}).catch((err: Error) => {
... ... @@ -265,6 +282,7 @@ export struct SearchResultContentComponent {
})
} else {
this.hasMore = false
this.isLoading = false
}
}
... ...
... ... @@ -51,4 +51,7 @@ export class LiveDetailChatRoomController {
room.enterRoom()
}
}
disconnectLiveRoom() {
LiveRoomManager.sharedManager().disconnect()
}
}
\ No newline at end of file
... ...
... ... @@ -100,6 +100,7 @@ export struct DetailPlayLivePage {
Logger.info(TAG, `wyj-aboutToDisappear`)
await this.playerController?.stop()
await this.playerController?.release()
this.chatRoomController.disconnectLiveRoom()
}
configChatRoom() {
... ...
... ... @@ -84,6 +84,7 @@ export struct DetailPlayVLivePage {
aboutToDisappear(): void {
this.closeFullScreen()
this.chatRoomController.disconnectLiveRoom()
}
openFullScreen() {
... ...