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
zhenghy
2024-04-25 15:30:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b695eacc71d4408e20adb97b3b5263e869ce2a98
b695eacc
1 parent
36a76555
修改视频详情页右侧互动数量展示
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
22 deletions
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailVideoListPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerRightView.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailVideoListPage.ets
View file @
b695eac
...
...
@@ -24,10 +24,8 @@ export struct DetailVideoListPage {
@Provide pageHide: number = -1
@Provide switchVideoStatus: boolean = false
@State data: ContentDetailDTO[] = []
@State testData: string[] = ['111', '222', '333']
@State currentIndex: number = 0
@State interactDataList: InteractDataDTO[] = []
@State isFullScreen: boolean = false
async aboutToAppear(): Promise<void> {
this.openFullScreen()
...
...
@@ -41,10 +39,7 @@ export struct DetailVideoListPage {
}
await this.getContentDetail(this.contentId, this.relId, this.relType)
}
await this.queryVideoList()
await this.getContentInteract()
console.log(TAG, 'aboutToAppear', JSON.stringify(action.params))
}
...
...
@@ -93,9 +88,22 @@ export struct DetailVideoListPage {
contentId: contentId,
relId: relId,
relType: relType
}).then((resDTO: ResponseDTO<ContentDetailDTO[]>) => {
console.error('getContentDetail==', JSON.stringify(resDTO.data))
}).then(async (resDTO: ResponseDTO<ContentDetailDTO[]>) => {
console.log(TAG, 'getContentDetail:', JSON.stringify(resDTO.data))
if (resDTO.data) {
const params: contentListParams = {
contentList: [{
contentId: resDTO.data[0].newsId + '',
contentType: resDTO.data[0].newsType
}]
}
// 批量查询内容当前用户点赞、收藏状态
await ContentDetailRequest.getContentInteract(params).then(res => {
if (res.data) {
this.interactDataList = this.interactDataList.concat(res.data)
}
console.log('获取互动点赞等数据===', JSON.stringify(res))
})
this.data.push(resDTO.data[0])
}
})
...
...
@@ -108,8 +116,9 @@ export struct DetailVideoListPage {
await ContentDetailRequest.postRecommendVideoList({
pageSize: 5,
refreshCnt: 1
}).then(res => {
}).then(
async
res => {
if (res.data) {
await this.getContentInteract(res.data)
this.data = this.data.concat(res.data)
console.log('视频列表===', JSON.stringify(res.data))
}
...
...
@@ -119,12 +128,12 @@ export struct DetailVideoListPage {
/**
* 批量查询内容当前用户点赞、收藏状态
*/
async getContentInteract() {
if (this.data.length > 0) {
async getContentInteract(data: ContentDetailDTO[]) {
if (data.length > 0) {
const params: contentListParams = {
contentList: []
}
this.
data.map(item => {
data.map(item => {
params.contentList.push({
contentId: item.newsId + '',
contentType: item.newsType
...
...
@@ -133,7 +142,7 @@ export struct DetailVideoListPage {
// 批量查询内容当前用户点赞、收藏状态
await ContentDetailRequest.getContentInteract(params).then(res => {
if (res.data) {
this.interactDataList =
res.data || []
this.interactDataList =
this.interactDataList.concat(res.data)
}
console.log('获取互动点赞等数据===', JSON.stringify(res))
})
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
View file @
b695eac
...
...
@@ -145,7 +145,7 @@ export struct VideoChannelDetail {
refreshTime: this.refreshTime,
}
await ContentDetailRequest.getRecCompInfo(params).then(res => {
await ContentDetailRequest.getRecCompInfo(params).then(
async
res => {
this.isRequestError = false
console.log('根据视频频道传参查询视频楼层信息totalCount', res.data?.totalCount + '')
...
...
@@ -174,8 +174,8 @@ export struct VideoChannelDetail {
})
}
this.batchContentDetail(list1)
this.getContentInteract(list2)
await this.batchContentDetail(list1, list2)
setTimeout(() => {
this.isMouted = true
}, 500)
...
...
@@ -189,11 +189,14 @@ export struct VideoChannelDetail {
/**
* 根据视频楼层信息批量查询视频列表
*/
async batchContentDetail(list: batchContentDetailParams) {
async batchContentDetail(list: batchContentDetailParams
, list2: contentListParams
) {
if (list.contents.length > 0) {
await ContentDetailRequest.batchContentDetail(list).then(res => {
await ContentDetailRequest.batchContentDetail(list).then(async res => {
if (res.data) {
await this.getContentInteract(list2)
this.data = this.data.concat(res.data)
}
console.log('根据视频楼层信息批量查询视频列表', res.data)
this.data = this.data.concat(res.data as [])
})
}
}
...
...
@@ -204,7 +207,9 @@ export struct VideoChannelDetail {
async getContentInteract(list: contentListParams) {
if (list.contentList.length > 0) {
await ContentDetailRequest.getContentInteract(list).then(res => {
this.interactDataList = res.data || []
if (res.data) {
this.interactDataList = this.interactDataList.concat(res.data)
}
console.log('根据视频信息批量查询点赞、收藏状态', res.data)
})
}
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerRightView.ets
View file @
b695eac
...
...
@@ -14,6 +14,7 @@ import { SpConstants } from 'wdConstant/Index'
const TAG = 'PlayerRightView';
//视频点播页右侧操作栏:点赞/收藏/评论/分享 竖着排列
@Component
export struct PlayerRightView {
...
...
@@ -150,18 +151,17 @@ export struct PlayerRightView {
build() {
Column() {
if (this.interactData.contentId) {
this.userBuilderView()
this.likeBuilderView()
this.collectBuilderView()
this.commentBuilderView()
this.shareBuilderView()
}
}
// .backgroundColor(Color.Blue)
// .height('100%')
.width(
4
8)
.width(
5
8)
.position({ x: '100%', y: '100%' })
.markAnchor({ x: '100%', y: '100%' })
.padding({ bottom: 72, right: 10 })
...
...
Please
register
or
login
to post a comment