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 17:14:54 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
a72ff1112e9a73c671f89a9b05d74d7f8b73b2ba
a72ff111
2 parents
06df6531
d82cfc95
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
218 additions
and
85 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/cardCommon/CardSourceInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/RmhTitle.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PeopleShipHomePage.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/repository/PageRepository.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
sight_harmony/features/wdPlayer/src/main/ets/controller/WDAliPlayerController.ets
sight_harmony/products/phone/src/main/ets/pages/SpacialTopicPage.ets
sight_harmony/commons/wdConstant/src/main/ets/constants/SpConstants.ets
View file @
a72ff11
...
...
@@ -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 @
a72ff11
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
}
/**
* 页面跳转
*/
...
...
@@ -114,6 +184,8 @@ export class ProcessUtils {
ProcessUtils.gotoAudio(content)
break;
case ContentConstants.TYPE_TELETEXT:
ProcessUtils.gotoWeb(content);
break;
case ContentConstants.TYPE_Activity:
// 图文详情,跳转h5
if (content?.linkUrl) { //有 linkUrl 走专题页展示逻辑
...
...
sight_harmony/features/wdBean/src/main/ets/bean/component/CompDTO.ets
View file @
a72ff11
...
...
@@ -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,8 +56,22 @@ export class CompDTO implements BaseDTO {
// keyGenerator相关字符串,用于刷新list布局
timestamp: String = '1'
relId?: String = ''
relType?: String = ''
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 @
a72ff11
...
...
@@ -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 @
a72ff11
...
...
@@ -208,14 +208,14 @@ export struct CompParser {
if (this.compDTO.compStyle === this.nextCompDTO.compStyle) {
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else {
Divider().strokeWidth(5).color('#f5f5f5')
.padding({ left: 16, right: 16 })
Divider().strokeWidth(5).color('#f5f5f5')
}
} else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
// 大专题
if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else {
Divider().strokeWidth(5).color('#f5f5f5')
.padding({ left: 16, right: 16 })
Divider().strokeWidth(5).color('#f5f5f5')
}
} else if (this.compDTO.compType === 'appStyle') {
if (
...
...
@@ -225,7 +225,7 @@ export struct CompParser {
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_04 ||
this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_06
) {
Divider().strokeWidth(5).color('#f5f5f5')
.padding({ left: 16, right: 16 })
Divider().strokeWidth(5).color('#f5f5f5')
} else {
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
View file @
a72ff11
...
...
@@ -76,8 +76,15 @@ export struct CardSourceInfo {
const num2: string = num.slice(-4, -3); // 千
return num2 === '0' ? num1 + '万' : num1 + '.' + num2 + '万'
} else if (Number.parseInt(num) > 99999999) {
const num1: string = num.slice(0, -8); // 亿
const num2: string = num.slice(-8, -7);
let num1: string = num.slice(0, -8); // 亿
let num2: string = num.slice(-8, -7);
const num3: string = `0.${num.slice(-7, -6)}`
if (Math.round(Number(num3)) > Number(num3)) {
if (`${Number(num2) + 1}`.length === 2) {
num1 = `${Number(num1) + 1}`
num2 = '0'
}
}
return num2 === '0' ? num1 + '亿' : num1 + '.' + num2 + '亿'
}
return num
...
...
@@ -91,29 +98,19 @@ export struct CardSourceInfo {
}
build() {
Flex({
alignItems: ItemAlign.Center
}) {
Flex({
justifyContent: FlexAlign.Start, direction: FlexDirection.Row
}) {
// 标签
if (this.contentDTO.corner) {
Text(this.contentDTO.corner)
.fontSize($r("app.float.font_size_11"))
.fontColor($r("app.color.color_ED2800"))
.margin({ right: 6 })
}
if (this.contentDTO.cornerMark) {
Text(this.contentDTO.cornerMark)
if (this.contentDTO.cornerMark || this.contentDTO.corner) {
Text(this.contentDTO.cornerMark || this.contentDTO.corner)
.fontSize($r("app.float.font_size_11"))
.fontColor($r("app.color.color_ED2800"))
.margin({ right: 6 })
.flexShrink(0)
}
// 来源信息
if (this.contentDTO.rmhPlatform === 1) {
Text(this.contentDTO.rmhInfo?.rmhName)
.fontSize($r("app.float.font_size_11"))
.fontColor($r("app.color.color_B0B0B0"))
.maxLines(1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
} else if (this.contentDTO.source) {
Text(`${this.contentDTO.source}`)
if (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source) {
Text(this.contentDTO.rmhPlatform === 1 ? this.contentDTO.rmhInfo?.rmhName : this.contentDTO.source)
.fontSize($r("app.float.font_size_11"))
.fontColor($r("app.color.color_B0B0B0"))
.maxLines(1)
...
...
@@ -121,7 +118,7 @@ export struct CardSourceInfo {
}
// 点
if (((this.contentDTO.rmhPlatform === 1 && this.contentDTO.rmhInfo?.rmhName &&
if (
this.showTime() ||
((this.contentDTO.rmhPlatform === 1 && this.contentDTO.rmhInfo?.rmhName &&
this.contentDTO.rmhInfo?.rmhName != '') || (this.contentDTO.source && this.contentDTO.source != '')) &&
(this.getContentDtoBean()?.interactData?.commentNum
// || DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)) != ''
...
...
@@ -150,7 +147,7 @@ export struct CardSourceInfo {
}
// 评论数
if (!this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 &&
if (
(this.contentDTO.rmhPlatform === 1 || this.contentDTO.source) &&
!this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 &&
this.showCommentNum()) {
Text(`${this.handlerNum(this.getContentDtoBean()?.interactData?.commentNum.toString())}评`)
.fontSize($r("app.float.font_size_11"))
...
...
@@ -158,7 +155,7 @@ export struct CardSourceInfo {
.flexShrink(0)
} else {
if (this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) {
if (
(this.contentDTO.rmhPlatform === 1 || this.contentDTO.source) &&
this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) {
Text(`${this.handlerNum(this.contentDTO.interactData?.commentNum.toString())}评`)
.fontSize($r("app.float.font_size_11"))
.fontColor($r("app.color.color_B0B0B0"))
...
...
@@ -211,11 +208,11 @@ export struct CardSourceInfo {
}
// 评论数
if (!this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 &&
if (
(this.contentDTO.rmhPlatform === 1 || this.contentDTO.source) &&
!this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 &&
this.showCommentNum()) {
have = true
} else {
if (this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) {
if (
(this.contentDTO.rmhPlatform === 1 || this.contentDTO.source) &&
this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) {
have = true
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/RmhTitle.ets
View file @
a72ff11
...
...
@@ -116,7 +116,8 @@ export struct RmhTitle {
Stack() {
Image(this.loadImg ? this.rmhInfo?.rmhHeadUrl : $r('app.media.comment_rmh_tag'))
.width(36)
.height(36).borderRadius(50)
.height(36)
.borderRadius(50)
Image(this.rmhInfo?.authIcon)
.width(14)
.height(14)
...
...
@@ -128,10 +129,13 @@ export struct RmhTitle {
Column() {
Text(this.rmhInfo?.rmhName)
.fontSize(
$r('app.float.font_size_13')
)
.fontSize(
15
)
.fontColor($r('app.color.color_222222'))
.fontWeight(600)
.alignSelf(ItemAlign.Start)
.height(21)
.lineHeight(21)
.margin({bottom: 1})
Flex({alignContent: FlexAlign.Start, wrap: FlexWrap.NoWrap}) {
Row() {
if (!(this.hideTime && this.getDaysBetweenDates(Number(this.publishTime)) > 2)) {
...
...
@@ -139,11 +143,13 @@ export struct RmhTitle {
Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.publishTime)))
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
.height(14)
.lineHeight(14)
}
if (this.publishTime && this.rmhInfo?.rmhDesc) {
Image($r('app.media.point'))
.width(16)
.height(16)
.width(14)
.height(14)
}
}
if(this.rmhInfo?.rmhDesc != undefined){
...
...
@@ -154,12 +160,16 @@ export struct RmhTitle {
.alignSelf(ItemAlign.Start)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.textAlign(TextAlign.Start)
.height(14)
.lineHeight(14)
}
}
.width('75%')
.height(14)
}
}
.justifyContent(FlexAlign.SpaceBetween)
Blank()
if (this.rmhInfo?.cnIsAttention) {
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card6Component.ets
View file @
a72ff11
...
...
@@ -121,6 +121,7 @@ export struct Card6Component {
.borderRadius(5)
.aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4)
.height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78 : 156)
.border({width: 1, color: 0xf5f5f5})
CardMediaInfo({ contentDTO: this.contentDTO })
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhCarouselLayout01.ets
View file @
a72ff11
...
...
@@ -300,7 +300,8 @@ struct indicatorAnimations {
// .height(2)
Image($r('app.media.swiper_indicator_gray'))
.width('100%')
.objectFit(ImageFit.Contain)
.width('96%')
.height(2)
Image($r('app.media.swiper_indicator_white'))
.width(this.leftW)
...
...
@@ -334,7 +335,8 @@ struct indicatorAnimations {
// .width('100%')
// .height(2)
Image($r('app.media.swiper_indicator_gray'))
.width('100%')
.objectFit(ImageFit.Contain)
.width('96%')
.height(2)
Image($r('app.media.swiper_indicator_white'))
.width(this.rightW)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/page/PeopleShipHomePage.ets
View file @
a72ff11
...
...
@@ -13,7 +13,7 @@ import {
PeopleShipUserDetailData,
ArticleCountData
} from 'wdBean'
import { EmptyComponent } from '../view/EmptyComponent'
import { EmptyComponent
,WDViewDefaultType
} from '../view/EmptyComponent'
import { CustomTitleUI } from '../reusable/CustomTitleUI'
@Entry
...
...
@@ -41,6 +41,7 @@ struct PeopleShipHomePage {
@State isLoading: boolean = true
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State isConnectNetwork : boolean = NetworkUtil.isNetConnected()
@State isHasHomePage: boolean = true
onPageShow(): void {
WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff'})
...
...
@@ -60,6 +61,7 @@ struct PeopleShipHomePage {
build() {
if(this.isConnectNetwork){
if (this.isHasHomePage){
Stack({ alignContent: Alignment.TopStart }) {
Stack({ alignContent: Alignment.Top }){
// 顶部图片
...
...
@@ -145,6 +147,14 @@ struct PeopleShipHomePage {
.margin({top:px2vp(this.topSafeHeight)})
}
.width('100%')
}else {
Column(){
CustomTitleUI({ titleName: "" })
EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoUserHomepage}).height('70%')
}.width("100%")
.height("100%")
.padding({top:px2vp(this.topSafeHeight)})
}
}else{
Column(){
CustomTitleUI({ titleName: "" })
...
...
@@ -184,6 +194,7 @@ struct PeopleShipHomePage {
} catch (exception) {
this.isLoading = false
this.isHasHomePage = false
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
View file @
a72ff11
...
...
@@ -310,7 +310,7 @@ export struct SearchResultContentComponent {
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
}
} else {
if (this.data?.get(index + 1)?.sameContentListSize > 0) {
if (this.data?.get(index + 1)?.sameContentListSize > 0
&& index !== 0
) {
Divider()
.width('100%')
.color($r('app.color.color_F5F5F5'))
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/EmptyComponent.ets
View file @
a72ff11
...
...
@@ -44,7 +44,9 @@ export const enum WDViewDefaultType {
// 17. 暂无评论快来抢沙发
WDViewDefaultType_NoComment1,
// 18. 内容找不到了
WDViewDefaultType_NoContent2
WDViewDefaultType_NoContent2,
// 19. 暂时无法查看该创作者主页
WDViewDefaultType_NoUserHomepage
}
/**
...
...
@@ -214,6 +216,8 @@ export struct EmptyComponent {
contentString = '暂无评论,快来抢沙发'
} else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoContent2) {
contentString = '内容找不到了'
} else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoUserHomepage){
contentString = '暂时无法查看该创作者主页'
}
return contentString
...
...
@@ -250,6 +254,8 @@ export struct EmptyComponent {
this.emptyType === WDViewDefaultType.WDViewDefaultType_NoFollow ||
this.emptyType === WDViewDefaultType.WDViewDefaultType_NoContent2) {
imageString = $r('app.media.icon_no_appointmentMade1')
}else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoUserHomepage){
imageString = $r('app.media.icon_no_master1')
}
return imageString
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/HorizontalStrokeCardThreeTwoRadioForMoreComponent.ets
View file @
a72ff11
...
...
@@ -51,41 +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) {
// console.log('HorizontalStrokeCardThreeTwoRadioForMoreComponent', 'JUMP_H5_BY_WEB_VIEW')
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
params: {
url: this.compDTO.linkUrl
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
} else {
// console.log('HorizontalStrokeCardThreeTwoRadioForMoreComponent', 'jumpToLiveMorePage')
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
// console.log('HorizontalStrokeCardThreeTwoRadioForMoreComponent', 'ProcessUtils.processPage')
ProcessUtils.processPage(contentDTO)
}
ProcessUtils.compJumpPage(this.compDTO)
}
}
...
...
@@ -118,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/repository/PageRepository.ets
View file @
a72ff11
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/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
View file @
a72ff11
...
...
@@ -7,12 +7,15 @@ import { ContentDetailDTO, LiveRoomDataBean } from 'wdBean/Index';
import { DisplayDirection } from 'wdConstant/Index';
import { LiveFollowComponent, LottieView } from 'wdComponent/Index';
import { WDShare } from 'wdShare/Index';
import { faceDetector } from '@kit.CoreVisionKit';
//直播间播放器上层覆盖物
@Component
export struct PlayUIComponent {
playerController?: WDAliPlayerController;
//菜单键是否可见
@State @Watch('onChangeMenuVisible') isMenuVisible: boolean = true
private ispause:boolean = false
@Consume contentDetailData: ContentDetailDTO
@Consume liveRoomDataBean: LiveRoomDataBean
@State currentTime: string = ''
...
...
@@ -35,8 +38,11 @@ export struct PlayUIComponent {
let time: number = 0
if (this.isMenuVisible) {
setTimeout(() => {
if(this.ispause){
return
}
this.isMenuVisible = false
},
5
* 1000)
},
4
* 1000)
} else {
clearTimeout(time)
}
...
...
@@ -46,6 +52,16 @@ export struct PlayUIComponent {
this.onChangeMenuVisible()
this.initPlayerSet()
if(this.playerController){
this.playerController.onStatusChangeForPlayUIComponent = (status: number) => {
if(1 == status){
this.ispause = false
this.isMenuVisible = false
}else if(2 == status){
this.ispause = true
}
}
}
}
aboutToDisappear(): void {
...
...
@@ -271,6 +287,9 @@ export struct PlayUIComponent {
if (this.contentDetailData?.liveInfo?.liveState === 'wait') {
return
}
if(this.ispause){
return
}
this.isMenuVisible = !this.isMenuVisible
})
}
...
...
@@ -290,7 +309,7 @@ export struct PlayUIComponent {
.fontWeight(600)
.fontSize('12fp')
.margin({
left:
16
left:
20
})
}
...
...
@@ -308,7 +327,7 @@ export struct PlayUIComponent {
.fontWeight(600)
.fontSize('12fp')
.margin({
right:
16
right:
20
})
}
...
...
@@ -376,7 +395,9 @@ export struct PlayUIComponent {
this.playerController?.pause()
} else {
this.isPlayStatus = true
if (this.contentDetailData.liveInfo?.liveState == 'running') {
this.playerController?.firstPlay(this.liveUrl)
}
this.playerController?.play()
}
})
...
...
sight_harmony/features/wdPlayer/src/main/ets/controller/WDAliPlayerController.ets
View file @
a72ff11
...
...
@@ -60,6 +60,7 @@ export class WDAliPlayerController {
// 准备完成,决定是否播放回调。如果不实现,则自动播放
public onCanplay?: () => void;
public onStatusChange?: (status: number) => void;
public onStatusChangeForPlayUIComponent?: (status: number) => void;
public onFirstFrameDisplay?: () => void
// 埋点字段
private creatStartTime: number = 0; //开始加载时间
...
...
@@ -513,6 +514,9 @@ export class WDAliPlayerController {
if (this.onStatusChange) {
this.onStatusChange(this.status)
}
if(this.onStatusChangeForPlayUIComponent){
this.onStatusChangeForPlayUIComponent(this.status)
}
}
...
...
sight_harmony/products/phone/src/main/ets/pages/SpacialTopicPage.ets
View file @
a72ff11
...
...
@@ -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