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-03 10:54:30 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
deedc95e7f1e7544d598f869b361abc6b9bbfe28
deedc95e
2 parents
67d8906a
d45528c0
Merge remote-tracking branch 'origin/main'
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
105 additions
and
37 deletions
sight_harmony/features/wdComponent/src/main/ets/components/CommentDialogView.ets
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/MyCollectionListPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/BigPicCardComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/TopPlayComponet.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchAdvertisingPage.ets
sight_harmony/products/phone/src/main/ets/pages/view/VideoChannelPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/CommentDialogView.ets
0 → 100644
View file @
deedc95
import { ContentDetailDTO, InteractDataDTO, PageInfoDTO } from 'wdBean/Index'
import { CommentListDialogView, publishCommentModel } from '../../../../Index'
@Component
export struct CommentDialogView {
@Link @Watch('showCommentListChange') showCommentList: boolean
@Link index: number
@Link currentIndex: number
@Link publishCommentModel: publishCommentModel
@Consume contentDetailData: ContentDetailDTO
@Link interactData: InteractDataDTO
@State fakePageInfo: PageInfoDTO = {} as PageInfoDTO
@State dialogOffsetY: number = 0 // (this.windowHeight - this.windowWidth * 9 / 16)
@State @Watch("innerShowCommentChange") innerShowComment: boolean = false
showCommentListChange(val: boolean) {
if (this.showCommentList && this.index === this.currentIndex) {
this.innerShowComment = true
} else {
this.innerShowComment = false
}
}
innerShowCommentChange() {
this.showCommentList = this.innerShowComment
}
build() {
CommentListDialogView({
showCommentList: this.innerShowComment,
contentDetailData: this.contentDetailData,
publishCommentModel: this.publishCommentModel,
pageInfo: this.fakePageInfo,
onClose: () => {
this.showCommentList = false
if (Number.parseInt(this.publishCommentModel.totalCommentNumer) > Number.parseInt(this.interactData.commentNum + "")) {
this.interactData.commentNum = Number.parseInt(this.publishCommentModel.totalCommentNumer)
}
}
})
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
View file @
deedc95
import { Action, H5ReceiveDetailBean, ContentDetailDTO } from 'wdBean';
import { Action, H5ReceiveDetailBean, ContentDetailDTO
, InteractDataDTO
} from 'wdBean';
import { WdWebComponent } from 'wdWebComponent';
import router from '@ohos.router';
import { CommonConstants } from 'wdConstant'
...
...
@@ -13,6 +13,7 @@ import { NetworkUtil, WindowModel } from 'wdKit';
import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare'
import { common } from '@kit.AbilityKit';
import { PageRepository } from '../repository/PageRepository';
import { CommentDialogView } from './CommentDialogView';
const TAG: string = 'SpacialTopicPageComponent'
...
...
@@ -23,7 +24,11 @@ export struct SpacialTopicPageComponent {
action: Action = {} as Action
@State webUrl: string = '';
@State subjectData: string = '';
@State index: number = 0
@State currentIndex: number = 0
@State isPageEnd: boolean = false
@State showCommentList: boolean = false
@State interactData: InteractDataDTO = {} as InteractDataDTO
@Prop reload: number = 0;
@Provide contentDetailData: ContentDetailDTO = {} as ContentDetailDTO
private h5ReceiveAppData: H5ReceiveDetailBean = { dataSource: '2' } as H5ReceiveDetailBean
...
...
@@ -185,6 +190,16 @@ export struct SpacialTopicPageComponent {
publishCommentModel: this.publishCommentModel,
operationButtonList: this.operationButtonList,
styleType: 1,
onCommentIconClick:()=>{
this.showCommentList = true
}
})
CommentDialogView({
index: $index,
currentIndex: $currentIndex,
showCommentList: $showCommentList,
publishCommentModel: $publishCommentModel,
interactData: $interactData,
})
}
}.width(CommonConstants.FULL_WIDTH).height(CommonConstants.FULL_HEIGHT)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
View file @
deedc95
...
...
@@ -219,8 +219,7 @@ struct createImg {
}) {
Image(this.loadImg ? item.fullUrl : '')
.backgroundColor(0xf5f5f5)
.width(113)
.height(113)
.aspectRatio(item.landscape === 1 ? 343 / 172 : 228 / 305)
.autoResize(true)
.borderRadius(this.caclImageRadius(index))
.opacity(!item.weight && !item.height ? 0 : 1)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
View file @
deedc95
...
...
@@ -88,7 +88,7 @@ export struct Card6Component {
.fontSize(18)
.lineHeight(27)
.fontWeight(FontWeight.Normal)
.maxLines(this.contentDTO.appStyle === '6' ?
5
: 2)
.maxLines(this.contentDTO.appStyle === '6' ?
4
: 2)
.alignSelf(ItemAlign.Start)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
.textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
...
...
@@ -107,7 +107,7 @@ export struct Card6Component {
}
.alignItems(HorizontalAlign.Start)
.height(
78
)
.height(
this.contentDTO.appStyle === CompStyle.Card_13 ? 78 : 156
)
.justifyContent(FlexAlign.SpaceBetween)
...
...
@@ -119,7 +119,7 @@ export struct Card6Component {
.backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5)
.borderRadius(5)
.aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4)
.height(
78
)
.height(
this.contentDTO.appStyle === CompStyle.Card_13 ? 78 : 156
)
CardMediaInfo({ contentDTO: this.contentDTO })
}
...
...
@@ -138,8 +138,7 @@ export struct Card6Component {
})
.width(CommonConstants.FULL_WIDTH)
.height(106)
.justifyContent(FlexAlign.SpaceBetween)
.height(this.contentDTO.appStyle === CompStyle.Card_13 ? 106 : 184) .justifyContent(FlexAlign.SpaceBetween)
.alignItems(VerticalAlign.Top)
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/MyCollectionListPage.ets
View file @
deedc95
...
...
@@ -4,7 +4,7 @@ import PageModel from '../../viewmodel/PageModel';
import { CommonConstants, ViewType } from 'wdConstant'
import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent'
import { ErrorComponent } from '../view/ErrorComponent'
import { CompDTO, ContentDTO } from 'wdBean'
import { CompDTO, ContentDTO
, contentListParams,contentListItem
} from 'wdBean'
import NoMoreLayout from './NoMoreLayout'
import { CustomSelectUI } from '../view/CustomSelectUI';
import { CustomBottomFuctionUI } from '../view/CustomBottomFuctionUI';
...
...
@@ -149,16 +149,13 @@ struct MyCollectionListPage {
.margin({left:16})
}
Column() {
BigPicCardComponent({compDTO:new CompDTO,contentDTO:compDTO})
BigPicCardComponent({compDTO:new CompDTO,contentDTO:compDTO
,pageId:TrackConstants.PageName.My_Collect,pageName:TrackConstants.PageName.My_Collect
})
}
}.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
if (isVisible) {
TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect, TrackParamConvert.program(compDTO))
}
})
// .onClick(()=>{
// TrackingContent.common(TrackConstants.EventType.Click, TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect, TrackParamConvert.program(compDTO))
// })
}
...
...
@@ -262,4 +259,12 @@ struct MyCollectionListPage {
}
}
getContentData(){
for (let index = 0; index < this.allDatas.length; index++) {
const compDTO = this.allDatas[index];
compDTO.isCollection = true ///用于时间展示
this.allDatas.push(compDTO)
}
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/BigPicCardComponent.ets
View file @
deedc95
...
...
@@ -15,6 +15,8 @@ const TAG: string = 'BigPicCardComponent';
@Component
export struct BigPicCardComponent {
@ObjectLink compDTO: CompDTO
@State pageId: string = '';
@State pageName: string = '';
contentDTO: ContentDTO = new ContentDTO();
aboutToAppear() {
...
...
@@ -110,7 +112,7 @@ export struct BigPicCardComponent {
@Builder
cardBuild() {
CardParser({ compDTO: this.compDTO, contentDTO: this.contentDTO
});
CardParser({ compDTO: this.compDTO, contentDTO: this.contentDTO
,pageId:this.pageId,pageName:this.pageName
});
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
View file @
deedc95
...
...
@@ -48,6 +48,7 @@ export struct OperRowListView {
private onCommentFocus: () => void = () => {
}
private onCommentIconClick: () => void = () => {
}
@Provide inDialog: boolean = false
...
...
@@ -252,6 +253,9 @@ export struct OperRowListView {
@Builder
builderComment() {
Column() {
// Text((this.contentDetailData.openComment == 1).toString())
// Text((this.contentDetailData.commentDisplay == 1).toString())
// Text(this.publishCommentModel?.targetId.toString())
if (this.contentDetailData.openComment == 1
&& this.contentDetailData.commentDisplay == 1
&& this.publishCommentModel?.targetId) {
...
...
@@ -284,9 +288,10 @@ export struct OperRowListView {
contentDetail: this.contentDetailData
})
.onClick(() => {
console.log('akdbakdbakdbaksjd')
this.onCommentIconClick()
console.log(JSON.stringify(this.dialogController?.open
))
// console.log('his.dialogController?.open',JSON.stringify(this.dialogController
))
// 评论弹框内部嵌入
!this.showBackIcon && this.dialogController?.open()
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/TopPlayComponet.ets
View file @
deedc95
...
...
@@ -66,7 +66,7 @@ export struct TopPlayComponent {
* 更新直播播放数据
*/
updateData() {
// 检测
等待中
的直播预告是否视频资源
// 检测
直播等待状态
的直播预告是否视频资源
if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewType === 1
&& this.contentDetailData?.liveInfo?.liveState == 'wait'
&& this.contentDetailData.liveInfo.previewUrl &&
...
...
@@ -79,7 +79,6 @@ export struct TopPlayComponent {
if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewUrl &&
this.contentDetailData.liveInfo.previewUrl.length > 0) {
this.previewUrl = this.contentDetailData.liveInfo.previewUrl
} else if (this.contentDetailData.fullColumnImgUrls && this.contentDetailData.fullColumnImgUrls.length > 0) {
this.previewUrl = this.contentDetailData.fullColumnImgUrls[0].url
}
...
...
@@ -126,8 +125,8 @@ export struct TopPlayComponent {
}
// 直播结束
if (this.contentDetailData?.liveInfo?.liveState === 'end') {
this.isHideLoading = true
this.isWait = StringUtils.isNotEmpty(this.playUrl)
this.isHideLoading = !StringUtils.isNotEmpty(this.playUrl)
this.isWait = !StringUtils.isNotEmpty(this.playUrl)
}
...
...
@@ -141,7 +140,7 @@ export struct TopPlayComponent {
this.previewUrl = ''
}
}
//
Logger.debug(TAG, `---0------>` + this.isWait + ' ->' + this.isHideLoading + ' ->' + this.isEnd+' -->'+this.isVideoSource)
//
Logger.debug(TAG, `---0------>` + this.isWait + ' ->' + this.isHideLoading + ' ->' + this.isEnd+' -->'+this.isVideoSource)
}
tryToPlay() {
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchAdvertisingPage.ets
View file @
deedc95
...
...
@@ -74,6 +74,22 @@ struct LaunchAdvertisingPage {
bottom: 0
})
if (this.defaultModel.isAd === '1'){
Stack({alignContent:Alignment.TopStart}){
Text('广告')
.fontColor(Color.White)
.textAlign(TextAlign.Center)
.fontSize('24lpx')
.width('72lpx')
.height('36lpx')
.borderRadius(2)
.margin({top:'15lpx',left:'19lpx'})
.backgroundColor('#80000000')
}
.width('100%')
.height('100%')
}
Stack({alignContent:Alignment.TopEnd}){
Button(){
Text(this.time + 's 跳过')
...
...
@@ -95,22 +111,6 @@ struct LaunchAdvertisingPage {
.width('100%')
.height('100%')
if (this.defaultModel.isAd === '1'){
Stack({alignContent:Alignment.TopStart}){
Text('广告')
.fontColor(Color.White)
.textAlign(TextAlign.Center)
.fontSize('24lpx')
.width('72lpx')
.height('36lpx')
.borderRadius(2)
.margin({top:'15lpx',left:'19lpx'})
.backgroundColor('#80000000')
}
.width('100%')
.height('100%')
}
if(this.defaultModel.screenType != '2'){
//底部logo样式 按钮加载在背景展示图上
Button(){
...
...
sight_harmony/products/phone/src/main/ets/pages/view/VideoChannelPage.ets
View file @
deedc95
...
...
@@ -179,7 +179,7 @@ export struct VideoChannelPage {
channelId: item.channelId + '',
autoRefresh: this.autoRefresh
})
.padding({ top:
40
})
.padding({ top:
55
})
.backgroundColor(Color.White)
}
}, (item: TopNavDTO) => item.channelId + '')
...
...
Please
register
or
login
to post a comment