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-06-20 17:23:39 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
a2a1952dc98c87d7883da72fabb97943fd015a65
a2a1952d
2 parents
730dffca
85f389fe
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
88 additions
and
44 deletions
sight_harmony/features/wdBean/src/main/ets/bean/content/commentInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow06.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/ThemeListPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/template/TemplatePageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/template/TemplatePageHelp.ets
sight_harmony/features/wdComponent/src/main/ets/components/reusable/CustomPullToRefresh.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalCardComponent.ets
sight_harmony/features/wdComponent/src/main/ets/dialog/ENewspaperListDialog.ets
sight_harmony/features/wdComponent/src/main/ets/dialog/ENewspaperPageDialog.ets
sight_harmony/features/wdDetailPlayLive/oh-package.json5
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerTitleComponent.ets
sight_harmony/products/phone/oh-package.json5
sight_harmony/features/wdBean/src/main/ets/bean/content/commentInfo.ets
View file @
a2a1952
...
...
@@ -12,4 +12,5 @@ export interface commentInfo {
relType: string;
newsType?: string,
objectType?: string,
userType?: number
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow06.ets
View file @
a2a1952
...
...
@@ -186,8 +186,11 @@ export struct ZhSingleRow06 {
this.loadImg
? item.operDataList[0]?.commentInfo?.userHeaderUrl
? item.operDataList[0].commentInfo.userHeaderUrl
: $r('app.media.icon_default_head_mater')
: commentViewModel.adjustUserType(item.operDataList[0].commentInfo?.userType)
? $r('app.media.WDAccountOwnerHedaerDefaultIcon')
: $r('app.media.WDAccountDefaultIcon')
: $r('app.media.icon_default_head_mater'))
.width(32)
.height(32)
.borderRadius(16)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/MinePageUserSimpleInfoUI.ets
View file @
a2a1952
...
...
@@ -26,6 +26,7 @@ export default struct MinePageUserSimpleInfoUI {
}else{
this.headPhotoUrl = ""
this.levelHead = ""
this.userType = "1"
}
}
...
...
@@ -33,12 +34,20 @@ export default struct MinePageUserSimpleInfoUI {
Row(){
//头像
Stack(){
Image(this.headPhotoUrl)
.alt(this.userType === '1'?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon'))
.width(`${this.calcHeight(100)}lpx`)
.height(`${this.calcHeight(100)}lpx`)
.objectFit(ImageFit.Cover)
.borderRadius(50)
if (this.headPhotoUrl.length > 0){
Image(this.headPhotoUrl)
.alt(this.userType === "1"?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon'))
.width(`${this.calcHeight(100)}lpx`)
.height(`${this.calcHeight(100)}lpx`)
.objectFit(ImageFit.Cover)
.borderRadius(50)
}else {
Image(this.userType === "1"?$r('app.media.default_head'):$r('app.media.AccountOwner_DefaultIcon'))
.width(`${this.calcHeight(100)}lpx`)
.height(`${this.calcHeight(100)}lpx`)
.objectFit(ImageFit.Cover)
.borderRadius(50)
}
if(StringUtils.isNotEmpty(this.levelHead)){
Image(this.levelHead)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/ThemeListPage.ets
View file @
a2a1952
import { Action, CompDTO, ContentDTO } from 'wdBean';
import { CommonConstants, ViewType } from 'wdConstant';
import PageViewModel from '../../viewmodel/PageViewModel';
import PageModel from '../../viewmodel/PageModel';
import { Action } from 'wdBean';
import router from '@ohos.router';
import { CardParser } from '../CardParser';
import { channelSkeleton } from '../skeleton/channelSkeleton';
import { ErrorComponent } from '../view/ErrorComponent';
import { EmptyComponent } from '../view/EmptyComponent';
import { listTouchEvent } from '../../utils/PullDownRefresh';
import PageAdModel from '../../viewmodel/PageAdvModel';
import { RefreshLayoutBean } from '../refresh/RefreshLayoutBean';
import RefreshLayout from '../refresh/RefreshLayout';
import PageNoMoreLayout from './PageNoMoreLayout';
import { NoMoreBean } from './NoMoreBean';
import CommonPageTitle from './CommonPageTitle';
import TemplatePageComponent from './template/TemplatePageComponent';
import { TemplatePageConstant } from './template/TemplatePageConstant';
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/template/TemplatePageComponent.ets
View file @
a2a1952
...
...
@@ -122,7 +122,6 @@ export default struct TemplatePageComponent {
LazyForEach(this.templatePage.compList, (compDTO: CompDTO, index: number) => {
ListItem() {
Column() {
CompParser({
compDTO: compDTO,
nextCompDTO: index === this.templatePage.compList.getDataArray().length - 1 ? new CompDTO() : this.templatePage.compList.get(index + 1) as CompDTO,
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/template/TemplatePageHelp.ets
View file @
a2a1952
...
...
@@ -38,10 +38,12 @@ export class TemplatePageHelp extends BasePageHelp {
this.treatDiffBusinessDataSource()
} else if (pageModel.compList.size() > 0) {
// 加载缓存数据了,不用无网络提示
this.closeAnimation(this.pageModel.resolve)
} else {
// 无网情况
this.pageModel.pageCompType = TemplatePageStateType.OTHER
this.pageModel.noNormalState = WDViewDefaultType.WDViewDefaultType_NoNetwork
// 无网情况
this.pageModel.pageCompType = TemplatePageStateType.OTHER
this.pageModel.noNormalState = WDViewDefaultType.WDViewDefaultType_NoNetwork
}
}
...
...
@@ -293,6 +295,12 @@ export class TemplatePageHelp extends BasePageHelp {
}
}
private closeAnimation(resolve?: (value: string | PromiseLike<string>) => void) {
if (resolve) {
resolve('')
}
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/reusable/CustomPullToRefresh.ets
View file @
a2a1952
...
...
@@ -44,16 +44,22 @@ export struct CustomPullToRefresh {
this.onRefresh(resolve)
}).then((text) => {
setTimeout(()=>{
// 延时500,展示第二段动画 TODO 是否去掉?
this.refreshState = 3
this.refreshDestroy()
setTimeout(() => {
// 延时500,展示第二段动画 TODO 是否去掉?
if(text){
this.refreshState = 3
setTimeout(() => {
success(text)
}, 500)
setTimeout(() => {
this.refreshState = 4
// 延时将状态改为空闲,组件closeRefresh做了延时,不能配置,这里配合延时
}, 1200)
}else {
success(text)
}, 500)
setTimeout(() => {
this.refreshState = 4
// 延时将状态改为空闲,组件closeRefresh做了延时,不能配置,这里配合延时
}, 1200)
}
},500)
})
});
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalCardComponent.ets
View file @
a2a1952
...
...
@@ -66,10 +66,10 @@ export struct LiveHorizontalCardComponent {
liveToMore() {
if (!!this.compDTO.dataSourceType) {
if (this.compDTO.dataSourceType === 'OBJECT_POS') {
ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
return;
}
// if (this.compDTO.dataSourceType === 'OBJECT_POS') {
// ProcessUtils.jumpChannelTab(this.compDTO.objectId, this.compDTO.pageId as string, this.compDTO.objectTitle)
// return;
// }
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
...
...
@@ -236,6 +236,13 @@ export struct LiveHorizontalCardComponent {
} else if (this.compDTO.operDataList.length) {
// 一个
LiveHorizontalCardForOneComponent({ contentDTO: this.compDTO.operDataList[0] })
.onClick(() => {
InfomationCardClick.track(this.compDTO, this.compDTO.operDataList[0], this.pageId, this.pageName)
if (this.compDTO.operDataList[0].objectType != '0') {
console.log(this.compDTO.operDataList[0].objectId)
this.gotoLive(this.compDTO.operDataList[0])
}
})
}
}
// .width(CommonConstants.FULL_WIDTH)
...
...
sight_harmony/features/wdComponent/src/main/ets/dialog/ENewspaperListDialog.ets
View file @
a2a1952
...
...
@@ -4,7 +4,7 @@ import { WDRouterRule } from 'wdRouter/Index'
import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog'
import { Logger } from 'wdKit';
import { font, window } from '@kit.ArkUI';
const TAG: string = 'ENewspaperListDialog';
/**
* 读报纸半屏弹窗
* 弹窗嵌套参考资料(https://developer.harmonyos.com/cn/docs/documentation/doc-references-V2/ts-methods-custom-dialog-box-0000001580345722-V2)
...
...
@@ -19,12 +19,16 @@ export struct ENewspaperListDialog {
@State scrollOffset: number = 0
@State isCurrentViewOpen: boolean = false
@Consume bottomSafeHeight:number
firstFlag : boolean = true
//文字版选择弹框
pageListDialogController: CustomDialogController = new CustomDialogController({
builder: ENewspaperPageDialog({
dialogType: 1,
newspaperListBean: this.newspaperListBean,
dialogVisibility: (visibility: boolean) => {
console.log(TAG, "ENewspaperPageDialog visibility:", visibility)
this.isCurrentViewOpen = !visibility
}
}),
...
...
@@ -47,10 +51,15 @@ export struct ENewspaperListDialog {
//watch监听报纸页码回调
onCurrentPageNumUpdated(): void {
console.log("ENewspaperListDialog-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum)
this.firstFlag = false
console.log(TAG, "onCurrentPageNumUpdated currentPageNum:", this.currentPageNum)
let _scrollIndex = Number.parseInt(this.currentPageNum)
console.log(
"ENewspaperListDialog-onCurrentPageNumUpdated", "
_scrollIndex:", _scrollIndex)
console.log(
TAG, "onCurrentPageNumUpdated
_scrollIndex:", _scrollIndex)
let scrollIndexEnd = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex
console.log(TAG, "onCurrentPageNumUpdated scrollIndexEnd:", scrollIndexEnd)
console.log(TAG, "onCurrentPageNumUpdated (!this.isCurrentViewOpen):", ""+!this.isCurrentViewOpen)
if (!this.isCurrentViewOpen) {
this.listScroller.scrollToIndex(scrollIndexEnd)
}
...
...
@@ -69,9 +78,9 @@ export struct ENewspaperListDialog {
this.deviceHeight = px2vp(windowClass.getWindowProperties().windowRect.height) - changeHeight
this.isCurrentViewOpen = true
console.log(
"ENewspaperListDialog-aboutToAppear", "
currentPageNum:", this.currentPageNum)
console.log(
TAG, "aboutToAppear
currentPageNum:", this.currentPageNum)
let _scrollIndex = Number.parseInt(this.currentPageNum)
console.log(
"ENewspaperListDialog-aboutToAppear", "
_scrollIndex:", _scrollIndex)
console.log(
TAG, "aboutToAppear
_scrollIndex:", _scrollIndex)
this.scrollIndex = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex
// this.listScroller.scrollToIndex(this.scrollIndex)
}
...
...
@@ -285,7 +294,12 @@ export struct ENewspaperListDialog {
// }
// console.info(`this.scrollOffset:` + this.scrollOffset)
// if (this.scrollOffset == 0) {
this.currentPageNum = `${firstIndex < 9 ? '0' + (firstIndex + 1) : firstIndex + 1}`
if(this.firstFlag){
this.currentPageNum = `${firstIndex < 9 ? '0' + (firstIndex + 1) : firstIndex + 1}`
}else {
this.firstFlag = true
}
// }
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/dialog/ENewspaperPageDialog.ets
View file @
a2a1952
...
...
@@ -12,7 +12,7 @@ export struct ENewspaperPageDialog {
public dialogVisibility?: (visibility: boolean) => void
onCurrentPageNumUpdated(): void {
console.log(
"ENewspaperList
Dialog-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum)
console.log(
'ENewspaperListDialog',"ENewspaperPage
Dialog-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum)
}
aboutToAppear(): void {
...
...
sight_harmony/features/wdDetailPlayLive/oh-package.json5
View file @
a2a1952
...
...
@@ -16,6 +16,7 @@
"wdConstant"
:
"file:../../commons/wdConstant"
,
"wdDetailPlayApi"
:
"file:../../features/wdDetailPlayApi"
,
"wdRouter"
:
"file:../../commons/wdRouter"
,
"wdTracking"
:
"file:../../features/wdTracking"
"wdTracking"
:
"file:../../features/wdTracking"
,
"wdShare"
:
"file:../../features/wdShare"
}
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
View file @
a2a1952
...
...
@@ -6,6 +6,7 @@ import { DateFormatUtil, PlayerConstants, WDAliPlayerController } from 'wdPlayer
import { ContentDetailDTO, LiveRoomDataBean } from 'wdBean/Index';
import { DisplayDirection } from 'wdConstant/Index';
import { LiveFollowComponent, LottieView } from 'wdComponent/Index';
import { WDShare } from 'wdShare/Index';
//直播间播放器上层覆盖物
@Component
export struct PlayUIComponent {
...
...
@@ -123,6 +124,9 @@ export struct PlayUIComponent {
.width(24)
.aspectRatio(1)
.visibility(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL ? Visibility.Visible : Visibility.None)
.onClick(() => {
WDShare.shareContent(this.contentDetailData)
})
}
.width('100%')
.alignItems(VerticalAlign.Center)
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerTitleComponent.ets
View file @
a2a1952
...
...
@@ -5,6 +5,7 @@ import { NumberFormatterUtils, WindowModel } from 'wdKit/Index'
import { window } from '@kit.ArkUI'
import { WDAliPlayerController } from 'wdPlayer/Index'
import { DisplayDirection } from 'wdConstant/Index'
import { WDShare } from 'wdShare/Index'
/**
* 沉浸式直播--- 头部标题
...
...
@@ -76,6 +77,9 @@ export struct PlayerTitleComponent {
.aspectRatio(1)
.visibility((this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) ? Visibility.Visible : Visibility.None)
.margin({right:16})
.onClick(() => {
WDShare.shareContent(this.contentDetailData)
})
}.margin({ bottom: 10 })
Row() {
...
...
sight_harmony/products/phone/oh-package.json5
View file @
a2a1952
...
...
@@ -7,7 +7,7 @@
"main"
:
""
,
"version"
:
"1.0.0"
,
"dependencies"
:
{
"@ohos/lottie"
:
"
2.0.10
"
,
"@ohos/lottie"
:
"
v2.0.11-rc.6
"
,
"wdComponent"
:
"file:../../features/wdComponent"
,
"wdConstant"
:
"file:../../commons/wdConstant"
,
"wdKit"
:
"file:../../commons/wdKit"
,
...
...
Please
register
or
login
to post a comment