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
liyubing
2024-05-30 11:29:45 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d3f35c4eab26463b1fa415a0ea4f5a8af66ff04b
d3f35c4e
1 parent
35e72328
feat:规整为一,跳转直播详情页面方法
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
36 deletions
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForOneComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalReservationComponent.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/vertical/PlayerComponent.ets
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
View file @
d3f35c4
...
...
@@ -295,6 +295,10 @@ export class ProcessUtils {
Logger.debug(TAG, `gotoVod, ${content.objectId}`);
}
/**
* 进入直播详情页面
* @param content
*/
public static async gotoLive(content: ContentDTO) {
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForOneComponent.ets
View file @
d3f35c4
import { Action, CompDTO, ContentDTO, Params } from 'wdBean'
import { WDRouterRule } from 'wdRouter/Index'
import {
ProcessUtils,
WDRouterRule } from 'wdRouter/Index'
import { Logger } from 'wdKit/Index'
import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'
import { LiveModel } from '../../viewmodel/LiveModel'
...
...
@@ -69,24 +69,9 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
.onClick(() => {
InfomationCardClick.track(this.compDTO, this.compDTO.operDataList[0], this.pageId, this.pageName)
this.clicked = true;
thi
s.gotoLive(this.compDTO?.operDataList[0])
ProcessUtil
s.gotoLive(this.compDTO?.operDataList[0])
})
}
async gotoLive(content: ContentDTO) {
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
detailPageType: 2,
contentID: content?.objectId,
extra: {
relType: content?.relType,
relId: content?.relId,
} as ExtraDTO
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
// Logger.debug(TAG, `gotoLive, ${content.objectId}`);
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalReservationComponent.ets
View file @
d3f35c4
...
...
@@ -5,7 +5,7 @@ import { CommonConstants } from 'wdConstant'
import { StringUtils } from 'wdKit/Index'
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
import {
ProcessUtils,
WDRouterPage, WDRouterRule } from 'wdRouter/Index'
@Component
export struct LiveHorizontalReservationComponent {
...
...
@@ -76,7 +76,7 @@ export struct LiveHorizontalReservationComponent {
.onClick(() => {
if (item.objectType != '0') {
console.log(item.objectId)
thi
s.gotoLive(item)
ProcessUtil
s.gotoLive(item)
}
})
})
...
...
@@ -107,20 +107,5 @@ export struct LiveHorizontalReservationComponent {
WDRouterRule.jumpWithPage(WDRouterPage.reserveMorePage)
}
async gotoLive(content: ContentDTO) {
let taskAction: Action = {
type: 'JUMP_DETAIL_PAGE',
params: {
detailPageType: 2,
contentID: content?.objectId,
extra: {
relType: content?.relType,
relId: content?.relId,
} as ExtraDTO
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
// Logger.debug(TAG, `gotoLive, ${content.objectId}`);
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveModel.ets
View file @
d3f35c4
...
...
@@ -10,6 +10,7 @@ import { SpConstants } from 'wdConstant/Index';
const TAG = 'LiveModel'
export class LiveModel {
getContentDetail(contentId: string, relId: string, relType: string) {
return new Promise<Array<ContentDetailDTO>>((success, fail) => {
ContentDetailRequest.getContentDetail({
...
...
@@ -19,9 +20,14 @@ export class LiveModel {
}).then(async (resDTO: ResponseDTO<ContentDetailDTO[]>) => {
console.log(TAG, 'getContentDetail:', JSON.stringify(resDTO.data))
if (resDTO.data) {
console.error("XXXXZZZZ", '---getContentDetail-0---1------------')
success(resDTO.data)
}else {
console.error("XXXXZZZZ", '---getContentDetail-0--2------------')
fail("数据为空")
}
}).catch(() => {
console.error("XXXXZZZZ", '---getContentDetail-0--2------------')
fail("数据为空")
})
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveViewModel.ets
View file @
d3f35c4
...
...
@@ -22,8 +22,10 @@ export class LiveViewModel {
getContentDetail(contentId: string, relId: string, relType: string) {
return new Promise<Array<ContentDetailDTO>>((success, fail) => {
this.liveModel.getContentDetail(contentId, relId, relType).then((data) => {
console.error("XXXXZZZZ", '---getContentDetail---1------------')
success(data)
}).catch((message: string) => {
console.error("XXXXZZZZ", '----getContentDetail--2------------')
fail(message)
})
})
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerComponent.ets
View file @
d3f35c4
...
...
@@ -76,7 +76,6 @@ export struct PlayerComponent {
playerController: this.playerController,
onLoad: () => {
this.isCanplay = true
console.error("XXXXZZZZ", '------2------------')
this.playerController?.firstPlay(this.playUrl);
}
})
...
...
@@ -85,7 +84,6 @@ export struct PlayerComponent {
playerController: this.playerController,
onLoad: () => {
this.isCanplay = true
console.error('XXXXZZZZ', '------1------------')
this.playerController?.firstPlay(this.playUrl);
}
}).margin({ top: 195 }).height(211)
...
...
Please
register
or
login
to post a comment