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
张善主
2024-05-30 10:17:11 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
d880f7c1b68081c04a534db8978615af6ad61db4
d880f7c1
2 parents
8b85b7dc
860293cc
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
480 additions
and
137 deletions
sight_harmony/commons/wdNetwork/src/main/ets/http/HttpUrlUtils.ets
sight_harmony/features/wdComponent/src/main/ets/components/CardParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardMediaInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card11Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card3Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card4Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow02.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveLikeComponent.ets
sight_harmony/features/wdComponent/src/main/module.json5
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayVLivePage.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveModel.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveViewModel.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/TopPlayComponet.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerCommentComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerTitleComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerUIComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/resources/base/media/live_room_image_fail.png
sight_harmony/features/wdHwAbility/src/main/ets/getuiPush/GetuiPush.ets
sight_harmony/features/wdHwAbility/src/main/ets/getuiPush/PushContentParser.ets
sight_harmony/features/wdHwAbility/src/main/ets/getuiPush/PushTransmitMessageBean.ets
sight_harmony/features/wdPlayer/src/main/ets/pages/WDPlayerRenderVLiveView.ets
sight_harmony/products/phone/src/main/ets/pages/view/BottomNavigationComponent.ets
sight_harmony/commons/wdNetwork/src/main/ets/http/HttpUrlUtils.ets
View file @
d880f7c
...
...
@@ -207,6 +207,11 @@ export class HttpUrlUtils {
* 直播详情-大家聊列表
*/
static readonly LIVE_CHAT_LIST_PATH: string = "/api/live-center-message/zh/a/live/message/chat/list";
/**
* C端评论列表 竖屏直播间
*/
static readonly LIVE_COMMENTS_LIST_PATH: string = "/api/live-center-message/zh/a/live/message/comments/list";
/**
* 直播详情-直播数据
*/
...
...
@@ -655,6 +660,16 @@ export class HttpUrlUtils {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.LIVE_CHAT_LIST_PATH
return url
}
/**
* 竖屏直播间 聊天信息接口
* @returns
*/
static getLiveCommentListUrl() {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.LIVE_COMMENTS_LIST_PATH
return url
}
// 直播详情-直播数据
static getLiveRoomDataUrl() {
let url = HttpUrlUtils.getHost() + HttpUrlUtils.LIVE_ROOM_DATA_PATH
...
...
sight_harmony/features/wdComponent/src/main/ets/components/CardParser.ets
View file @
d880f7c
...
...
@@ -32,6 +32,10 @@ export struct CardParser {
pageShowTime:number = 0;
pageHideTime:number = 0;
aboutToAppear(): void {
console.log('CardParser-', JSON.stringify(this.contentDTO))
}
onPageShow() {
this.pageShowTime = DateTimeUtils.getTimeStamp()
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
d880f7c
...
...
@@ -44,6 +44,7 @@ export struct CompParser {
aboutToAppear(): void {
console.log('CompParser-compDTO', JSON.stringify(this.compDTO))
// 轮播图屏蔽音频类型稿件
if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
...
...
@@ -93,7 +94,7 @@ export struct CompParser {
this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡"
LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(
5).color('#f5f5f5').padding({ left: 0, right: 0
})
Divider().strokeWidth(
1).color('#f5f5f5').padding({ left: 16, right: 16
})
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) {
if (this.compDTO.operDataList.length > 1) {
HorizontalStrokeCardThreeTwoRadioForMoreComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
...
...
@@ -103,7 +104,7 @@ export struct CompParser {
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) {
ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(
5).color('#f5f5f5').padding({ left: 0, right: 0
})
Divider().strokeWidth(
1).color('#f5f5f5').padding({ left: 16, right: 16
})
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_03) {
ZhSingleRow03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardMediaInfo.ets
View file @
d880f7c
...
...
@@ -229,7 +229,7 @@ export struct CardMediaInfo {
@Extend(Text)
function mediaText() {
.fontColor($r('app.color.color_fff'))
.fontSize($r('app.float.font_size_1
4
'))
.fontSize($r('app.float.font_size_1
3
'))
.lineHeight(18)
.textShadow({
radius: 2,
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card11Component.ets
View file @
d880f7c
...
...
@@ -39,13 +39,16 @@ export struct Card11Component {
Column() {
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).height(2
0
).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).height(2
8
).align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).height(2
0
).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).height(2
8
).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).height(28).align(Alignment.Center)
}
if (this.contentDTO.top === 1) {
Notes({ newTags: '置顶' }).height(28).align(Alignment.Center)
}
}
Text() {
...
...
@@ -70,7 +73,7 @@ export struct Card11Component {
.width(CommonConstants.FULL_WIDTH)
.textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
(this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5'
|| this.contentDTO.top === 1
) ? 35 :
0 )
}.alignContent(Alignment.TopStart)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card2Component.ets
View file @
d880f7c
...
...
@@ -69,6 +69,9 @@ export struct Card2Component {
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).height(29).align(Alignment.Center)
}
if (this.contentDTO.top === 1) {
Notes({ newTags: '置顶' }).height(29).align(Alignment.Center)
}
}
//新闻标题
// if (this.contentDTO.newTags) {
...
...
@@ -101,7 +104,7 @@ export struct Card2Component {
.align(Alignment.Start)
.textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
(this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5'
|| this.contentDTO.top === 1
) ? 35 :
0 )
}.alignContent(Alignment.TopStart)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card3Component.ets
View file @
d880f7c
...
...
@@ -50,6 +50,9 @@ export struct Card3Component {
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).height(29).align(Alignment.Center)
}
if (this.contentDTO.top === 1) {
Notes({ newTags: '置顶' }).height(29).align(Alignment.Center)
}
}
Text() {
if (this.titleMarked) {
...
...
@@ -71,7 +74,7 @@ export struct Card3Component {
.width(CommonConstants.FULL_WIDTH)
.textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
(this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5'
|| this.contentDTO.top === 1
) ? 35 :
0 )
}.alignContent(Alignment.TopStart)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card4Component.ets
View file @
d880f7c
...
...
@@ -55,6 +55,9 @@ export struct Card4Component {
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).height(19).align(Alignment.Center)
}
if (this.contentDTO.top === 1) {
Notes({ newTags: '置顶' }).height(20).align(Alignment.Center)
}
}
Text() {
if (this.titleMarked) {
...
...
@@ -76,7 +79,7 @@ export struct Card4Component {
.textOverflow({ overflow: TextOverflow.Ellipsis })
.textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
(this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5'
|| this.contentDTO.top === 1
) ? 35 :
0 )
}.alignContent(Alignment.TopStart)
//新闻标题
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card5Component.ets
View file @
d880f7c
...
...
@@ -82,6 +82,9 @@ export struct Card5Component {
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
}
if (this.contentDTO.top === 1) {
Notes({ newTags: '置顶' }).height(20).align(Alignment.Center)
}
}
Text() {
...
...
@@ -106,7 +109,7 @@ export struct Card5Component {
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
(this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5'
|| this.contentDTO.top === 1
) ? 35 :
0 )
}.alignContent(Alignment.TopStart)
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
View file @
d880f7c
...
...
@@ -18,6 +18,7 @@ const TAG: string = 'Card6Component-Card13Component';
@Component
export struct Card6Component {
@State pageId: string = '';
@State textHeight: number = 0 ; //获取文本的高度
@State pageName: string = '';
@State loadImg: boolean = false;
@State clicked: boolean = false;
...
...
@@ -61,9 +62,14 @@ export struct Card6Component {
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).height(28).align(Alignment.Center)
}
if (this.contentDTO.top === 1) {
Notes({ newTags: '置顶' }).height(28).align(Alignment.Center)
}
}
Text() {
Text()
{
if (this.titleMarked) {
ForEach(this.textArr, (textItem: textItem) => {
if (textItem.isRed) {
...
...
@@ -77,19 +83,20 @@ export struct Card6Component {
Span(this.contentDTO.newsTitle)
}
}
.fontColor(this.clicked ? 0x848484 : 0x222222)
.fontSize(18)
.lineHeight(27)
.fontWeight(FontWeight.Normal)
.maxLines(
3
)
.maxLines(
2
)
.alignSelf(ItemAlign.Start)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
(this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5'
|| this.contentDTO.top === 1
) ? 35 :
0 )
}.alignContent(Alignment.TopStart)
// .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 60: 156)
}
.justifyContent(FlexAlign.Start)
...
...
@@ -98,8 +105,12 @@ export struct Card6Component {
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
}
.alignItems(HorizontalAlign.Start)
.justifyContent(FlexAlign.Start)
.height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78: 156)
.justifyContent(FlexAlign.SpaceBetween)
.width('64%')
...
...
@@ -132,3 +143,4 @@ export struct Card6Component {
.alignItems(VerticalAlign.Top)
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card9Component.ets
View file @
d880f7c
...
...
@@ -98,6 +98,9 @@ export struct Card9Component {
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
}
if (this.contentDTO.top === 1) {
Notes({ newTags: '置顶' }).height(20).align(Alignment.Center)
}
}
}.alignContent(Alignment.BottomStart)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow02.ets
View file @
d880f7c
...
...
@@ -40,6 +40,7 @@ export struct ZhSingleRow02 {
}
.listDirection(Axis.Horizontal)
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
}
.width(CommonConstants.FULL_WIDTH)
.height(208)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
View file @
d880f7c
...
...
@@ -11,7 +11,6 @@ import {
import { LiveInfoDTO } from 'wdBean/src/main/ets/bean/detail/LiveInfoDTO'
import { VoiceInfoDTO } from 'wdBean/src/main/ets/bean/detail/VoiceInfoDTO'
import { LazyDataSource, StringUtils, UserDataLocal } from 'wdKit/Index'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
import MinePageDatasModel from '../../model/MinePageDatasModel'
import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'
import { CreatorDetailRequestItem } from '../../viewmodel/CreatorDetailRequestItem'
...
...
@@ -30,6 +29,7 @@ import { SearchCreatorComponent } from './SearchCreatorComponent'
import { JSON } from '@kit.ArkTS'
import { MoreComponent } from '../cardview/MoreComponent'
import { Card9Component } from '../cardview/Card9Component'
import { WDRouterRule, WDRouterPage } from 'wdRouter/Index'
const TAG = "SearchResultContentComponent"
...
...
@@ -46,6 +46,12 @@ export struct SearchResultContentComponent {
curPageNum: number = 1;
@State bean: FollowListDetailItem = new FollowListDetailItem("", "", "", "", "", "", "", "", "", -1, -1, "")
scroller: Scroller = new Scroller()
private scroller2: Scroller = new Scroller()
@State ellipseW: number = 0
@State moreWidth:number = 20
@State listLeft: number = 0
@State isEnd: boolean = false
aboutToAppear(): void {
if (this.searchType == "全部") {
...
...
@@ -243,7 +249,7 @@ export struct SearchResultContentComponent {
if (this.count == 0) {
ListHasNoMoreDataUI({ style: 2 })
} else {
List() {
List(
{scroller:this.scroller2}
) {
if (this.data_rmh != null && this.data_rmh.length > 0){
if (this.data_rmh.length === 1){
ListItem(){
...
...
@@ -306,44 +312,70 @@ export struct SearchResultContentComponent {
@Builder
SearchListUI() {
List({space:'8lpx'}) {
ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => {
ListItem() {
SearchCreatorComponent({item:item})
}
.width('150lpx')
.height('100%')
})
List({initialIndex: 0,space:'8lpx',scroller: this.scroller}) {
ListItemGroup(){
ForEach(this.data_rmh, (item: SearchRmhDescription, index: number) => {
ListItem() {
SearchCreatorComponent({item:item})
}
.width('150lpx')
.height('100%')
})
}.offset({ left: this.listLeft })
ListItem(){
Column(){
Text("查看更多")
.width('19lpx')
.fontSize('19lpx')
.fontWeight('400lpx')
.lineHeight('27lpx')
.fontColor($r('app.color.color_9E9E9E'))
}.borderRadius({topLeft:'4lpx',bottomLeft:'4lpx'})
.height('180lpx')
.width('77lpx')
.backgroundColor($r('app.color.color_EDEDED'))
.justifyContent(FlexAlign.Center)
this.itemEnd()
}.height('100%')
.margin({left:'23lpx'})
.onClick(()=>{
let params: Params = {
pageID: this.keywords
}
WDRouterRule.jumpWithPage(WDRouterPage.searchCreatorPage,params)
})
}
.cachedCount(6)
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.listDirection(Axis.Horizontal)
.width('100%')
.height('219lpx')
.onReachEnd(() => {
this.isEnd = true
console.log(TAG,'is end')
})
.onScrollFrameBegin((offset: number, state: ScrollState) => {
console.log(TAG,'offset', offset)
if (!this.scroller.isAtEnd()) {
this.isEnd = false
}
if (this.ellipseW > 0) {
return { offsetRemain: 0 }
}
return { offsetRemain: offset }
})
.parallelGesture(
PanGesture({ direction: PanDirection.Horizontal, distance: 1 })
.onActionStart((event: GestureEvent) => {
console.info(TAG,'Pan start')
})
.onActionUpdate((event: GestureEvent) => {
if (event && this.isEnd) {
// console.log('event.offsetX',event.offsetX)
this.listLeft = event.offsetX < -60 ? -60 : event.offsetX > 0 ? 0 : event.offsetX
this.ellipseW = (-this.listLeft) / 1.5
console.log(TAG,"this.ellipseW==>" + this.ellipseW)
}
})
.onActionEnd((event: GestureEvent) => {
console.info(TAG,'Pan end')
this.listLeft = 0
// this.moreWidth = 20
if (event.offsetX < 0 && this.ellipseW >=20) {
console.log(TAG,'跳转')
let params: Params = {
pageID: this.keywords
}
WDRouterRule.jumpWithPage(WDRouterPage.searchCreatorPage,params)
}
this.ellipseW = 0
})
)
Divider()
.width('100%')
...
...
@@ -352,6 +384,32 @@ export struct SearchResultContentComponent {
.strokeWidth('12lpx')
}
@Builder
itemEnd() {
Row() {
Ellipse()
.width(2* this.ellipseW)
.height('100%')
.fill('rgb(240,235,238)')
.position({ left: -this.ellipseW, top: 0 })
Column(){
Text(this.ellipseW === 0 ? '' : this.ellipseW < 20? '查看更多' : '松手查看')
.width('19lpx')
.fontSize('19lpx')
.fontWeight('400lpx')
.lineHeight('27lpx')
.fontColor("#9E9E9E")
}
.height('100%')
.width(this.moreWidth)
.backgroundColor("#EDEDED")
.justifyContent(FlexAlign.Center)
}
.height('100%')
}
private dataTransform(rem:CreatorDetailResponseItem[],value: SearchResultContentItem, photos: FullColumnImgUrlDTO[]): ContentDTO {
let rmhInfo = this.getRmhInfo(rem,value)
console.log('获取photos',JSON.stringify(photos))
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveLikeComponent.ets
View file @
d880f7c
...
...
@@ -9,6 +9,8 @@ import {
} from 'wdBean';
import { LiveModel } from '../../viewmodel/LiveModel';
import { HttpUtils } from 'wdNetwork/Index';
import vibrator from '@ohos.vibrator';
import { BusinessError } from '@ohos.base';
const TAG = 'LiveLikeComponent';
...
...
@@ -106,38 +108,63 @@ export struct LiveLikeComponent {
@Builder
likeCompStyle() {
Stack({ alignContent: Alignment.
Bottom
}) {
Stack({ alignContent: Alignment.
TopEnd
}) {
Column() {
Image(this.transLikeStyle().url)
.width(24)
.height(24)
.onClick(() => {
this.clickButtonEvent()
})
}
.justifyContent(FlexAlign.Center)
.width(36)
.height(36)
.borderRadius(18)
.backgroundColor((this.pageComponentType === 4 || this.pageComponentType === 2) ? '#4D000000' : this.pageComponentType === 8 ? Color.Transparent : '#FFF5F5F5')
Row() {
Text(NumberFormatterUtils.formatNumberWithWan(this.likeCount || ''))
.fontSize(8)
.fontColor(Color.White)
.padding({ left: 8, right: 2 })
if (this.likeCount != 0) {
RelativeContainer() {
Image(this.styleType == 1 ? $r('app.media.comment_icon_number_bg') : $r('app.media.ic_like_back_Select'))
.objectFit(ImageFit.Fill)
.resizable({
slice: {
top: 1,
left: 20,
right: 1,
bottom: 1
}
})
.alignRules({
top: { anchor: "Text", align: VerticalAlign.Top },
left: { anchor: "Text", align: HorizontalAlign.Start },
right: { anchor: "Text", align: HorizontalAlign.End },
bottom: { anchor: "Text", align: VerticalAlign.Bottom },
})
.id("Image")
Text(NumberFormatterUtils.formatNumberWithWan(this.likeCount || ''))// Text("44444444")
.fontSize(8)
.fontColor('#ffffff')// .backgroundColor('#ED2800')
.height(12)
.textAlign(TextAlign.Center)
.alignRules({
top: { anchor: "__container__", align: VerticalAlign.Top },
left: { anchor: "__container__", align: HorizontalAlign.Start }
})// .margin({left: 4,right:4
// })
/*动态计算文字宽度*/
.width(this.getMeasureText(NumberFormatterUtils.formatNumberWithWan(this.likeCount || '')) +
12)// .backgroundColor(Color.Green)
.id("Text")
.visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden)
}
.offset({
x: 18
})
}
.height(12)
.alignItems(VerticalAlign.Center)
.position({ x: '100%', y: 10 })
.markAnchor({ x: '100%' })
.backgroundImage($r('app.media.ic_like_back'))
.backgroundImageSize({height: 13})
.width(this.getMeasureText(NumberFormatterUtils.formatNumberWithWan(this.likeCount || '')) +
12)
.visibility(this.likeCount > 0 ? Visibility.Visible : Visibility.Hidden)
}
.width(36)
.height(42)
.height(36)
.onClick(() => {
this.clickButtonEvent()
})
.visibility(this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible)
}
...
...
@@ -164,6 +191,25 @@ export struct LiveLikeComponent {
this.LiveModel.getLiveRoomNumberLike(this.likeBean['contentId'], 1, HttpUtils.getDeviceId()).then((data) => {
console.log(TAG, '点赞接口调用成功', JSON.stringify(data))
try {
// 触发马达振动
vibrator.startVibration({
type: 'time',
duration: 100,
}, {
id: 0,
usage: 'alarm'
}, (error: BusinessError) => {
if (error) {
console.error(`Failed to start vibration. Code: ${error.code}, message: ${error.message}`);
return;
}
console.info('Succeed in starting vibration');
});
} catch (err) {
let e: BusinessError = err as BusinessError;
console.error(`An unexpected error occurred. Code: ${e.code}, message: ${e.message}`);
}
this.likeCount++
}).catch(() => {
...
...
sight_harmony/features/wdComponent/src/main/module.json5
View file @
d880f7c
...
...
@@ -12,6 +12,9 @@
"requestPermissions"
:
[
{
"name"
:
"ohos.permission.INTERNET"
},
{
"name"
:
"ohos.permission.VIBRATE"
}
],
"pages"
:
"$profile:main_pages"
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLiveCommon.ets
View file @
d880f7c
...
...
@@ -4,7 +4,7 @@ import router from '@ohos.router';
import { DetailPlayLivePage } from './DetailPlayLivePage';
import { DetailPlayVLivePage } from './DetailPlayVLivePage';
import { Logger } from 'wdKit/Index';
import { Logger
, ToastUtils
} from 'wdKit/Index';
import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel';
const TAG = 'DetailPlayLiveCommon'
...
...
@@ -68,19 +68,34 @@ export struct DetailPlayLiveCommon {
*/
getContentDetail() {
this.liveViewModel.getContentDetail(this.contentId, this.relId, this.relType)
.then((data: Array<ContentDetailDTO>) => {
.then(
async
(data: Array<ContentDetailDTO>) => {
console.log(TAG, '查询视频详情用于评论展示 getContentDetail:', JSON.stringify(data))
if (data) {
let detailData = data[0]
//人民号类型单独获取直播地址
if (detailData.rmhPlatform === 1) {
let vliveId = detailData.liveInfo.vlive[0].vliveId as string
console.error(TAG, 'vliveId==' + vliveId)
let pullStreamAddressData = await this.liveViewModel.getLiveRoomPullAddress(vliveId) as GetPullAddressBean
if (pullStreamAddressData) {
console.log(TAG, ' GetPullAddressBean:', JSON.stringify(pullStreamAddressData))
let m3u8uUrl = pullStreamAddressData.transCode[0].m3u8Url
detailData.liveInfo.vlive[0].liveUrl = m3u8uUrl
this.playUrl = m3u8uUrl
console.log(TAG, ' GetPullAddressBean:', m3u8uUrl)
}
}
this.liveLandscape =
detailData?.liveInfo?.liveLandScape
//String(this.contentDetailData?.liveInfo?.liveLandScape || '')
detailData?.liveInfo?.liveLandScape
this.liveState = detailData.liveInfo?.liveState
this.contentDetailData = data[0]
console.log(TAG, '查询视频详情用于评论展示 openComment:', detailData.openComment)
this.publishCommentModel.targetId = String(detailData?.newsId || '')
this.publishCommentModel.targetRelId = String(detailData?.reLInfo?.relId || '')
this.publishCommentModel.targetTitle = detailData?.newsTitle
...
...
@@ -100,39 +115,19 @@ export struct DetailPlayLiveCommon {
this.playUrl = detailData.liveInfo.vlive[0].replayUri
}
//人民号类型单独获取直播地址
if (detailData.rmhPlatform === 1) {
let vliveId = detailData.liveInfo.vlive[0].vliveId as string
console.error(TAG, 'vliveId==' + vliveId)
this.liveViewModel.getLiveRoomPullAddress(vliveId)
.then((data: GetPullAddressBean) => {
console.log(TAG, ' GetPullAddressBean:', JSON.stringify(data))
})
}
} else {
ToastUtils.shortToast('内容不存在')
router.back()
}
},()=>{
ToastUtils.shortToast('内容不存在')
router.back()
})
}
// /**
// *
// * @returns true : 沉浸式;false : 非沉浸式
// */
// isImmersionLive(): boolean {
//
// let flag = false
//
// if (this.liveState === 'wait' || this.liveLandscape === 'news') {
// flag = false
// } else if (this.liveLandscape === 'general') {
// flag = true
// }
//
// return flag
// }
onPageShow() {
this.pageShow = Math.random()
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayVLivePage.ets
View file @
d880f7c
...
...
@@ -93,10 +93,11 @@ export struct DetailPlayVLivePage {
.aspectRatio(1)
.visibility(this.swiperIndex === 0 ? Visibility.Visible : Visibility.Hidden)
.position({ x: '100%', y: '100%' })
.markAnchor({ x: 56, y:
56
})
.markAnchor({ x: 56, y:
this.bottomSafeHeight
})
.onClick(() => {
this.swiperController.showNext()
})
}
}
.height('100%')
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveModel.ets
View file @
d880f7c
...
...
@@ -127,6 +127,42 @@ export class LiveModel {
})
}
/**
* C端评论列表 竖屏直播间
* @param pageNum
* @param mLiveId
* @param liveId
* @param pageSize
* @returns
*/
getLiveCommentList(pageNum: number, mLiveId: string, liveId: string, pageSize: number) {
let params: Record<string, string> = {};
params['pageNum'] = pageNum + ''
params['mLiveId'] = mLiveId
params['liveId'] = liveId
params['pageSize'] = pageSize + ''
return new Promise<LiveRoomBean>((success, fail) => {
HttpRequest.post<ResponseDTO<LiveRoomBean>>(
HttpUrlUtils.getLiveCommentListUrl(),
params,
).then((data: ResponseDTO<LiveRoomBean>) => {
if (!data || !data.data) {
fail("数据为空")
return
}
if (data.code != 0) {
fail(data.message)
return
}
success(data.data)
}, (error: Error) => {
fail(error.message)
Logger.debug(TAG + ":error ", error.toString())
})
})
}
/**
* 获取直播数据
* @param liveId
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveViewModel.ets
View file @
d880f7c
...
...
@@ -30,14 +30,7 @@ export class LiveViewModel {
}
getLiveRoomPullAddress(vliveId:string){
// return new Promise<GetPullAddressBean>((success, fail) => {
// this.liveModel.getContentDetail(contentId, relId, relType).then((data) => {
// success(data)
// }).catch((message: string) => {
// fail(message)
// })
// })
async getLiveRoomPullAddress(vliveId:string) : Promise<GetPullAddressBean>{
return new Promise<GetPullAddressBean>((success, fail) => {
ContentDetailRequest.getLiveRoomPullStream(vliveId).then(async (resDTO: ResponseDTO<GetPullAddressBean>) => {
...
...
@@ -86,6 +79,17 @@ export class LiveViewModel {
})
}
//C端评论列表 竖屏直播间
getLiveCommentList(pageNum: number, mLiveId: string, liveId: string, pageSize: number) {
return new Promise<LiveRoomBean>((success, fail) => {
this.liveModel.getLiveCommentList(pageNum, mLiveId, liveId, pageSize).then((data) => {
success(data)
}).catch((message: string) => {
fail(message)
})
})
}
//直播详情直播间数据
getLiveRoomData(liveId: string) {
return new Promise<LiveRoomDataBean>((success, fail) => {
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/TopPlayComponet.ets
View file @
d880f7c
...
...
@@ -15,6 +15,7 @@ export struct TopPlayComponent {
playerController?: WDAliPlayerController
// 预告片图片/视频url
@State previewUrl: string = ''
// 预告资源是否是视频资源
@State isVideoSource: boolean = false
//未开始
@State isWait: boolean = false
...
...
@@ -61,6 +62,9 @@ export struct TopPlayComponent {
this.updateData()
}
/**
* 更新直播播放数据
*/
updateData() {
// 检测等待中的直播预告是否视频资源
if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewType === 1
...
...
@@ -93,29 +97,48 @@ export struct TopPlayComponent {
this.isEnd = this.contentDetailData?.liveInfo?.liveState === 'end' &&
StringUtils.isEmpty(this.contentDetailData?.liveInfo?.vlive[0]?.replayUri)
if (!this.isWait && this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.vlive.length > 0) {
let playUrl = ''
if (this.contentDetailData.liveInfo.liveState == 'running') {
playUrl = this.contentDetailData.liveInfo.vlive[0].liveUrl
} else if (this.contentDetailData.liveInfo.liveState == 'end') {
playUrl = this.contentDetailData.liveInfo.vlive[0].replayUri
}
if (this.isVideoSource) {
this.playUrl = this.previewUrl
this.tryToPlay()
} else {
if (StringUtils.isNotEmpty(playUrl)) {
Logger.debug(TAG, `${playUrl}`)
this.playUrl = playUrl
// Logger.debug(TAG, `---0------>` + this.isWait + ' ->' + this.isLoading + ' ->' + this.isEnd)
if (!this.isWait) {
if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.vlive.length > 0) {
let playUrl = ''
if (this.contentDetailData.liveInfo.liveState == 'running') {
playUrl = this.contentDetailData.liveInfo.vlive[0].liveUrl
} else if (this.contentDetailData.liveInfo.liveState == 'end') {
playUrl = this.contentDetailData.liveInfo.vlive[0].replayUri
}
if (this.isVideoSource) {
this.playUrl = this.previewUrl
this.tryToPlay()
} else {
Logger.debug(TAG, `---0------>${playUrl}`)
if (StringUtils.isNotEmpty(playUrl)) {
this.playUrl = playUrl
this.tryToPlay()
}
}
} else {
this.isWait = true
this.isLoading = true
}
}
// 文字直播 running 状态
if (this.contentDetailData?.liveInfo?.liveWay === 1 && this.contentDetailData?.liveInfo?.liveState === 'running') {
this.isWait = true
this.isLoading = true
if (this.contentDetailData.fullColumnImgUrls && this.contentDetailData.fullColumnImgUrls.length > 0) {
this.previewUrl = this.contentDetailData.fullColumnImgUrls[0].url
} else {
this.previewUrl = ''
}
}
}
tryToPlay() {
Logger.debug(TAG, `---1------>`)
if (!this.xComponentIsLoaded) {
Logger.debug(TAG, "需要xComponent加载完成")
return
...
...
@@ -136,6 +159,7 @@ export struct TopPlayComponent {
this.isLoading = false
this.isError = false
this.xComponentIsLoaded = true
Logger.debug(TAG, `---onLoad------>`)
this.tryToPlay()
}
})
...
...
@@ -149,6 +173,7 @@ export struct TopPlayComponent {
// 直播房间图
Image(this.previewUrl)
.objectFit(ImageFit.Cover)
.alt($r('app.media.live_room_image_fail'))
.visibility(this.isWait || this.isEnd ? Visibility.Visible : Visibility.None)
.contrast(this.isEnd ? 0.2 : 1)
.width('100%')
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerCommentComponent.ets
View file @
d880f7c
...
...
@@ -13,7 +13,9 @@ import { router } from '@kit.ArkUI'
import { EmitterEventId, EmitterUtils, Logger, SPHelper, WindowModel } from 'wdKit/Index'
const TAG = "PlayerCommentComponent"
/**
* 沉浸式直播--- 聊天区域
*/
@Component
export struct PlayerCommentComponent {
liveViewModel: LiveViewModel = new LiveViewModel()
...
...
@@ -46,7 +48,7 @@ export struct PlayerCommentComponent {
getLiveChatList() {
this.pageModel.currentPage = 1
this.liveViewModel.getLiveC
ha
tList(
this.liveViewModel.getLiveC
ommen
tList(
1,
this.contentDetailData?.liveInfo?.mlive?.mliveId,
this.contentDetailData?.newsId+'',
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerComponent.ets
View file @
d880f7c
...
...
@@ -6,7 +6,8 @@ const TAG = 'PlayerComponent'
@Component
export struct PlayerComponent {
@Prop playerController: WDAliPlayerController;
private playerController?: WDAliPlayerController
@Consume @Watch('updateData') contentDetailData: ContentDetailDTO
@Consume @Watch('pageShowChange') pageShow: number
@Consume @Watch('pageHideChange') pageHide: number
...
...
@@ -16,6 +17,7 @@ export struct PlayerComponent {
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State imgUrl: string = ''
@State isWait: boolean = false
// 0-横屏流画面,1-竖屏幕流画面
@State liveStreamType: number | null = -1
@State playUrl: string = ''
@State isCanplay: boolean = false
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerTitleComponent.ets
View file @
d880f7c
...
...
@@ -3,10 +3,12 @@ import { ContentDetailDTO, LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Inde
import { LiveFollowComponent, LottieView } from 'wdComponent/Index'
import { NumberFormatterUtils } from 'wdKit/Index'
/**
* 沉浸式直播--- 头部标题
*/
@Preview
@Component
export struct PlayerTitleComponent {
// @Consume liveDetailsBean: LiveDetailsBean
@Consume liveRoomDataBean: LiveRoomDataBean
@Consume liveState: string
@Consume contentDetailData: ContentDetailDTO
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerUIComponent.ets
View file @
d880f7c
import { ContentDetailDTO } from 'wdBean/Index';
import { WDAliPlayerController, WDPlayerController } from 'wdPlayer/Index';
import { WDAliPlayerController } from 'wdPlayer/Index';
import { PlayerCommentComponent } from './PlayerCommentComponent';
import { PlayerTitleComponent } from './PlayerTitleComponent';
import { PlayerVideoControlComponent } from './PlayerVideoControlComponent';
/**
* 沉浸直播 --- 横滑展示组件
*/
@Component
export struct PlayerUIComponent {
private playerController?: WDAliPlayerController
...
...
@@ -12,10 +14,6 @@ export struct PlayerUIComponent {
build() {
Stack() {
PlayerTitleComponent()
// Row() {
// // 全屏与暂停按钮
// }.layoutWeight(1)
PlayerCommentComponent()
.visibility(this.isShowControl ? Visibility.Hidden : Visibility.Visible)
...
...
sight_harmony/features/wdDetailPlayLive/src/main/resources/base/media/live_room_image_fail.png
0 → 100644
View file @
d880f7c
11.6 KB
sight_harmony/features/wdHwAbility/src/main/ets/getuiPush/GetuiPush.ets
View file @
d880f7c
...
...
@@ -8,10 +8,14 @@ import PushManager, {
import { AppUtils, DeviceUtil, EmitterEventId, EmitterUtils, Logger, SPHelper } from 'wdKit/Index';
import { HostEnum, HostManager, HttpBizUtil, HttpUrlUtils, HttpUtils, ResponseDTO } from 'wdNetwork/Index';
import { notificationManager } from '@kit.NotificationKit';
import { BusinessError } from '@kit.BasicServicesKit';
import {
AsyncCallback,
BusinessError } from '@kit.BasicServicesKit';
import { SpConstants } from 'wdConstant/Index';
import { PushContentBean, PushContentParser } from './PushContentParser';
import { ParamType, Tracking } from 'wdTracking/Index';
import { PushTransmitMessageBean, PushTransmitMessagePayloadBean } from './PushTransmitMessageBean';
import { JSON } from '@kit.ArkTS';
import wantAgent from '@ohos.app.ability.wantAgent';
import { WantAgent } from '@ohos.app.ability.wantAgent';
const TAG = "GetuiPush"
...
...
@@ -209,7 +213,11 @@ export class GetuiPush {
return
}
if (this.lastPushContent.online) {
if (this.lastPushContent.want) {
if (this.lastPushContent.localNotify == true) {
Logger.debug(TAG, "推送 回执???: " + this.lastPushContent.want)
let gtactionid = 60002;//gtactionid传⼊60002表示个推渠道消息点击了
PushManager.sendFeedbackMessage(this.lastPushContent.messageId || "", this.lastPushContent.taskId || "", gtactionid)
} else if (this.lastPushContent.want) {
Logger.debug(TAG, "推送 回执: " + this.lastPushContent.want)
PushManager.setClickWant(this.lastPushContent.want)
}
...
...
@@ -325,6 +333,81 @@ export class GetuiPush {
// */
// int gtactionid = 60002;//gtactionid传⼊60002表示个推渠道消息点击了
// boolean result = PushManager.sendFeedbackMessage(taskid, messageid, gtactionid);
this.sendLocalNotification(message)
}
private sendLocalNotification(message: GTTransmitMessage) {
let jsonMsgObj = JSON.parse(message.payload) as PushTransmitMessageBean
if (!jsonMsgObj) {
return
}
if (jsonMsgObj && jsonMsgObj.payload) {
jsonMsgObj.payloadObj = JSON.parse(jsonMsgObj.payload) as PushTransmitMessagePayloadBean
}
let pushLink = jsonMsgObj.payloadObj?.pushLink || ""
let params: Record<string, string> = {
"title": jsonMsgObj.title,
"content": jsonMsgObj.body,
"pushLink": pushLink,
"taskid": message.taskId,
"messageId": message.messageId,
"gtTransmitMsgLocalNotify": "1",
}
this.getWantAgent(params, (error, want) => {
if (error) {
return
}
let notificationRequest: notificationManager.NotificationRequest = {
id: Date.now(),
content: {
notificationContentType: notificationManager.ContentType.NOTIFICATION_CONTENT_BASIC_TEXT,
normal: {
title: jsonMsgObj.title,
text: jsonMsgObj.body,
}
},
notificationSlotType: notificationManager.SlotType.CONTENT_INFORMATION,
wantAgent:want,
};
notificationManager.publish(notificationRequest).then(() => {
Logger.debug(TAG, "本地发送系统通知完成")
}).catch((err: BusinessError) => {
Logger.debug(TAG, "本地发送系统通知失败:" + JSON.stringify(err))
});
})
}
private getWantAgent(parameters:Record<string, string>, callback: AsyncCallback<WantAgent>) {
// 通过WantAgentInfo的operationType设置动作类型
let wantAgentInfo:wantAgent.WantAgentInfo = {
wants: [
{
deviceId: '',
bundleName: 'com.peopledailychina.hosactivity',
abilityName: 'EntryAbility',
action: 'com.test.pushaction',
entities: [],
uri: "rmrbapp://rmrb.app:8080/openwith",
parameters: parameters
}
],
operationType: wantAgent.OperationType.START_ABILITY,
requestCode: 0,
wantAgentFlags:[wantAgent.WantAgentFlags.CONSTANT_FLAG]
};
wantAgent.getWantAgent(wantAgentInfo, (err:BusinessError, data:WantAgent) => {
if (err) {
Logger.error(TAG, `Failed to get want agent. Code is ${err.code}, message is ${err.message}`)
}
if (callback) {
callback(err, data)
}
});
}
private uploadPushInfo(cid: string) {
...
...
sight_harmony/features/wdHwAbility/src/main/ets/getuiPush/PushContentParser.ets
View file @
d880f7c
...
...
@@ -11,6 +11,12 @@ export interface PushContentBean {
pushLink?: string // 解析want,对应pushLink参数
notifyTitle?: string
notifyContent?: string
// 透传消息发送的本地测试通知
localNotify?:boolean
taskId?: string
messageId?: string
}
/*
...
...
@@ -18,6 +24,8 @@ export interface PushContentBean {
* */
export class PushContentParser {
private static LAUNCH_PARAM_GETUI_TRANSMIT_MSG_LOCAL_NOTIFY = "gtTransmitMsgLocalNotify"
private static LAUNCH_PARAM_GETUI_DATA = "gtdata"
private static LAUNCH_PARAM_GETUI_TASKID = "taskid"
private static LAUNCH_PARAM_GETUI_NOTIFYID = "_push_notifyid"
...
...
@@ -116,6 +124,21 @@ export class PushContentParser {
}
}
// 本地发送的测试通知
if (want && want.parameters && want.parameters[PushContentParser.LAUNCH_PARAM_GETUI_TRANSMIT_MSG_LOCAL_NOTIFY]) {
if (want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK]) {
let pushLink = want.parameters[PushContentParser.PUSH_PARAM_PUSH_LINK] as string
return {
isPush: true, online: true, pushLink: pushLink, want: want,
notifyTitle: want.parameters["title"] as string,
notifyContent: want.parameters["content"] as string,
localNotify: true,
taskId: want.parameters["taskId"] as string,
messageId: want.parameters["messageId"] as string,
}
}
}
return {
isPush: false, online: false
}
...
...
sight_harmony/features/wdHwAbility/src/main/ets/getuiPush/PushTransmitMessageBean.ets
0 → 100644
View file @
d880f7c
export interface PushTransmitMessageBean {
body: string
title: string
clickType: string
payload: string
payloadObj?: PushTransmitMessagePayloadBean
}
export interface PushTransmitMessagePayloadBean {
pushLink: string
}
\ No newline at end of file
...
...
sight_harmony/features/wdPlayer/src/main/ets/pages/WDPlayerRenderVLiveView.ets
View file @
d880f7c
...
...
@@ -59,7 +59,8 @@ export struct WDPlayerRenderVLiveView {
this.playerController.onVideoSizeChange = (width: number, height: number) => {
// console.log(`WDPlayerRenderView onVideoSizeChange width:${width} videoTop:${height}`)
Logger.info(TAG, ` onVideoSizeChange width:${width} videoTop:${height}`)
// Logger.info(TAG, ` onVideoSizeChange width:${width} videoTop:${height}`)
console.error(TAG, ` onVideoSizeChange width:${width} videoTop:${height}`)
this.videoWidth = width;
this.videoHeight = height;
this.updateLayout()
...
...
sight_harmony/products/phone/src/main/ets/pages/view/BottomNavigationComponent.ets
View file @
d880f7c
...
...
@@ -7,7 +7,7 @@ import { MinePageComponent } from 'wdComponent/src/main/ets/components/page/Mine
import { CompUtils, TopNavigationComponent, TopNavigationComponentNew } from 'wdComponent/Index';
import { VideoChannelPage } from './VideoChannelPage';
import ChannelViewModel from 'wdComponent/src/main/ets/viewmodel/ChannelViewModel';
import { ImageKnifeComponent, ImageKnifeOption, NONE } from '@ohos/imageknife';
import {
ALL,
ImageKnifeComponent, ImageKnifeOption, NONE } from '@ohos/imageknife';
const TAG = 'BottomNavigationComponent';
PersistentStorage.persistProp('channelIds', '');
...
...
@@ -188,8 +188,8 @@ export struct BottomNavigationComponent {
errorholderSrc: defaultIcon,
// 是否开启一级内存缓存
isCacheable: true,
// 磁盘缓存none
strategy: new NONE()
// 磁盘缓存
strategy: new ALL()
};
return imageKnifeOption
}
...
...
@@ -263,6 +263,7 @@ export struct BottomNavigationComponent {
}
onBottomNavigationDataUpdated() {
Logger.error('yyyy','onBottomNavigationDataUpdated '+JSON.stringify(this.bottomNavList))
// Logger.info(TAG, `onBottomNavigationDataUpdated currentNavIndex: ${this.currentNavIndex},length:${this.bottomNavItemList.length}`);
}
...
...
Please
register
or
login
to post a comment