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-04-15 16:46:13 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f1280b2cff0aa575c26c62e3e9ee29e9ce736c36
f1280b2c
1 parent
bbbda946
feat(动态详情):页面搭建
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
0 deletions
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
sight_harmony/products/phone/src/main/ets/pages/detail/DynamicDetailPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/DynamicDetailComponent.ets
0 → 100644
View file @
f1280b2
import { Logger } from 'wdKit';
import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel';
import { ContentDetailDTO } from 'wdBean';
import media from '@ohos.multimedia.media';
import { OperRowListView } from './view/OperRowListView';
import { WDPlayerController } from 'wdPlayer/Index';
const TAG = 'DynamicDetailComponent'
@Preview
@Component
export struct DynamicDetailComponent {
//入参
private relId: string = ''
private contentId: string = ''
private relType: string = ''
//出参
@State contentDetailData: ContentDetailDTO[] = [] as ContentDetailDTO[]
async aboutToAppear() {
await this.getContentDetailData()
}
onPageHide() {
}
build() {
Row() {
Column(){
Text("this is a test!")
}
}
}
private async getContentDetailData() {
try {
let data = await MultiPictureDetailViewModel.getDetailData(this.relId, this.contentId, this.relType)
this.contentDetailData = data;
console.log('动态详情',JSON.stringify(this.contentDetailData))
} catch (exception) {
console.log('请求失败',JSON.stringify(exception))
}
}
}
\ No newline at end of file
...
...
sight_harmony/products/phone/src/main/ets/pages/detail/DynamicDetailPage.ets
0 → 100644
View file @
f1280b2
import { Logger } from 'wdKit';
import { AudioDetailComponent } from 'wdComponent';
import router from '@ohos.router';
import { Params, Action } from 'wdBean';
const TAG = 'DynamicDetailPage';
@Entry
@Component
struct DynamicDetailPage {
@State relId: string = ''
@State contentId: string = ''
@State relType: string = ''
build() {
Column() {
AudioDetailComponent({
relId: this.relId,
contentId: this.contentId,
relType: this.relType
})
}
.height('100%')
.width('100%')
.backgroundColor('#20272E')
}
aboutToAppear() {
let par:Action = router.getParams() as Action;
let params = par?.params;
this.relId = params?.extra?.relId || '';
this.relType = params?.extra?.relType || '';
this.contentId = params?.contentID || '';
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment