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
liyubing
2024-06-03 18:28:05 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
dd4e7d8611f4829730fd1ac16589598bd60f5fb5
dd4e7d86
2 parents
a130f613
6bcf54bf
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
135 additions
and
98 deletions
sight_harmony/AppScope/resources/base/element/float.json
sight_harmony/features/wdBean/src/main/ets/bean/detail/ShareInfoDTO.ts
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/PaperTitleComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/SingleColumn999Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow02.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipRecommendComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipRecommendHeadComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalCardComponent.ets
sight_harmony/features/wdComponent/src/main/resources/base/element/float.json
sight_harmony/features/wdShare/src/main/ets/WDShare.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchAdvertisingPage.ets
sight_harmony/AppScope/resources/base/element/float.json
View file @
dd4e7d8
...
...
@@ -321,6 +321,10 @@
"value"
:
"15vp"
},
{
"name"
:
"vp_15_7"
,
"value"
:
"15.7vp"
},
{
"name"
:
"vp_18"
,
"value"
:
"18vp"
},
...
...
sight_harmony/features/wdBean/src/main/ets/bean/detail/ShareInfoDTO.ts
View file @
dd4e7d8
...
...
@@ -14,37 +14,37 @@ export interface ShareInfoDTO {
//分享链接
shareUrl
:
string
;
//首发时间
p
ublishTime
:
string
;
appCustomP
ublishTime
:
string
;
//图片
i
mageUrl
:
string
;
appCustomI
mageUrl
:
string
;
//直播和内容的举报,仅针对人民号发布的才能举报,cms创建的没有举报按钮
s
howReport
:
boolean
;
appCustomS
howReport
:
boolean
;
//点赞按钮显示 -1:不展示 0:未点赞 1:已点赞
s
howLike
:
number
;
appCustomS
howLike
:
number
;
//0 分享海报关闭,1 分享海报开启
p
osterShareControl
:
string
;
appCustomP
osterShareControl
:
string
;
//是否展示海报 -1-不展示图标
s
howPoster
:
number
;
appCustomS
howPoster
:
number
;
//海报展示类型 1:专题、文章、图文、视频、直播 2:人民号 3:评论 4:电子报海报 5:音频专题海报 6:早晚报专题海报 7:榜单H5 8:H5普通文章专题,包含时间链
s
howPosterType
:
number
;
appCustomS
howPosterType
:
number
;
//接口返回: 内容id、内容类型
c
ontentId
:
string
;
appCustomC
ontentId
:
string
;
//内容类型,分享的类型 0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,14动态图文,15动态视频
c
ontentType
:
string
;
appCustomC
ontentType
:
string
;
//关系id
t
argetRelId
:
string
;
appCustomT
argetRelId
:
string
;
//关系类型,1.频道关系;2.专题关系
t
argetRelType
:
string
;
appCustomT
argetRelType
:
string
;
//21:文章专题,22:音频专题,23:直播专题,24:话题专题,25:早晚报专题
t
opicType
:
string
;
appCustomT
opicType
:
string
;
//早晚报;1-早报;2-午报;3-晚报
t
opicPattern
:
number
;
appCustomT
opicPattern
:
number
;
//是否有头版
i
sFrontDaily
:
boolean
;
appCustomI
sFrontDaily
:
boolean
;
//分享海报简介
posterSummary
:
string
;
sharePosterItemList
:
SharePosterItemBean
[]
appCustomPosterSummary
:
string
;
appCustomSharePosterItemList
:
SharePosterItemBean
[]
//分享海报标题
p
osterTitle
:
string
;
appCustomP
osterTitle
:
string
;
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
View file @
dd4e7d8
...
...
@@ -444,17 +444,17 @@ export struct ENewspaperPageComponent {
let contentDetailData: ContentDetailDTO = {
shareInfo:{
shareTitle:this.newspaperListBean?.list[this.swiperIndex].pageName,
publishTime:this.newspaperListBean?.list[this.swiperIndex].periodNum,
imageUrl:this.newspaperListBean?.list[this.swiperIndex].pagePic,
appCustomPublishTime:this.newspaperListBean?.list[this.swiperIndex].periodNum,
appCustomImageUrl:this.newspaperListBean?.list[this.swiperIndex].pagePic,
shareUrl:this.newspaperListBean?.list[this.swiperIndex].sharePagePic.shareUrl,
sharePosterCoverUrl:this.newspaperListBean?.list[this.swiperIndex].sharePagePic.sharePosterCoverUrl,
showReport:false,
showLike:-1,
appCustomShowReport:false,
appCustomShowLike:-1,
shareOpen:1,
sharePosterOpen:1,
posterShareControl:'-1',
showPoster:-1,
showPosterType:4,
appCustomPosterShareControl:'-1',
appCustomShowPoster:-1,
appCustomShowPosterType:4,
}
} as ContentDetailDTO
WDShare.shareContent(contentDetailData,TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
dd4e7d8
...
...
@@ -26,6 +26,7 @@ import { common } from '@kit.AbilityKit';
import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils'
import {TrackConstants,TrackParamConvert}from 'wdTracking/Index'
import { ColorUtils } from '../../utils/ColorUtils';
import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent';
const TAG = 'MorningEveningPaperComponent';
...
...
@@ -37,6 +38,7 @@ export struct MorningEveningPaperComponent {
@State compListItem: CompList = {} as CompList
@Provide commentList: InteractDataDTO[] = []
@State audioPlayUrl: string = ""
@State isNoListContent:boolean = false;
// @Consume dailyPaperTopicPageId: number
// @Provide compListItem: CompList = {} as CompList
// @State morningEveningPaperDTO: MorningEveningPaperDTO = {
...
...
@@ -172,6 +174,7 @@ export struct MorningEveningPaperComponent {
this.totalTime = DateFormatUtil.secondToTime(duration);
this.progressVal = Math.floor(position * 100 / duration);
}
this.isNoListContent = this.compListItem && this.compListItem?.operDataList?.length > 0 ?false:true
} catch (exception) {
}
...
...
@@ -264,12 +267,16 @@ export struct MorningEveningPaperComponent {
}
ListItem() {
SingleColumn999Component({
compListItem: this.compListItem,
})
.margin({
top: this.isHasTopView ? 10 : 44+this.topSafeHeight
if(this.isNoListContent){
EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoListContent})
}else {
SingleColumn999Component({
compListItem: this.compListItem,
})
.margin({
top: this.isHasTopView ? 10 : 44+this.topSafeHeight
})
}
}
}
// .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/PaperTitleComponent.ets
View file @
dd4e7d8
...
...
@@ -157,20 +157,20 @@ export struct PaperTitleComponent {
let contentDetailData: ContentDetailDTO = {
newsId:Number.parseInt(this.topicInfo.topicId),
shareInfo:{
contentId:this.topicInfo.topicId,
contentType:this.topicInfo.topicType+'',
appCustomContentId:this.topicInfo.topicId,
appCustomContentType:this.topicInfo.topicType+'',
shareTitle:this.topicInfo.shareTitle,
shareSummary:this.topicInfo.shareSummary,
i
mageUrl:this.topicInfo.shareCoverUrl,
appCustomI
mageUrl:this.topicInfo.shareCoverUrl,
sharePosterCoverUrl:this.topicInfo.sharePosterCoverUrl,
shareUrl:this.topicInfo.shareUrl,
targetRelId:this.topicInfo.relId,
targetRelType:this.topicInfo.relType,
showReport:false,
showLike:-1,
appCustomTargetRelId:this.topicInfo.relId,
appCustomTargetRelType:this.topicInfo.relType,
appCustomShowReport:false,
appCustomShowLike:-1,
shareOpen:1,
sharePosterOpen:this.topicInfo.posterFlag,
s
howPoster:this.topicInfo.posterFlag>0?1:-1,
appCustomS
howPoster:this.topicInfo.posterFlag>0?1:-1,
}
} as ContentDetailDTO
WDShare.setTopicBeanToShareBean(contentDetailData.shareInfo,this.topicInfo)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/SingleColumn999Component.ets
View file @
dd4e7d8
...
...
@@ -152,7 +152,7 @@ export struct SingleColumn999Component {
scrollBackward: NestedScrollMode.SELF_FIRST
})
} else {
EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoListContent})
//
EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoListContent})
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow02.ets
View file @
dd4e7d8
...
...
@@ -55,6 +55,7 @@ export struct ZhSingleRow02 {
if (this.moreWidth > this.initMoreWidth) {
this.moreWidth = 16
}
this.resetMoreTips()
}
toMore() {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipRecommendComponent.ets
View file @
dd4e7d8
...
...
@@ -26,7 +26,7 @@ export struct PeopleShipRecommendComponent {
.height('30vp')
.fontColor($r('app.color.color_222222'))
.fontWeight(600)
.fontSize($r('app.float.vp_1
8
'))
.fontSize($r('app.float.vp_1
5_7
'))
Blank()
Button({ type: ButtonType.Normal, stateEffect: false }) {
...
...
@@ -35,7 +35,7 @@ export struct PeopleShipRecommendComponent {
.height('30vp')
.fontColor($r('app.color.color_999999'))
.fontWeight(400)
.fontSize($r('app.float.vp_1
4
'))
.fontSize($r('app.float.vp_1
3
'))
Image($r('app.media.ic_refresh'))
.width('14vp')
.height('14vp')
...
...
@@ -56,7 +56,7 @@ export struct PeopleShipRecommendComponent {
.width('100%')
.alignSelf(ItemAlign.Start)
.margin({
top: '
1
0vp',
top: '
-5
0vp',
bottom: '10vp'
})
...
...
@@ -75,7 +75,7 @@ export struct PeopleShipRecommendComponent {
.columnsTemplate('1fr 1fr 1fr')
.columnsGap(20)
.rowsGap(16)
.height(Math.ceil(this.rmhList.length / 3.0) * 1
32
)
.height(Math.ceil(this.rmhList.length / 3.0) * 1
26
)
.backgroundColor(Color.Transparent)
.margin({
right: '20vp',
...
...
@@ -94,7 +94,7 @@ export struct PeopleShipRecommendComponent {
.borderRadius('3vp')
.fontColor($r('app.color.color_999999'))
.fontWeight(500)
.fontSize($r('app.float.vp_1
4
'))
.fontSize($r('app.float.vp_1
3
'))
.fontColor(Color.White)
.onClick(() => {
// 点击一键关注
...
...
sight_harmony/features/wdComponent/src/main/ets/components/peopleShip/PeopleShipRecommendHeadComponent.ets
View file @
dd4e7d8
...
...
@@ -11,8 +11,8 @@ export struct PeopleShipRecommendHeadComponent {
Column(){
Stack({ alignContent: Alignment.BottomEnd }) {
Image(this.rmhInfo.headPhotoUrl.length > 0 ? this.rmhInfo.headPhotoUrl : $r('app.media.WDAccountOwnerHedaerDefaultIcon'))
.width('44vp')
.height('44vp')
.width('40vp')
.height('40vp')
.borderRadius('22vp')
.objectFit(ImageFit.Cover)
...
...
@@ -23,12 +23,12 @@ export struct PeopleShipRecommendHeadComponent {
.margin({
right: '-3vp'
})
}.margin({ top:
12
, bottom: 8 })
}.margin({ top:
4
, bottom: 8 })
Row() {
Text(this.rmhInfo.userName)
.fontColor($r('app.color.color_222222'))
.fontSize($r('app.float.vp_1
4
'))
.fontSize($r('app.float.vp_1
3
'))
.fontWeight(600)
.maxLines(1)
.textOverflow({overflow: TextOverflow.Ellipsis})
...
...
@@ -49,14 +49,14 @@ export struct PeopleShipRecommendHeadComponent {
Text(this.rmhInfo.introduction)
.fontColor($r('app.color.color_B0B0B0'))
.fontSize($r('app.float.vp_12'))
.margin({ top: 8, bottom: 14 })
.fontSize($r('app.float.vp_11'))
.margin({ top: 6, bottom: 14 })
.textOverflow({overflow: TextOverflow.Ellipsis})
.maxLines(2)
.height(34)
}
.width('100%')
.height('11
6
vp')
.height('11
0
vp')
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalCardComponent.ets
View file @
dd4e7d8
...
...
@@ -53,14 +53,23 @@ export struct LiveHorizontalCardComponent {
resetEdgeAnimation() {
if (this.moreWidth > this.initMoreWidth) {
this.moreWidth = this.moreWidth - 1
this.resetEdgeAnimation();
this.moreWidth = 16
}
this.resetMoreTips()
}
toMore() {
if (this.moreWidth > this.initMoreWidth * 2) {
this.liveToMore();
}
}
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.linkUrl) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
...
...
@@ -72,8 +81,19 @@ export struct LiveHorizontalCardComponent {
} else {
this.jumpToLiveMorePage()
}
} else {
if (this.compDTO?.objectType === '11') {
} else {
const contentDTO: ContentDTO = {
objectId: this.compDTO.objectId,
objectType: this.compDTO.objectType,
linkUrl: this.compDTO.linkUrl,
pageId: this.compDTO.pageId
} as ContentDTO
ProcessUtils.processPage(contentDTO)
}
}
}
}
async aboutToAppear(): Promise<void> {
this.loadImg = await onlyWifiLoadImg();
...
...
@@ -105,17 +125,7 @@ export struct LiveHorizontalCardComponent {
.height(14)
}
.onClick(() => {
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
params: {
url: this.compDTO.linkUrl
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
} else {
this.jumpToLiveMorePage()
}
this.liveToMore();
})
}
}.justifyContent(FlexAlign.SpaceBetween)
...
...
@@ -165,21 +175,30 @@ export struct LiveHorizontalCardComponent {
})
})
}
if (this.compDTO.operDataList.length >= 2) {
Column() {
if (this.moreWidth > this.initMoreWidth + 2) {
Text(this.moreTips)
.fontSize(8)
.fontColor(0x858585)
.width(8)
if (this.compDTO.operDataList.length >= 2 && !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) {
Row() {
Ellipse()
.width(2* (this.moreWidth - this.initMoreWidth - 1))
.height('100%')
.fill(0xe9e9e9)
.position({ left: -(this.moreWidth - this.initMoreWidth - 3) * 0.8 , top: 0 })
Column() {
if (this.moreWidth > this.initMoreWidth + 2) {
Text(this.moreTips)
.fontSize(8)
.fontColor(0x858585)
.width(8)
}
}
.justifyContent(FlexAlign.Center)
.align(Alignment.Center)
.height('100%')
.width(this.initMoreWidth)
.backgroundColor(0xe9e9e9)
.borderRadius({ topLeft: 5, bottomLeft: 5 })
}
.justifyContent(FlexAlign.Center)
.align(Alignment.Center)
.width(this.moreWidth)
.backgroundColor(0xf1f3f4)
.borderRadius({ topLeft: 5, bottomLeft: 5 })
.height(this.compDTO.operDataList.length == 2 ? 180 : 146)
.margin({left: 1.5 * (this.moreWidth - this.initMoreWidth)})
}
}
}
...
...
sight_harmony/features/wdComponent/src/main/resources/base/element/float.json
View file @
dd4e7d8
...
...
@@ -321,6 +321,10 @@
"value"
:
"15vp"
},
{
"name"
:
"vp_15_7"
,
"value"
:
"15.7vp"
},
{
"name"
:
"vp_18"
,
"value"
:
"18vp"
},
...
...
sight_harmony/features/wdShare/src/main/ets/WDShare.ets
View file @
dd4e7d8
...
...
@@ -32,21 +32,21 @@ export class WDShare {
//专题分享数据转换
static setTopicBeanToShareBean(shareBean: ShareInfoDTO, topicInfoBean: TopicInfo){
shareBean.
t
opicType = topicInfoBean.topicType+''
shareBean.
appCustomT
opicType = topicInfoBean.topicType+''
//21:文章专题,22:音频专题,23:直播专题,24:话题专题,25:早晚报专题,26:时间链
if(25 == topicInfoBean.topicType){
shareBean.showPosterType = 6
shareBean.topicPattern = topicInfoBean.topicPattern
shareBean.publishTime = topicInfoBean.topicDate
shareBean.appCustomShowPosterType = 6
shareBean.appCustomTopicPattern = topicInfoBean.topicPattern
shareBean.appCustomPublishTime = topicInfoBean.topicDate
if(topicInfoBean.frontLinkObject == null){
shareBean.
i
sFrontDaily = false
shareBean.
appCustomI
sFrontDaily = false
if(topicInfoBean.shareContentList != null && topicInfoBean.shareContentList.length>0){
shareBean.sharePosterItemList = [] as SharePosterItemBean[]
shareBean.sharePosterItemList.length = topicInfoBean.shareContentList.length
shareBean.appCustomSharePosterItemList = [] as SharePosterItemBean[]
shareBean.appCustomSharePosterItemList.length = topicInfoBean.shareContentList.length
for (let index = 0; index < topicInfoBean.shareContentList.length; index++) {
let element = topicInfoBean.shareContentList[index]
if(element != null){
shareBean.
s
harePosterItemList[index] = {
shareBean.
appCustomS
harePosterItemList[index] = {
title:topicInfoBean.shareContentList[index].newsTitle,
imageUrl:topicInfoBean.shareContentList[index].coverUrl,
} as SharePosterItemBean
...
...
@@ -54,25 +54,25 @@ export class WDShare {
}
}
}else{
shareBean.
i
sFrontDaily = true
shareBean.
appCustomI
sFrontDaily = true
shareBean.sharePosterCoverUrl = topicInfoBean.frontLinkObject.coverUrl
shareBean.
p
osterSummary = topicInfoBean.frontLinkObject.summary
shareBean.
appCustomP
osterSummary = topicInfoBean.frontLinkObject.summary
}
}else{
//文章/直播/话题专题(H5普通文章专题,包含时间链)
shareBean.
s
howPosterType = 8
shareBean.
appCustomS
howPosterType = 8
//海报的头图
shareBean.sharePosterCoverUrl = topicInfoBean.backgroundImgUrl
shareBean.isFrontDaily = false
shareBean.posterTitle = topicInfoBean.title
shareBean.posterSummary = topicInfoBean.summary
shareBean.appCustomIsFrontDaily = false
shareBean.appCustomPosterTitle = topicInfoBean.title
shareBean.appCustomPosterSummary = topicInfoBean.summary
if(topicInfoBean.shareContentList != null && topicInfoBean.shareContentList.length>0){
shareBean.sharePosterItemList = [] as SharePosterItemBean[]
shareBean.sharePosterItemList.length = topicInfoBean.shareContentList.length
shareBean.appCustomSharePosterItemList = [] as SharePosterItemBean[]
shareBean.appCustomSharePosterItemList.length = topicInfoBean.shareContentList.length
for (let index = 0; index < topicInfoBean.shareContentList.length; index++) {
let element = topicInfoBean.shareContentList[index]
if(element != null){
shareBean.
s
harePosterItemList[index] = {
shareBean.
appCustomS
harePosterItemList[index] = {
title:topicInfoBean.shareContentList[index].newsTitle,
imageUrl:topicInfoBean.shareContentList[index].coverUrl,
timeNode:topicInfoBean.shareContentList[index].publishTime,
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchAdvertisingPage.ets
View file @
dd4e7d8
...
...
@@ -138,10 +138,12 @@ struct LaunchAdvertisingPage {
})
}
if(this.defaultModel.screenType === '1') {
Image($r('app.media.LaunchPage_logo'))
.width('278lpx')
.height('154lpx')
.margin({top: '28lpx',bottom:'28lpx'})
Column(){
Image($r('app.media.LaunchPage_logo'))
.width('278lpx')
.height('154lpx')
.margin({top:20})
}.width('100%').height('16%').backgroundColor(Color.White).expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
}
}
.width('100%')
...
...
Please
register
or
login
to post a comment