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-26 10:57:44 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
c488862b204ab905697220686919e13b52650faf
c488862b
2 parents
a1152833
e11bf002
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
210 additions
and
66 deletions
sight_harmony/commons/wdConstant/src/main/ets/constants/SpConstants.ets
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
sight_harmony/features/wdBean/src/main/ets/bean/component/CompDTO.ets
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/ChannelSubscriptionLayout.ets
sight_harmony/features/wdComponent/src/main/ets/components/reusable/CustomPullToRefresh.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/EmptyComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalCardComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
sight_harmony/features/wdComponent/src/main/ets/repository/PageRepository.ets
sight_harmony/features/wdShare/src/main/ets/WDShare.ets
sight_harmony/products/phone/src/main/ets/pages/SpacialTopicPage.ets
sight_harmony/commons/wdConstant/src/main/ets/constants/SpConstants.ets
View file @
c488862
...
...
@@ -38,6 +38,7 @@ export class SpConstants{
static LOCATION_PROVINCE_NAME = "location_province_name" //定位,省份名称
static LOCATION_DISTRICT_CODE = "location_district_code" //定位,区县,返回9位,如:合肥-瑶海区-310115114
static LOCATION_PERMISSION_REFUSE = "location_permission_refuse" //定位
static LOCATION_FIRST_POSITION = 'location_first_position'// 定位后顶导首次使用地理信息
//启动页数据存储key
static APP_LAUNCH_PAGE_DATA_MODEL = 'app_launch_page_data_model'
...
...
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
View file @
c488862
import { Action, ContentDTO, Params, PhotoListBean, commentInfo } from 'wdBean';
import { Action, ContentDTO, Params, PhotoListBean, commentInfo
, CompDTO
} from 'wdBean';
import { ExtraDTO } from 'wdBean/src/main/ets/bean/component/extra/ExtraDTO';
import { Logger, NetworkUtil, SPHelper, ToastUtils } from 'wdKit';
import { StringUtils } from 'wdKit/src/main/ets/utils/StringUtils';
...
...
@@ -72,6 +72,76 @@ export class ProcessUtils {
ProcessUtils.processPage(content);
}
//更多
static compJumpPage(bean:CompDTO){
let contentBean = ProcessUtils.compBeanToContentBean(bean)
if(contentBean == null){
return
}
if(ProcessUtils.checkMoreJumpPage(bean)){
ProcessUtils.processPage(contentBean)
}else{
ProcessUtils.moreTojumpLivePage(contentBean);
}
}
static moreTojumpLivePage(contentBean:ContentDTO){
if(!StringUtils.isEmpty(contentBean.dataSourceType)){
if(contentBean.dataSourceType == 'LIVE_HORIZONTAL_CARD') {
//直播中
WDRouterRule.jumpWithPage(WDRouterPage.liveMorePage)
}else if(contentBean.dataSourceType == 'LIVE_RESERVATION'){
//预约列表
WDRouterRule.jumpWithPage(WDRouterPage.reserveMorePage)
}else if(contentBean.dataSourceType == 'LIVE_MONTHLY_RANKING'){
contentBean.objectType = '6'
ProcessUtils.processPage(contentBean)
}
}
}
static checkMoreJumpPage(content:CompDTO){
let loacalJump = true
if(content.dataSourceType == 'LIVE_HORIZONTAL_CARD'){
loacalJump = false
}else if(content.dataSourceType == 'LIVE_RESERVATION'){
loacalJump = false
}else if(content.dataSourceType == 'LIVE_MONTHLY_RANKING'){
loacalJump = false
}
return loacalJump
}
static compBeanToContentBean(compDTO:CompDTO){
if(compDTO == null){
return
}
let content = new ContentDTO()
content.objectType = compDTO.objectType||'0'
content.objectLevel = compDTO.objectLevel
content.objectId = compDTO.objectId
content.pageId = compDTO.pageId||''
content.newsTitle = compDTO.objectTitle
content.newsSummary = compDTO.objectSummary
// compContentBean.setTopicInfoBean(getTopicInfoBean());
// compContentBean.setChannelInfoBean(getChannelInfoBean());
content.bottomNavId = compDTO.bottomNavId
content.sourceInterfaceVal = compDTO.sourceInterfaceVal
content.dataSourceType = compDTO.dataSourceType
content.compId = compDTO.id+''
content.linkUrl = compDTO.linkUrl
content.appStyle = compDTO.appStyle
content.recommend = compDTO.recommend
content.expIds = compDTO.expIds
content.relId = compDTO.relId
content.relType = compDTO.relType
content.itemId = compDTO.itemId
content.itemType = compDTO.itemType
content.sceneId = compDTO.sceneId
content.traceId = compDTO.traceId
content.traceInfo = compDTO.traceInfo
return content
}
/**
* 页面跳转
*/
...
...
sight_harmony/features/wdBean/src/main/ets/bean/component/CompDTO.ets
View file @
c488862
...
...
@@ -25,7 +25,12 @@ export class CompDTO implements BaseDTO {
// meddleDataList: any[];
name: string = '';
objectId: string = ''; // 跳转页面id?
/**
* 频道(1:一级频道,2:二级频道),专题(21:文章专题,22:音频专题,23:直播专题,24:话题专题,25:早晚报专题,26:时间轴专题)
*/
objectLevel:string = ''
objectTitle: string = ''; // comp标题
objectSummary: string = ''; // 跳转频道、专题摘要【BFF聚合】
// objectType?: string; // 跳转类型,枚举:
operDataList: ContentDTO[] = []; // 运营数据列表【正常运营配置的强运营数据,部分推荐场景的配置(自动源兜底数据)】
// pageId?: any;
...
...
@@ -51,6 +56,22 @@ export class CompDTO implements BaseDTO {
// keyGenerator相关字符串,用于刷新list布局
timestamp: String = '1'
bottomNavId:string = ''
//数据来源接口 0:非推荐楼层接口;1:推荐楼层接口
sourceInterfaceVal: number = 0
appStyle: string = '';
/**
* 是否推荐数据;默认0:否,1:是
*/
recommend:number = 0
relId: string = '';
relType: string = '';
itemType: string = '';
sceneId: string = '';
traceId: string = '';
traceInfo: string = '';
/**
* 创建新的compbean对象
* @param old
...
...
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
View file @
c488862
...
...
@@ -27,6 +27,7 @@ export class ContentDTO implements BaseDTO {
liveType?: string; // 直播新闻-直播状态
expIds: string = '';
itemId: string = '';
itemType: string = '';
shareFlag?: string = '1';
appStyle: string = '';
cityCode: string = '';
...
...
@@ -123,6 +124,20 @@ export class ContentDTO implements BaseDTO {
timestamp: String = '1'
// 自定义参数,用于跳转对应页面时 传递targetLayout参数用
customParamTargetLayout?: string
//数据来源接口 0:非推荐楼层接口;1:推荐楼层接口
sourceInterfaceVal: number = 0
/**
* 组件内容源类型 (LIVE_HORIZONTAL_CARD\LIVE_RESERVATION\LIVE_LARGE_CARD\LIVE_END\LIVE_MONTHLY_RANKING )
*/
dataSourceType: string = '';
//组件ID
compId: string = '';
/**
* 是否推荐数据;默认0:否,1:是
*/
recommend:number = 0
traceId: string = '';
traceInfo: string = '';
static clone(old: ContentDTO): ContentDTO {
let content = new ContentDTO();
...
...
sight_harmony/features/wdComponent/src/main/ets/components/CompParser.ets
View file @
c488862
...
...
@@ -72,7 +72,7 @@ export struct CompParser {
build() {
Column() {
//Text(JSON.stringify(this.compDTO.compStyle))
//
Text(JSON.stringify(this.compDTO.compStyle))
this.componentBuilder();
}
}
...
...
@@ -90,16 +90,18 @@ export struct CompParser {
}
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 &&
this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡"
// Text('LiveHorizontalCardComponent')
LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) {
if (this.compDTO.operDataList.length > 1) {
// Text('HorizontalStrokeCardThreeTwoRadioForMoreComponent')
HorizontalStrokeCardThreeTwoRadioForMoreComponent({
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
})
} else {
// Text('HorizontalStrokeCardThreeTwoRadioForOneComponent')
HorizontalStrokeCardThreeTwoRadioForOneComponent({
compDTO: this.compDTO,
pageId: this.pageId,
...
...
sight_harmony/features/wdComponent/src/main/ets/components/SpacialTopicPageComponent.ets
View file @
c488862
import { Action, H5ReceiveDetailBean, ContentDetailDTO, InteractDataDTO } from 'wdBean';
import { Action, H5ReceiveDetailBean, ContentDetailDTO, InteractDataDTO
, TopicInfo
} from 'wdBean';
import { WdWebComponent } from 'wdWebComponent';
import { CommonConstants } from 'wdConstant'
import { BridgeWebViewControl } from 'wdJsBridge/Index';
...
...
@@ -41,6 +41,8 @@ export struct SpacialTopicPageComponent {
@State isNetConnected: boolean = true
@Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State showComment: boolean = false
@State topicInfo: TopicInfo = {} as TopicInfo
private trySendData2H5() {
if (!this.webPrepared || !this.dataPrepared) {
return
...
...
@@ -140,16 +142,22 @@ export struct SpacialTopicPageComponent {
if(pageInfoMsg && pageInfoMsg.data){
this.contentDetailData.openComment = Number(pageInfoMsg.data.topicInfo?.commentFlag)
this.contentDetailData.commentDisplay = Number(pageInfoMsg.data.topicInfo?.commentShowFlag)
if(pageInfoMsg.data.topicInfo?.shareOpen === 1){
console.log('contentDetailData pageInfoMsg.data', JSON.stringify(pageInfoMsg.data))
this.topicInfo = pageInfoMsg.data.topicInfo
this.contentDetailData.newsId = Number(this.topicInfo.topicId)
this.contentDetailData.newsType = this.topicInfo.topicType
if(this.topicInfo?.shareOpen === 1){
this.contentDetailData.shareInfo.shareOpen = this.topicInfo?.shareOpen
console.log('contentDetailData this.topicInfo', JSON.stringify(this.topicInfo))
if (!this.operationButtonList.includes('share')) {
this.operationButtonList.push('share');
}
}
else
{
}
else
{
this.operationButtonList = this.operationButtonList.filter(e =>e !== 'share')
}
}
console.log('contentDetailData',
this.contentDetailData
)
console.log('contentDetailData',
JSON.stringify(this.contentDetailData)
)
}
}
}
...
...
@@ -199,6 +207,7 @@ export struct SpacialTopicPageComponent {
contentDetailData: this.contentDetailData,
publishCommentModel: this.publishCommentModel,
operationButtonList: this.operationButtonList,
topicInfo: this.topicInfo,
styleType: 1,
onCommentIconClick:()=>{
this.showCommentList = true
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/ChannelSubscriptionLayout.ets
View file @
c488862
...
...
@@ -298,7 +298,7 @@ struct ChannelSubscriptionLayout {
Text(INDEX_SETTING_SUBTITLE)
.fontSize(12)
.fontWeight(400)
.fontColor('#222222')
.fontColor('#
80
222222')
}
.width('100%')
.margin({ top: 22, bottom: 16 })
...
...
sight_harmony/features/wdComponent/src/main/ets/components/reusable/CustomPullToRefresh.ets
View file @
c488862
...
...
@@ -106,7 +106,10 @@ export struct CustomPullToRefresh {
lottie.destroy(this.refreshingAnimName);
this.refreshAnimation?.removeEventListener('DOMLoaded')
this.refreshAnimation?.removeEventListener('destroy')
this.refreshingAnimation?.removeEventListener('DOMLoaded')
this.refreshingAnimation?.removeEventListener('destroy')
this.refreshAnimation = null
this.refreshingAnimation = null
}
@Builder
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
View file @
c488862
...
...
@@ -29,7 +29,8 @@ import { JSON } from '@kit.ArkTS'
import { MoreComponent } from '../cardview/MoreComponent'
import { Card9Component } from '../cardview/Card9Component'
import { WDRouterRule, WDRouterPage } from 'wdRouter/Index'
import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent'
import { EmptyComponent, WDViewDefaultType } from '../view/EmptyComponent'
const TAG = "SearchResultContentComponent"
@Component
...
...
@@ -148,7 +149,7 @@ export struct SearchResultContentComponent {
this.data_rmh.push(data)
})
if
(this.data_rmh.length > 0)
{
if
(this.data_rmh.length > 0)
{
this.count = 1
}
//只有一条创作者,获取 创作者信息
...
...
@@ -262,7 +263,7 @@ export struct SearchResultContentComponent {
this.isLoading = false
this.count = this.count === -1 ? 0 : this.count
})
}else {
}
else {
this.hasMore = false
}
}
...
...
@@ -270,12 +271,12 @@ export struct SearchResultContentComponent {
build() {
Column() {
if (this.count == 0) {
// ListHasNoMoreDataUI({ style: 2 })
EmptyComponent({
emptyType: WDViewDefaultType.WDViewDefaultType_NoSearchResult,
emptyButton: false,
}).height('70%')
})
} else {
List({ scroller: this.scroller2 }) {
if (this.data_rmh != null && this.data_rmh.length > 0) {
...
...
@@ -326,12 +327,13 @@ export struct SearchResultContentComponent {
}, (item: ContentDTO, index: number) => index.toString())
//没有更多数据 显示提示
if (!this.hasMore && (this.data.totalCount() > 0|| (this.data_rmh != null && this.data_rmh.length > 0))) {
if (!this.hasMore && (this.data.totalCount() > 0
|| (this.data_rmh != null && this.data_rmh.length > 0))) {
ListItem() {
ListHasNoMoreDataUI()
}
}
}.cachedCount(5)
}
.cachedCount(5)
.edgeEffect(EdgeEffect.None)
.scrollBar(BarState.Off)
.height('100%')
...
...
@@ -344,6 +346,7 @@ export struct SearchResultContentComponent {
}
}
.backgroundColor($r('app.color.white'))
.height('100%')
.width('100%')
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/EmptyComponent.ets
View file @
c488862
...
...
@@ -60,6 +60,7 @@ export struct EmptyComponent {
@State emptyButton: boolean = false
@State isBlack: boolean = false // 背景是否为黑色 默认白色
@State timeNum: number = 10
/**
* The empty image width percentage setting.
*/
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
View file @
c488862
...
...
@@ -51,38 +51,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
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',
params: {
url: this.compDTO.linkUrl
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
} 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)
}
ProcessUtils.compJumpPage(this.compDTO)
}
}
...
...
@@ -115,7 +84,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
}
.visibility(this.showMore() ? Visibility.Visible : Visibility.None)
.onClick(() => {
this.liveToMore();
ProcessUtils.compJumpPage(this.compDTO)
})
}.justifyContent(FlexAlign.SpaceBetween)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/LiveHorizontalCardComponent.ets
View file @
c488862
...
...
@@ -72,13 +72,26 @@ export struct LiveHorizontalCardComponent {
// }
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_
H5_BY_WEB_VIEW
',
type: 'JUMP_
INNER_NEW_PAGE
',
params: {
url: this.compDTO.linkUrl
url: this.compDTO.linkUrl,
pageID: 'SPACIAL_TOPIC_PAGE',
contentID: this.compDTO.objectId,
extra: {
relId: this.compDTO.relId,
relType: this.compDTO.relType,
pageId: this.compDTO.pageId
}
} as Params,
};
this.compDTO.operDataList = []
console.log('LiveHorizontalCardComponent', JSON.stringify(this.compDTO))
console.log('LiveHorizontalCardComponent', this.compDTO.relId)
console.log('LiveHorizontalCardComponent', this.compDTO.relType)
console.log('LiveHorizontalCardComponent', JSON.stringify(taskAction))
WDRouterRule.jumpWithAction(taskAction)
} else {
// console.log('LiveHorizontalCardComponent', 'jumpToLiveMorePage')
this.jumpToLiveMorePage()
}
} else {
...
...
@@ -90,6 +103,7 @@ export struct LiveHorizontalCardComponent {
linkUrl: this.compDTO.linkUrl,
pageId: this.compDTO.pageId
} as ContentDTO
// console.log('LiveHorizontalCardComponent', 'ProcessUtils.processPage')
ProcessUtils.processPage(contentDTO)
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/OperRowListView.ets
View file @
c488862
...
...
@@ -6,7 +6,8 @@ import {
ContentDetailDTO,
contentListParams,
InteractDataDTO,
postExecuteCollectRecordParams
postExecuteCollectRecordParams,
TopicInfo
} from 'wdBean';
import router from '@ohos.router';
import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel';
...
...
@@ -94,6 +95,7 @@ export struct OperRowListView {
@Consume pageId: string
@State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
@State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
@Prop topicInfo?: TopicInfo = {} as TopicInfo
async aboutToAppear() {
console.info(TAG, 'this.needLike', this.needLike)
...
...
@@ -416,7 +418,33 @@ export struct OperRowListView {
}
share() {
WDShare.shareContent(this.contentDetailData)
if (this.topicInfo && Object.keys(this.topicInfo).length > 0) {
console.info(TAG, 'contentDetailData this.topicInfo', JSON.stringify(this.topicInfo))
let contentDetailData: ContentDetailDTO = {
newsId: this.topicInfo?.topicId && Number.parseInt(this.topicInfo.topicId),
shareInfo:{
appCustomContentId: this.topicInfo?.topicId,
appCustomContentType: this.topicInfo?.topicType + '',
shareTitle: this.topicInfo?.shareTitle,
shareSummary: this.topicInfo?.shareSummary,
appCustomImageUrl: this.topicInfo?.shareCoverUrl,
sharePosterCoverUrl: this.topicInfo?.sharePosterCoverUrl,
shareUrl: this.topicInfo?.shareUrl,
appCustomTargetRelId: this.topicInfo?.relId,
appCustomTargetRelType: this.topicInfo?.relType,
appCustomShowReport: false,
appCustomShowLike: -1,
shareOpen: 1,
sharePosterOpen: this.topicInfo?.posterFlag,
appCustomShowPoster: this.topicInfo?.posterFlag && this.topicInfo?.posterFlag > 0 ? 1 : -1,
}
} as ContentDetailDTO
WDShare.setTopicBeanToShareBean(contentDetailData.shareInfo , this.topicInfo)
WDShare.shareContent(contentDetailData,TrackConstants.PageName.Eletronic_Paper,TrackConstants.PageName.Eletronic_Paper)
} else {
console.info(TAG, 'this.contentDetailData')
WDShare.shareContent(this.contentDetailData)
}
}
// 已登录->查询用户对作品收藏状态
...
...
sight_harmony/features/wdComponent/src/main/ets/repository/PageRepository.ets
View file @
c488862
import { HttpUrlUtils, HttpUtils, ResponseDTO, WDHttp } from 'wdNetwork';
import { DateTimeUtils,
Logger, StringUtils, EmitterUtils, EmitterEventId
} from 'wdKit';
import { DateTimeUtils,
EmitterEventId, EmitterUtils, Logger, SPHelper, StringUtils
} from 'wdKit';
import {
batchLikeAndCollectResult,
...
...
@@ -7,8 +7,11 @@ import {
ContentDetailDTO,
ContentDTO,
contentListParams,
FeedbackTypeBean,
GoldenPositionExtraBean,
InteractDataDTO,
LiveReviewDTO,
LiveRoomDataBean,
MorningEveningPaperDTO,
NavigationBodyDTO,
NavigationDetailDTO,
...
...
@@ -22,13 +25,10 @@ import {
postExecuteCollectRecordParams,
postExecuteLikeParams,
postInteractAccentionOperateParams,
postRecommendListParams,
GoldenPositionExtraBean,
FeedbackTypeBean,
LiveRoomDataBean
postRecommendListParams
} from 'wdBean';
import { PageUIReqBean } from '../components/page/bean/PageUIReqBean';
import {
ArrayList } from '@kit.ArkTS
';
import {
SpConstants } from 'wdConstant/Index
';
const TAG = 'HttpRequest';
...
...
@@ -243,6 +243,14 @@ export class PageRepository {
url = url + "&districtCode=" + HttpUtils.getDistrictCode()
+ "&provinceCode=" + provinceCode
+ "&cityCode=" + HttpUtils.getCityCode()
let per=SPHelper.default.getSync(SpConstants.LOCATION_FIRST_POSITION,true)
if(per){
//检测首次获取地理信息
url = url+'&firstLocation=1'
SPHelper.default.save(SpConstants.LOCATION_FIRST_POSITION,false)
}
}
if (myChannelIds) {
url = url + `&channelIds=${myChannelIds}`
...
...
sight_harmony/features/wdShare/src/main/ets/WDShare.ets
View file @
c488862
...
...
@@ -45,10 +45,10 @@ export class WDShare {
}
//专题分享数据转换
static setTopicBeanToShareBean(shareBean: ShareInfoDTO, topicInfoBean: TopicInfo){
shareBean.appCustomTopicType = topicInfoBean.topicType+''
static setTopicBeanToShareBean(shareBean: ShareInfoDTO, topicInfoBean?: TopicInfo){
shareBean.appCustomTopicType = topicInfoBean?.topicType+''
//21:文章专题,22:音频专题,23:直播专题,24:话题专题,25:早晚报专题,26:时间链
if(25 == topicInfoBean.topicType){
if(25 == topicInfoBean
?
.topicType){
shareBean.appCustomShowPosterType = 6
shareBean.appCustomTopicPattern = topicInfoBean.topicPattern
shareBean.appCustomPublishTime = topicInfoBean.topicDate
...
...
@@ -76,11 +76,11 @@ export class WDShare {
//文章/直播/话题专题(H5普通文章专题,包含时间链)
shareBean.appCustomShowPosterType = 8
//海报的头图
shareBean.sharePosterCoverUrl = topicInfoBean
.backgroundImgUrl
shareBean.sharePosterCoverUrl = topicInfoBean
?.backgroundImgUrl || ''
shareBean.appCustomIsFrontDaily = false
shareBean.appCustomPosterTitle = topicInfoBean.title
shareBean.appCustomPosterSummary = topicInfoBean.summary
if(topicInfoBean.shareContentList != null && topicInfoBean.shareContentList.length>0){
shareBean.appCustomPosterTitle = topicInfoBean?.title || ''
shareBean.appCustomPosterSummary = topicInfoBean?.summary || ''
if(topicInfoBean?.shareContentList != null && topicInfoBean?.shareContentList && topicInfoBean.shareContentList.length > 0){
shareBean.appCustomSharePosterItemList = [] as SharePosterItemBean[]
shareBean.appCustomSharePosterItemList.length = topicInfoBean.shareContentList.length
for (let index = 0; index < topicInfoBean.shareContentList.length; index++) {
...
...
sight_harmony/products/phone/src/main/ets/pages/SpacialTopicPage.ets
View file @
c488862
...
...
@@ -7,7 +7,7 @@ import dataPreferences from '@ohos.data.preferences';
import { TrackConstants } from 'wdTracking/Index';
const TAG = 'SpacialTopicPage';
//H5专题
@Entry
@Component
struct SpacialTopicPage {
...
...
Please
register
or
login
to post a comment