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
xugenyuan
2024-06-03 16:26:03 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a7a9841b46572e493d8d56833e470b11eec5a323
a7a9841b
1 parent
dd4e7d86
ref |> 处理稿件分享功能暂时调用华为分享组件
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
4 deletions
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveOperRowListView.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/OperationListView.ets
sight_harmony/features/wdShare/src/main/ets/WDShare.ets
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
View file @
a7a9841
...
...
@@ -9,6 +9,16 @@ import { commentInfo } from './commentInfo';
import { BaseDTO } from '../component/BaseDTO';
import { LiveRoomDataBean } from '../live/LiveRoomDataBean';
export class ContentShareInfoDTO {
shareTitle: string = ''
shareUrl: string = ''
shareSummary: string = ''
shareCoverUrl: string = ''
sharePosterCoverUrl: string = ''
shareOpen: number = 0
sharePosterOpen: number = 0
}
@Observed
export class ContentDTO implements BaseDTO {
seoTags: string = '';
...
...
@@ -70,6 +80,7 @@ export class ContentDTO implements BaseDTO {
fullColumnImgUrls: FullColumnImgUrlDTO[] = [];
liveInfo: LiveInfoDTO = {} as LiveInfoDTO; // 直播新闻信息【BFF聚合】
videoInfo: VideoInfoDTO = {} as VideoInfoDTO; // 视频新闻信息【BFF聚合】,视频非原片+清晰度最高的
shareInfo: ContentShareInfoDTO = {} as ContentShareInfoDTO
newsSummary: string = ''; //appstyle:2 ,新闻详情
contentText?: string = '';
...
...
@@ -154,6 +165,7 @@ export class ContentDTO implements BaseDTO {
content.fullColumnImgUrls = old.fullColumnImgUrls;
content.liveInfo = old.liveInfo;
content.videoInfo = old.videoInfo;
content.shareInfo = old.shareInfo
content.newsSummary = old.newsSummary;
content.interactData = old.interactData;
content.hasMore = old.hasMore;
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/CardView.ets
View file @
a7a9841
...
...
@@ -6,6 +6,7 @@ import { ProcessUtils, WDRouterRule } from 'wdRouter';
import { TrackConstants,
TrackingButton,
TrackingContent, TrackingPageBrowse, TrackParamConvert } from 'wdTracking/Index';
import { WDShare } from 'wdShare/Index';
const TAG: string = 'CardView';
...
...
@@ -588,7 +589,7 @@ export struct PaperSingleColumn999CardView {
right: { anchor: '__container__', align: HorizontalAlign.End }
})
.onClick(() => {
ToastUtils.showToast('分享为公共方法,待开发', 1000
)
WDShare.shareProgram(this.item
)
})
}.width(CommonConstants.FULL_PARENT)
.justifyContent(FlexAlign.SpaceBetween)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveOperRowListView.ets
View file @
a7a9841
...
...
@@ -296,7 +296,6 @@ export struct LiveOperRowListView {
.aspectRatio(1)
.interpolation(ImageInterpolation.High)
.onClick((event: ClickEvent) => {
// ToastUtils.showToast('分享为公共方法,待开发', 1000);
this.share()
})
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
View file @
a7a9841
...
...
@@ -391,7 +391,6 @@ export struct OperRowListView {
.aspectRatio(1)
.interpolation(ImageInterpolation.High)
.onClick((event: ClickEvent) => {
// ToastUtils.showToast('分享为公共方法,待开发', 1000);
this.share()
})
}
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/OperationListView.ets
View file @
a7a9841
...
...
@@ -13,6 +13,7 @@ import { HttpUrlUtils } from 'wdNetwork/Index';
import { WDPlayerController } from 'wdPlayer/Index';
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { SpConstants } from 'wdConstant/Index'
import { WDShare } from 'wdShare/Index';
export interface OperationItem {
icon: Resource;
...
...
@@ -282,7 +283,7 @@ export struct OperationListView {
.width(32)
.aspectRatio(1)
.onClick((event: ClickEvent) => {
ToastUtils.showToast('分享为公共方法,待开发', 1000);
WDShare.shareContent(this.contentDetailData)
})
Text(item.text)
.width('100%')// .margin({ top: 4, left: 6, right: 6 })// .backgroundColor(Color.Brown)
...
...
sight_harmony/features/wdShare/src/main/ets/WDShare.ets
View file @
a7a9841
...
...
@@ -22,7 +22,18 @@ export class WDShare {
}
static shareProgram(program: ContentDTO, pageName: string ="", pageId: string = "") {
//TODO: 处理分享弹框交互和 海报逻辑
WDShareBase.getInstance().share({
to: ShareType.System,
scene: ShareScene.System,
type: ShareContentType.Link,
obj: {
title: program.shareInfo.shareTitle,
desc: program.shareInfo.shareSummary,
link: program.shareInfo.shareUrl,
}
})
}
static shareSubject(subject: PageInfoDTO) {
...
...
Please
register
or
login
to post a comment