Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
yanlu
2024-05-10 11:55:05 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
76e9bfc08a9a55327e9d0c03b3e9f572488c3619
76e9bfc0
1 parent
eeec3d2e
fix:16646 功能缺陷--进入直播间稿费测试-直播间详情页, 人民日报主持人记录没显示;大家聊图片未显示
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
15 deletions
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabChatComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabChatItemComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabLiveComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabLiveItemComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabChatComponent.ets
View file @
76e9bfc
...
...
@@ -7,6 +7,9 @@ import PageModel from 'wdComponent/src/main/ets/viewmodel/PageModel'
import { ViewType } from 'wdConstant/Index'
import { LiveViewModel } from '../../viewModel/LiveViewModel'
import { TabChatItemComponent } from './TabChatItemComponent'
import { Logger } from 'wdKit';
const TAG: string = 'TabChatComponent';
@Component
export struct TabChatComponent {
...
...
@@ -84,6 +87,7 @@ export struct TabChatComponent {
20,)
.then(
(data) => {
Logger.debug(TAG, `${JSON.stringify(data)}`)
if (data.barrageResponses && data.barrageResponses.length > 0) {
this.pageModel.viewType = ViewType.LOADED;
this.liveChatList.push(...data.barrageResponses)
...
...
@@ -98,7 +102,8 @@ export struct TabChatComponent {
}
},
() => {
Logger.debug(TAG, `error`)
this.pageModel.viewType = ViewType.ERROR;
})
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabChatItemComponent.ets
View file @
76e9bfc
import { LiveRoomItemBean } from 'wdBean/Index'
import { LiveRoomItemBean
, Action, PhotoListBean, Params
} from 'wdBean/Index'
import { StringUtils } from 'wdKit/Index'
// import { Action, LiveRoomItemBean, Params, PhotoListBean } from 'wdBean/Index'
import { WDRouterRule } from 'wdRouter'
import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'
@Component
export struct TabChatItemComponent {
...
...
@@ -14,17 +17,40 @@ export struct TabChatItemComponent {
.borderRadius(90)
.width(24)
.height(24)
Text() {
Span(this.item.senderUserName + ': ')
.fontColor('#666666')
Span(this.item.text)
.fontColor('#222222')
Column() {
Row() {
Text() {
Span(this.item.senderUserName + ': ')
.fontColor('#666666')
Span(this.item.text)
.fontColor('#222222')
}
.margin({ left: 8 })
.lineHeight(20)
.layoutWeight(1)
.fontSize('14fp')
.fontWeight(400)
}
.alignItems(VerticalAlign.Top)
if (this.item.dataType == 'ZH_TEXT_AND_IMAGE_MSG' && this.item.pictureUrls && this.item.pictureUrls.length > 0) {
Image(this.item.pictureUrls[0])
.width(`100%`)
.objectFit(ImageFit.Contain)
.borderRadius(4)
.margin({
top: 10
})
.onClick(() => {
this.gotoMultipleListImagePage(this.item.pictureUrls[0])
})
}
}
.margin({ left: 8 })
.lineHeight(20)
.margin({
left: 8,
right: 8
})
.layoutWeight(1)
.fontSize('14fp')
.fontWeight(400)
.alignItems(HorizontalAlign.Start)
}
.alignItems(VerticalAlign.Top)
.padding({
...
...
@@ -32,6 +58,32 @@ export struct TabChatItemComponent {
top: 15,
right: 15
})
}
/**
* 大图列表页
* @param content
* */
gotoMultipleListImagePage(imgUrl: string) {
const photoList: PhotoListBean[] = []
photoList.push({
width: 0,
height: 0,
picPath: imgUrl,
picDesc: ''
})
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
detailPageType: 18,
extra: {
photoList: photoList,
swiperIndex: 0,
} as ExtraDTO
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
}
aboutToDisappear(): void {
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabLiveComponent.ets
View file @
76e9bfc
...
...
@@ -9,6 +9,10 @@ import LoadMoreLayout from 'wdComponent/src/main/ets/components/page/LoadMoreLay
import RefreshLayout from 'wdComponent/src/main/ets/components/page/RefreshLayout'
import { StringUtils } from 'wdKit/Index'
import { LiveViewModel } from '../../viewModel/LiveViewModel'
import { Logger } from 'wdKit'
const TAG: string = 'TabLiveComponent';
@Component
export struct TabLiveComponent {
...
...
@@ -86,6 +90,7 @@ export struct TabLiveComponent {
20)
.then(
(data) => {
Logger.debug(TAG, `${JSON.stringify(data)}`)
if (data.barrageResponses && data.barrageResponses.length > 0) {
/**
* 在直播聊天添加一条新内容逻辑:
...
...
@@ -119,6 +124,8 @@ export struct TabLiveComponent {
}
},
() => {
Logger.debug(TAG, `Error`)
this.pageModel.viewType = ViewType.ERROR;
})
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabLiveItemComponent.ets
View file @
76e9bfc
...
...
@@ -88,15 +88,15 @@ export struct TabLiveItemComponent {
if (this.item.pictureUrls.length > 1) {
Image(itemSub)
.width(`${100 / this.item.pictureUrls.length}%`)
.height(70)
.objectFit(ImageFit.Auto)
// .height(70)
.objectFit(ImageFit.Contain)
.borderRadius(4)
} else {
Image(itemSub)
.width(`100%`)
// .aspectRatio(this.getAspectRation())
.height(177)
.objectFit(ImageFit.Auto)
// .height(177)
.objectFit(ImageFit.Contain)
.borderRadius(4)
}
}.onClick(() => {
...
...
Please
register
or
login
to post a comment