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
fanmingyou3_wd
2024-02-01 15:54:46 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9a3128b9f10305a095a51f4a8d2fcab613957870
9a3128b9
1 parent
57ed2f8a
解决语法检查报错
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
50 deletions
sight_harmony/wdComponent/src/main/ets/viewmodel/DetailViewModel.ets
sight_harmony/wdDetailPlayApi/oh-package.json5
sight_harmony/wdDetailPlayLive/oh-package.json5
sight_harmony/wdDetailPlayShortVideo/oh-package.json5
sight_harmony/wdDetailPlayShortVideo/src/main/ets/viewmodel/PlayViewModel.ets
sight_harmony/wdDetailPlayVod/oh-package.json5
sight_harmony/wdNetwork/oh-package.json5
sight_harmony/wdPlayer/oh-package.json5
sight_harmony/wdComponent/src/main/ets/viewmodel/DetailViewModel.ets
View file @
9a3128b
...
...
@@ -19,26 +19,30 @@ export class DetailViewModel extends BaseViewModel {
* 例:https://pd-apis-uat.pdnews.cn/api/rmrb-bff-display-zh/content/zh/c/content/detail?relId=500000008738&contentId=30001373964&relType=1
* @return {string} resDTO.data
*/
async
getDetailPageData(relId: string, contentId: string, relType: string): Promise<ContentDetailDTO> {
getDetailPageData(relId: string, contentId: string, relType: string): Promise<ContentDetailDTO> {
Logger.debug(TAG, 'getDetailPageData contentId: ' + contentId);
return new Promise<ContentDetailDTO>((success, error) => {
PageRepository.fetchDetailData(relId, contentId, relType)
.then((resDTO: ResponseDTO<ContentDetailDTO>) => {
if (this.isRespondsInvalid(resDTO, 'getDetailPageData')) {
error("detail data invalid");
return
}
Logger.info(TAG, "getDetailPageData then,resDTO.timeStamp:" + resDTO.timestamp);
success(resDTO.data);
})
.catch((err: Error) => {
Logger.error(TAG, `getDetailPageData catch, error.name : ${err.name}, error.message:${err.message}`);
error(err);
})
PageRepository.fetchDetailData(relId, contentId, relType).then((resDTO: ResponseDTO<ContentDetailDTO>) => {
if (!resDTO || !resDTO.data) {
Logger.error(TAG, 'getDetailPageData then resDTO is empty');
error('resDTO is empty');
return
}
if (resDTO.code != 0) {
Logger.error(TAG, `getDetailPageData then code:${resDTO.code}, message:${resDTO.message}`);
error('resDTO Response Code is failure');
return
}
Logger.info(TAG, "getDetailPageData then,resDTO.timeStamp:" + resDTO.timestamp);
success(resDTO.data);
}).catch((err: Error) => {
Logger.error(TAG, `getDetailPageData catch, error.name : ${err.name}, error.message:${err.message}`);
error(err);
})
})
}
private dataTranslate(json: string): ContentDetailDTO {
private dataTranslate(json: string): ContentDetailDTO
| null
{
if (StringUtils.isEmpty(json)) {
return null;
}
...
...
sight_harmony/wdDetailPlayApi/oh-package.json5
View file @
9a3128b
{
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wddetailplayapi"
,
"version"
:
"1.0.0"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"author"
:
""
,
"license"
:
"Apache-2.0"
,
"version"
:
"1.0.0"
,
"dependencies"
:
{
"wdBean"
:
"file:../wdBean"
,
"wdKit"
:
"file:../wdKit"
,
"wdNetwork"
:
"file:../wdNetwork"
,
"wdRouter"
:
"file:../wdRouter"
"wdBean"
:
"file:../wdBean"
,
"wdRouter"
:
"file:../wdRouter"
,
"wdNetwork"
:
"file:../wdNetwork"
}
}
\ No newline at end of file
}
...
...
sight_harmony/wdDetailPlayLive/oh-package.json5
View file @
9a3128b
{
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wddetailplaylive"
,
"version"
:
"1.0.0"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"author"
:
""
,
"license"
:
"Apache-2.0"
,
"dependencies"
:
{
}
}
\ No newline at end of file
"version"
:
"1.0.0"
,
"dependencies"
:
{}
}
...
...
sight_harmony/wdDetailPlayShortVideo/oh-package.json5
View file @
9a3128b
{
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wddetailplayshortvideo"
,
"version"
:
"1.0.0"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"author"
:
""
,
"license"
:
"Apache-2.0"
,
"version"
:
"1.0.0"
,
"dependencies"
:
{
"wdBean"
:
"file:../wdBean"
,
"wdPlayer"
:
"file:../wdPlayer"
,
"wdKit"
:
"file:../wdKit"
,
"wdBean"
:
"file:../wdBean"
,
"wdRouter"
:
"file:../wdRouter"
,
"wdNetwork"
:
"file:../wdNetwork"
,
"wdDetailPlayApi"
:
"file:../wdDetailPlayApi"
,
"wdRouter"
:
"file:../wdRouter"
"wdDetailPlayApi"
:
"file:../wdDetailPlayApi"
}
}
\ No newline at end of file
}
...
...
sight_harmony/wdDetailPlayShortVideo/src/main/ets/viewmodel/PlayViewModel.ets
View file @
9a3128b
import { BusinessError } from '@ohos.base'
import { Logger } from 'wdKit'
import { ResponseDTO} from 'wdNetwork'
import { ContentDetailDTO, ContentDetailRequest } from 'wdDetailPlayApi'
import { ContentDetailRequest } from 'wdDetailPlayApi'
import { ContentDetailDTO } from 'wdBean'
const TAG = 'PlayViewModel';
...
...
sight_harmony/wdDetailPlayVod/oh-package.json5
View file @
9a3128b
{
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wddetailplayvod"
,
"version"
:
"1.0.0"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"author"
:
""
,
"license"
:
"Apache-2.0"
,
"version"
:
"1.0.0"
,
"dependencies"
:
{
"wdBean"
:
"file:../wdBean"
,
"wdPlayer"
:
"file:../wdPlayer"
,
"wdKit"
:
"file:../wdKit"
,
"wdDetailPlayApi"
:
"file:../wdDetailPlayApi"
,
"wdRouter"
:
"file:../wdRouter"
"wdBean"
:
"file:../wdBean"
,
"wdRouter"
:
"file:../wdRouter"
,
"wdDetailPlayApi"
:
"file:../wdDetailPlayApi"
}
}
\ No newline at end of file
}
...
...
sight_harmony/wdNetwork/oh-package.json5
View file @
9a3128b
...
...
@@ -7,8 +7,8 @@
"main"
:
"Index.ets"
,
"version"
:
"1.0.0"
,
"dependencies"
:
{
"wdKit"
:
"file:../wdKit"
,
"wdConstant"
:
"file:../wdConstant"
,
"wdKit"
:
"file:../wdKit"
,
"@ohos/axios"
:
"^2.1.1"
}
}
...
...
sight_harmony/wdPlayer/oh-package.json5
View file @
9a3128b
{
"license"
:
"Apache-2.0"
,
"devDependencies"
:
{},
"author"
:
""
,
"name"
:
"wdplayer"
,
"version"
:
"1.0.0"
,
"description"
:
"Please describe the basic information."
,
"main"
:
"Index.ets"
,
"author"
:
""
,
"license"
:
"Apache-2.0"
,
"dependencies"
:
{
}
}
\ No newline at end of file
"version"
:
"1.0.0"
,
"dependencies"
:
{}
}
...
...
Please
register
or
login
to post a comment