陈剑华

Merge remote-tracking branch 'origin/main'

... ... @@ -9,7 +9,7 @@ import font from '@ohos.font';
import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog';
import { RMCalendarBean } from './calendar/RMCalendarBean';
import { newsSkeleton } from './skeleton/newsSkeleton';
import { Logger, ToastUtils, NetworkUtil, CustomToast } from 'wdKit/Index';
import { Logger, ToastUtils, NetworkUtil, CustomToast, DisplayUtils } from 'wdKit/Index';
import { TrackingContent, TrackConstants, TrackingButton } from 'wdTracking/Index';
import { WDShare } from 'wdShare/Index';
import { window } from '@kit.ArkUI';
... ... @@ -25,6 +25,9 @@ export struct ENewspaperPageComponent {
@State picHeight: number = 0
@Provide itemPicWidth: number = 0
@Provide itemPicHeight: number = 0
@Provide topMargin: number = DisplayUtils.getDeviceHeight()
@State newspaperListBean: NewspaperListBean = {} as NewspaperListBean
@Provide @Watch('onCurrentPageNumUpdated') currentPageNum: string = '01'
@State pageDialogShow: boolean = false
... ... @@ -404,6 +407,14 @@ export struct ENewspaperPageComponent {
}
if (this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {
this.isOpenListDialog = true
animateTo({
duration: 300,
onFinish: () => {
}
}, () => {
this.topMargin = 0;
})
//电子报--读报纸点击
TrackingContent.clickWithEvent('read_newspaper_click', TrackConstants.PageName.NewsPaperPage,
TrackConstants.PageName.NewsPaperPage
... ... @@ -429,7 +440,15 @@ export struct ENewspaperPageComponent {
newspaperListBean: this.newspaperListBean,
scrollIndex: this.swiperIndex,
closeDialog: () => {
this.isOpenListDialog = false
animateTo({
duration: 300,
onFinish: () => {
this.isOpenListDialog = false
}
}, () => {
this.topMargin = DisplayUtils.getDeviceHeight();
})
}
})
}
... ... @@ -451,6 +470,7 @@ export struct ENewspaperPageComponent {
// 计算图片的内容宽高
this.itemPicWidth = this.picWidth - vp2px(20)
this.itemPicHeight = this.picHeight - vp2px(28)
try {
if (NetworkUtil.isNetConnected()) {
let listBean =
... ...
... ... @@ -248,34 +248,36 @@ export struct ImageAndTextPageComponent {
console.log(TAG, "点击滑动页面", JSON.stringify(info))
//评论区当前位置
let currentCommonentOffSetY = this.info?.globalPosition.y as number
let offSetY = 0
if (currentCommonentOffSetY >= (this.screenHeight-this.bottomHeight) ) {
offSetY = currentCommonentOffSetY-200
this.showMainText = true
}else {
this.showMainText = false
}
this.scroller.scrollTo({
yOffset: offSetY,
xOffset: 0,
animation: { duration: 1000, curve: Curve.Ease }
})
// if (!this.offsetY) {
// this.offsetY = componentUtils.getRectangleById('comment').windowOffset.y
// }
// // 定位到评论区域
// if (this.isScrollTop) {
// this.scroller.scrollTo({
// xOffset: 0,
// yOffset: this.offsetY,
// animation: true
// })
// } else {
// this.scroller.scrollEdge(Edge.Top)
// let currentCommonentOffSetY = this.info?.globalPosition.y as number
// let offSetY = 0
// if (currentCommonentOffSetY >= (this.screenHeight-this.bottomHeight) ) {
// offSetY = currentCommonentOffSetY-200
// this.showMainText = true
// }else {
// this.showMainText = false
// }
// this.isScrollTop = !this.isScrollTop
// this.scroller.scrollTo({
// yOffset: offSetY,
// xOffset: 0,
// animation: { duration: 1000, curve: Curve.Ease }
// })
if (!this.offsetY) {
this.offsetY = componentUtils.getRectangleById('comment').windowOffset.y
}
// 定位到评论区域
if (this.isScrollTop) {
this.scroller.scrollTo({
xOffset: 0,
yOffset: this.offsetY,
animation: { duration: 1000, curve: Curve.Ease }
})
// this.showMainText = true
} else {
this.scroller.scrollEdge(Edge.Top)
// this.showMainText = false
}
this.isScrollTop = !this.isScrollTop
}
})
}
... ... @@ -357,7 +359,6 @@ export struct ImageAndTextPageComponent {
if (this.detailContentEmpty) {
this.emptyType = 18
}
console.log(TAG, "dl1111111111", JSON.stringify(detailBeans[0]))
if (detailBeans && detailBeans.length > 0) {
this.contentDetailData = detailBeans[0];
let dateTime =
... ... @@ -560,21 +561,22 @@ export struct ImageAndTextPageComponent {
// 需要评论区位置,调用前 请确保它有值
return
}
let offSetY = this.info?.globalPosition.y as number -60
Logger.debug(TAG, "即将滚动至yOffset: " + offSetY)
if (offSetY >= (this.screenHeight-this.bottomHeight) ) {
this.showMainText = false
}else {
this.showMainText = true
}
if (this.action.params?.targetLayout && this.action.params.targetLayout == "comment") {
if (this.lastTimeoutId) {
clearTimeout(this.lastTimeoutId)
}
this.lastTimeoutId = setTimeout(() => {
let offSetY = this.info?.globalPosition.y as number
Logger.debug(TAG, "即将滚动至yOffset: " + (offSetY - 100))
if (offSetY >= (this.screenHeight-this.bottomHeight) ) {
this.showMainText = true
}else {
this.showMainText = false
}
//头部距离48
this.scroller.scrollTo({
yOffset: offSetY - 100,
yOffset: offSetY,
xOffset: 0,
animation: { duration: 1000, curve: Curve.Ease }
})
... ...
... ... @@ -102,6 +102,7 @@ export struct ImageAndTextWebComponent {
onWebPrepared: this.onWebPrepared.bind(this),
isPageEnd: $isPageEnd
})
.padding({top:10})
}
}
... ...
import { ImageKnifeComponent } from '@ohos/imageknife';
import { ContentDTO, FrontLinkObject } from 'wdBean';
import { Logger } from 'wdKit/Index';
import { ProcessUtils } from 'wdRouter/Index';
... ... @@ -28,9 +29,12 @@ export struct topicInfoView {
build() {
RelativeContainer() {
Stack(){
Image(this.frontLinkObject?.coverUrl)
.width("100%")
.height("100%")
ImageKnifeComponent({imageKnifeOption:{loadSrc:this.frontLinkObject?.coverUrl,isCacheable:true}})
.width('100%')
.height('100%')
// Image(this.frontLinkObject?.coverUrl)
// .width("100%")
// .height("100%")
Stack(){
Image('')
.width("100%")
... ...
... ... @@ -233,7 +233,7 @@ export struct HomePageBottomFollowComponent {
this.hasMore = false
}
}
this.bottomCompH = DisplayUtils.getDeviceHeight() - this.data_follow.totalCount()*100
this.bottomCompH = DisplayUtils.getDeviceHeight() - this.data_follow.totalCount()*101
console.log(TAG, `${this.bottomCompH}`);
this.isLoading = false
this.isGetRequest = true
... ...
... ... @@ -7,7 +7,7 @@
export struct newsSkeleton {
@State quantity: Array<number> = [1, 2, 3,]
@State showBottom: boolean = true
@Consume itemPicHeight: number
build() {
Row() {
Column() {
... ... @@ -17,12 +17,12 @@ export struct newsSkeleton {
Column() {
Image($r('app.media.peopleSeleton'))
.width('100%')
.height(47)// 后缀名不能省略
.height(this.getCompHeight(47))// 后缀名不能省略
.interpolation(ImageInterpolation.High)
.margin({
bottom: 6
})
textArea('100%', 8)
textArea('100%', this.getCompHeight(8),this.getCompHeight(5))
}
.margin({
right: '2%'
... ... @@ -33,20 +33,17 @@ export struct newsSkeleton {
Column() {
Row()
.width(`100%`)
.height(25)
.height(this.getCompHeight(25))
.backgroundColor('#FFF5F5F5')
Row()
.width(`100%`)
.height(4)
.height(this.getCompHeight(4))
.backgroundColor('#FFF5F5F5')
.margin({ top: 3, bottom: 3 })
.margin({ top: this.getCompHeight(3), bottom: this.getCompHeight(3) })
Row()
.width(`100%`)
.height(20)
.height(this.getCompHeight(20))
.backgroundColor('#FFF5F5F5')
// textArea(27, 25)
// textArea(27, 4)
// textArea(27, 20)
}
.width(`22%`)
.border({ width: 1 })
... ... @@ -63,59 +60,59 @@ export struct newsSkeleton {
.width('100%')
BoxAndLine().width('100%')
BoxAndBox({ firstBoxNumber: '65%', boxHeight: 100 })
BoxAndBox({ firstBoxNumber: '65%', boxHeight: this.getCompHeight(100) })
Column() {
textArea('100%', 79)
textArea('100%', this.getCompHeight(79),this.getCompHeight(5))
}
BoxAndBox({ firstBoxNumber: '30%', boxHeight: 51 })
BoxAndBox({ firstBoxNumber: '30%', boxHeight: this.getCompHeight(48) })
}
.width('50%')
.width('49%')
.margin({ right: 5 })
Column() {
Column() {
textArea('100%', 13)
textArea('100%', this.getCompHeight(13),this.getCompHeight(0))
}.width('100%')
Column() {
textArea('100%', 136)
textArea('100%', 13)
textArea('80%', 13)
textArea('100%', this.getCompHeight(136),this.getCompHeight(5))
textArea('100%', this.getCompHeight(13),this.getCompHeight(5))
textArea('80%', this.getCompHeight(13),this.getCompHeight(5))
}.width('100%').alignItems(HorizontalAlign.Start)
Column() {
textArea('100%', 126)
textArea('100%', this.getCompHeight(126),this.getCompHeight(5))
}
Column() {
textArea('100%', 13)
textArea('100%', this.getCompHeight(13),this.getCompHeight(5))
}
Row() {
Column() {
textArea('100%', 30)
textArea('100%', this.getCompHeight(30),this.getCompHeight(5))
}.width('50%').margin({ right: 5 })
Column() {
textArea('100%', 30)
textArea('100%', this.getCompHeight(30),this.getCompHeight(5))
}.layoutWeight(1)
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
Column() {
textArea('100%', 100)
textArea('100%', this.getCompHeight(100),this.getCompHeight(5))
}
}
.width('50%')
.width('49%')
}
.justifyContent(FlexAlign.SpaceBetween)
.backgroundColor(Color.White)
.padding({
top: 15,
bottom: 15,
right: 15,
left: 15
top: 14,
right: 10,
bottom: 14,
left: 10
})
if (this.showBottom) {
// Column().backgroundColor('#CBCBCB').height(5).width(339)
... ... @@ -133,17 +130,31 @@ export struct newsSkeleton {
.width('100%')
}
getCompHeight(height: number): number{
//设计图高度 478
let compH:number = height*px2vp(this.itemPicHeight)/478
return compH;
}
}
@Component
struct BoxAndLine {
@Consume itemPicHeight: number
build() {
Column() {
textArea('100%', 130)
textArea('100%', 13)
textArea('80%', 13)
textArea('100%', this.getCompHeight(130),this.getCompHeight(5))
textArea('100%', this.getCompHeight(13),this.getCompHeight(5))
textArea('80%', this.getCompHeight(13),this.getCompHeight(5))
}.alignItems(HorizontalAlign.Start)
}
getCompHeight(height: number): number{
//设计图高度 478
let compH:number = height*px2vp(this.itemPicHeight)/478
return compH;
}
}
... ... @@ -151,29 +162,37 @@ struct BoxAndLine {
struct BoxAndBox {
@Prop firstBoxNumber: number | Resource | string
@Prop boxHeight: number | Resource | string
@Consume itemPicHeight: number
build() {
Row() {
Column() {
textArea('100%', this.boxHeight)
textArea('100%', this.boxHeight,this.getCompHeight(5))
}.width(this.firstBoxNumber).margin({ right: 5 })
Column() {
textArea('100%', this.boxHeight)
textArea('100%', this.boxHeight,this.getCompHeight(5))
}.layoutWeight(1)
}.width('100%').justifyContent(FlexAlign.SpaceBetween)
}
getCompHeight(height: number): number{
//设计图高度 478
let compH:number = height*px2vp(this.itemPicHeight)/478
return compH;
}
}
@Builder
function textArea(width: number | Resource | string = '100%', height: number | Resource | string = '100%') {
function textArea(width: number | Resource | string = '100%', height: number | Resource | string = '100%',topM:number) {
Row()
.width(width)
.height(height)
.backgroundColor('#FFF5F5F5')
.margin({ top: 5 })
.backgroundColor(height === 13?Color.Red:'#FFF5F5F5')
.margin({ top: topM })
// .borderRadius(5)
}
... ...
... ... @@ -21,6 +21,7 @@ export struct ENewspaperListDialog {
@State scrollOffset: number = 0
@State isCurrentViewOpen: boolean = false
@Consume bottomSafeHeight: number
@Consume topMargin:number
//文字版选择弹框
pageListDialogController: CustomDialogController = new CustomDialogController({
builder: ENewspaperPageDialog({
... ... @@ -292,7 +293,7 @@ export struct ENewspaperListDialog {
left: 15,
right: 15,
// top: 16,
// bottom: 16
bottom: 25
})
.margin({
bottom: 85
... ... @@ -317,15 +318,13 @@ export struct ENewspaperListDialog {
})
}
.margin({ top: this.topHeight })
.margin({ top: this.topHeight + this.topMargin})
.width('100%')
.backgroundColor(Color.White)
}
.width('100%')
.height('100%')
.backgroundColor('#80000000')
.margin({ bottom: 50 })
.onClick(() => {
if (this.closeDialog) {
this.closeDialog()
... ...
import { AuthorListDTO, FullColumnImgUrlDTO, ReLInfoDTO, RmhInfoDTO, ShareInfoDTO,
UserInfoDTO,
VideoInfoDTO } from 'wdBean';
@Observed
export class ContentDetailModel{
newsId: number = 0;
newsTitle: string = "";
newsShortTitle: string= "";
newsDownTitle: string= "";
newsBodyTitle: string= "";
publishTime: string= "";
appstyle: number= 0;
newsType: number= 0;
newsSummary: string= "";
newsSource: string= "";
newsSourceName: string= "";
newsContent: string= "";
newsContentBak: string= "";
newsLinkUrl: string="";
bestNoticer: number= 0;
// newLinkObject?: any = null;
newIntroduction: string= "";
authorList: AuthorListDTO[]=[];
editorName: string="";
openAudio: number= 0;
// audioList: any[];
// hasPopUp?: any;
// popUps?: any[];
firstFrameImageUri: string= "";
reLInfo?: ReLInfoDTO | null = null;
fullColumnImgUrls: FullColumnImgUrlDTO[]=[];
shareInfo?: ShareInfoDTO | null = null;
// photoList: any[];
videoInfo: VideoInfoDTO[]=[];
// liveInfo?: any ;
// voteInfo?: any;
rmhInfo?: RmhInfoDTO | null = null;
userInfo?: UserInfoDTO | null = null;
openLikes: number= 0;
openComment: number= 0;
likesStyle: number= 0;
preCommentFlag: number= 0;
commentDisplay: number= 0;
keyArticle: number= 0;
rmhPlatform: number= 0;
readFlag?: number= 0;
// topicInfo?: any;
traceId: string= "";
itemId: string= "";
sceneId: string= "";
subSceneId: string= "";
// activityInfos: any[]=[];
recommendShow: number= 0;
visitorComment: number= 0;
itemTypeCode: string= "";
menuShow: number= 0;
newsTags: string= "";
// specialColumnId?: any;
specialColumnName: string= "";
// timeline?: any;
constructor(newsId: number, newsTitle: string, newsShortTitle: string, newsDownTitle: string, newsBodyTitle: string,
publishTime: string, appstyle: number, newsType: number, newsSummary: string, newsSource: string,
newsSourceName: string, newsContent: string, newsContentBak: string, newsLinkUrl: string, bestNoticer: number,
newIntroduction: string, authorList: AuthorListDTO[], editorName: string, openAudio: number,
firstFrameImageUri: string,fullColumnImgUrls: FullColumnImgUrlDTO[], videoInfo: VideoInfoDTO[],
openLikes: number, openComment: number, likesStyle: number, preCommentFlag: number,
commentDisplay: number, keyArticle: number, rmhPlatform: number, readFlag: number, traceId: string,
itemId: string, sceneId: string, subSceneId: string, recommendShow: number,
visitorComment: number, itemTypeCode: string, menuShow: number, newsTags: string,
specialColumnName: string, traceInfo: string, viewCount: number, isNewspaper: boolean, oldNewsId: string,
showTime: boolean, isLogin: string) {
this.newsId = newsId;
this.newsTitle = newsTitle;
this.newsShortTitle = newsShortTitle;
this.newsDownTitle = newsDownTitle;
this.newsBodyTitle = newsBodyTitle;
this.publishTime = publishTime;
this.appstyle = appstyle;
this.newsType = newsType;
this.newsSummary = newsSummary;
this.newsSource = newsSource;
this.newsSourceName = newsSourceName;
this.newsContent = newsContent;
this.newsContentBak = newsContentBak;
this.newsLinkUrl = newsLinkUrl;
this.bestNoticer = bestNoticer;
this.newIntroduction = newIntroduction;
this.authorList = authorList;
this.editorName = editorName;
this.openAudio = openAudio;
this.firstFrameImageUri = firstFrameImageUri;
this.fullColumnImgUrls = fullColumnImgUrls;
this.videoInfo = videoInfo;
this.openLikes = openLikes;
this.openComment = openComment;
this.likesStyle = likesStyle;
this.preCommentFlag = preCommentFlag;
this.commentDisplay = commentDisplay;
this.keyArticle = keyArticle;
this.rmhPlatform = rmhPlatform;
this.readFlag = readFlag;
this.traceId = traceId;
this.itemId = itemId;
this.sceneId = sceneId;
this.subSceneId = subSceneId;
this.recommendShow = recommendShow;
this.visitorComment = visitorComment;
this.itemTypeCode = itemTypeCode;
this.menuShow = menuShow;
this.newsTags = newsTags;
this.specialColumnName = specialColumnName;
this.traceInfo = traceInfo;
this.viewCount = viewCount;
this.isNewspaper = isNewspaper;
this.oldNewsId = oldNewsId;
this.showTime = showTime;
this.isLogin = isLogin;
}
traceInfo: string= "";
viewCount: number= 0;
isNewspaper: boolean = false;
oldNewsId: string= "";
// 本地字段
showTime:boolean = false;
isLogin?:string = ""
}
\ No newline at end of file
... ...
... ... @@ -9,7 +9,7 @@ import {
contentListParams,
getRecCompInfoParams
} from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
import { NetworkUtil, Logger, WindowModel, DateTimeUtils } from 'wdKit/Index';
import { NetworkUtil, Logger, WindowModel, DateTimeUtils, LazyDataSource } from 'wdKit/Index';
import { PictureLoading } from './PictureLoading';
import { DisplayDirection } from 'wdConstant/Index';
import { window } from '@kit.ArkUI';
... ... @@ -57,6 +57,7 @@ export struct VideoChannelDetail {
@Consume displayDirection: DisplayDirection
@Provide showCommentList: boolean = false
@State data: ContentDetailDTO[] = []
@State dataContentDetail: LazyDataSource<ContentDetailDTO> = new LazyDataSource();
@State currentIndex: number = 0
@State interactDataList: InteractDataDTO[] = []
@State totalCount: number = 0
... ... @@ -256,6 +257,7 @@ export struct VideoChannelDetail {
if (res.data) {
await this.getContentInteract(list2)
this.data = this.data.concat(res.data)
this.dataContentDetail.addItems(res.data)
}
console.log('根据视频楼层信息批量查询视频列表', JSON.stringify(res.data))
}).finally(() => {
... ... @@ -304,7 +306,8 @@ export struct VideoChannelDetail {
.visibility(this.isMouted ? Visibility.None : Visibility.Visible)
Swiper(this.swiperController) {
ForEach(this.data, (item: ContentDetailDTO, index: number) => {
// LazyForEach(this.data, (item: ContentDetailDTO, index: number) => {
LazyForEach(this.dataContentDetail, (item: ContentDetailDTO, index: number) => {
DetailPlayShortVideoPage({
contentDetailData: item,
currentIndex: this.currentIndex,
... ... @@ -314,6 +317,7 @@ export struct VideoChannelDetail {
}, (item: ContentDetailDTO) => item.newsId + '')
}
.displayCount(1, true)
.cachedCount(3)
.disableSwipe(this.displayDirection === DisplayDirection.VERTICAL || this.showCommentList ? false : true)
.visibility(this.isMouted ? Visibility.Visible : Visibility.Hidden)
.indicator(false)
... ...
... ... @@ -35,5 +35,6 @@ export enum Events {
STATE_CHANGE = 'stateChange',
VIDEO_SIZE_CHANGE = "videoSizeChange",
TIME_UPDATE = 'timeUpdate',
ERROR = 'error'
ERROR = 'error',
AUDIOINTERRUPT = 'audioInterrupt'
}
\ No newline at end of file
... ...
... ... @@ -85,6 +85,7 @@ export class WDPlayerController {
*/
private bindState() {
this.avPlayer?.on(Events.STATE_CHANGE, async (state) => {
//console.info(TAG,`cj2024 state = ${state}`)
if (this.avPlayer == null) {
return
}
... ... @@ -179,6 +180,49 @@ export class WDPlayerController {
this.videoWidth = width
this.videoHeight = height
})
this.avPlayer?.on(Events.AUDIOINTERRUPT, async(interruptEvent: audio.InterruptEvent) => {
//https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/media/audio/audio-playback-concurrency.md#%E5%A4%84%E7%90%86%E9%9F%B3%E9%A2%91%E7%84%A6%E7%82%B9%E4%BA%8B%E4%BB%B6
if (interruptEvent.forceType === audio.InterruptForceType.INTERRUPT_FORCE) {
switch (interruptEvent.hintType) {
case audio.InterruptHint.INTERRUPT_HINT_RESUME:
await this.play()
break;
case audio.InterruptHint.INTERRUPT_HINT_PAUSE:
// 此分支表示系统已将音频流暂停(临时失去焦点),为保持状态一致,应用需切换至音频暂停状态
// 临时失去焦点:待其他音频流释放音频焦点后,本音频流会收到resume对应的音频打断事件,到时可自行继续播放
case audio.InterruptHint.INTERRUPT_HINT_STOP:
// 此分支表示系统已将音频流停止(永久失去焦点),为保持状态一致,应用需切换至音频暂停状态
// 永久失去焦点:后续不会再收到任何音频打断事件,若想恢复播放,需要用户主动触发。
// this.avPlayer?.play()
await this.pause()
break;
}
}else if (interruptEvent.forceType === audio.InterruptForceType.INTERRUPT_SHARE) {
// 共享打断类型(INTERRUPT_SHARE):应用可自主选择执行相关操作或忽略音频打断事件
switch (interruptEvent.hintType) {
case audio.InterruptHint.INTERRUPT_HINT_PAUSE:
case audio.InterruptHint.INTERRUPT_HINT_RESUME:
// 此分支表示临时失去焦点后被暂停的音频流此时可以继续播放,建议应用继续播放,切换至音频播放状态
// 若应用此时不想继续播放,可以忽略此音频打断事件,不进行处理即可
// 继续播放,此处主动执行start(),以标识符变量started记录start()的执行结果
// await audioRenderer.start().then(() => {
// started = true; // start()执行成功
// }).catch((err: BusinessError) => {
// started = false; // start()执行失败
// });
// // 若start()执行成功,则切换至音频播放状态
// if (started) {
// isPlay = true; // 此句为简化处理,代表应用切换至音频播放状态的若干操作
// } else {
// // 音频继续播放执行失败
// }
this.avPlayer?.play()
break;
default:
break;
}
}
})
}
public setXComponentController(controller: XComponentController) {
... ... @@ -271,10 +315,12 @@ export class WDPlayerController {
// if (this.avPlayer == null) {
// return
// }
//Logger.debug(TAG, "start play")
this.avPlayer?.prepare().then(() => {
this.avPlayer?.play()
}, (err: BusinessError) => {
console.error('Failed to prepare,error message is :' + err.message)
console.error(TAG,'Failed to prepare,error message is :' + err.message)
//this.avPlayer?.stop()
})
}
... ...
... ... @@ -20,7 +20,7 @@ struct MorningEveningPaperPage {
pageTransition() {
// 定义页面进入时的效果,从底侧滑入
PageTransitionEnter({ type: RouteType.Push, duration: 200 })
PageTransitionEnter({ type: RouteType.Push, duration: 300 })
.slide(SlideEffect.Bottom).onEnter((type: RouteType, progress: number) => {
if (progress >= 0.99) {
// WindowModel.shared.setWindowLayoutFullScreen(true)
... ...
... ... @@ -207,7 +207,11 @@ export struct VideoChannelPage {
top: px2vp(this.topSafeHeight)
})
.visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
.linearGradient({
colors: [
['rgba(18, 18, 18, 0.5)', 0.0], ['rgba(18, 18, 18, 0.0)', 1.0]
]
})
}
/**
... ...