liyubing

Merge remote-tracking branch 'origin/main'

... ... @@ -68,8 +68,8 @@ export struct MorningEveningPaperComponent {
@Provide progressVal: number = 0;
@State mixedBgColor: string = ''
// 顶部安全高度赋值
@State topSafeHeight: number = 0;
@State bottomSafeHeight: number = 0;
@State topSafeHeight: number = px2vp(AppStorage.get<number>('topSafeHeight') || 0)
@State bottomSafeHeight: number = px2vp(AppStorage.get<number>('bottomSafeHeight') || 0)
@State isHasTopView: boolean = false;
@State scrollOffset: number = 0
@State currentStatus: number | string |undefined = 0;
... ... @@ -121,11 +121,11 @@ export struct MorningEveningPaperComponent {
}
async aboutToAppear() {
let windowHight: window.Window = await window.getLastWindow(getContext(this));
// let windowHight: window.Window = await window.getLastWindow(getContext(this));
// await windowHight.setWindowLayoutFullScreen(true);
// WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height)
this.bottomSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height)
// this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height)
// this.bottomSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height)
const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String
console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId)
... ... @@ -331,13 +331,14 @@ export struct MorningEveningPaperComponent {
.height('100%')
.objectFit(ImageFit.Contain)
Image($r('app.media.icon_listen'))
.width(24)
.height(24)
.margin({ left: 10 })
.width(20)
.height(20)
.margin({ left: 20 })
.alignSelf(ItemAlign.Start)
Text(`${this.pageInfoBean.topicInfo?.topicPattern === 1 ? '早上好' : this.pageInfoBean.topicInfo?.topicPattern === 2 ? '中午好' : '晚上好'}, 请收听今日新闻播报`)
.fontSize(14)
.fontWeight(FontWeight.Medium)
.margin({ left: 50 })
.fontColor(Color.Black)
.maxLines(1)
... ...
... ... @@ -33,9 +33,9 @@ export struct ZhSingleColumn09 {
try {
const contentDTO = this.compDTO.operDataList[0];
const extParams: ParamType = {
'value': type === 'close_interest_card_click' ? 'closeInterestCard' : 'selectInterestCard',
'action': type === 'close_interest_card_click' ? 'closeInterestCard' : 'selectInterestCard',
'duration': 0,
'action': 'detailPageShow',
// 'action': 'detailPageShow',
'shareChannel': '',
'contentName': '兴趣选项卡',
'contentType': this.compDTO.objectType || '',
... ...
... ... @@ -346,7 +346,9 @@ export struct SearchResultContentComponent {
}.offset({ left: this.listLeft })
ListItem(){
if (this.data_rmh.length === 10){
this.itemEnd()
}
}.height('100%')
.margin({left:'23lpx'})
}
... ... @@ -375,6 +377,8 @@ export struct SearchResultContentComponent {
console.info(TAG,'Pan start')
})
.onActionUpdate((event: GestureEvent) => {
///小于10个不展示滑动
if (this.data_rmh.length < 10) return;
if (event && this.isEnd) {
// console.log('event.offsetX',event.offsetX)
this.listLeft = event.offsetX < -60 ? -60 : event.offsetX > 0 ? 0 : event.offsetX
... ... @@ -384,6 +388,7 @@ export struct SearchResultContentComponent {
}
})
.onActionEnd((event: GestureEvent) => {
if (this.data_rmh.length < 10) return;
console.info(TAG,'Pan end')
this.listLeft = 0
// this.moreWidth = 20
... ...
... ... @@ -15,6 +15,7 @@ import { DisplayDirection } from 'wdConstant/Index';
import { window } from '@kit.ArkUI';
import { EmptyComponent, WDViewDefaultType } from 'wdComponent/Index';
import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index';
import { LottieView } from 'wdComponent/Index'
interface loadMoreData {
pageNum: number;
... ... @@ -24,6 +25,7 @@ interface loadMoreData {
const TAG = 'VideoChannelDetail'
const storage = LocalStorage.getShared();
PersistentStorage.persistProp('GestureLoadStrategy', 0); // 点播视频手势动画0为用户首次进入视频点播,1为用户已进入视频点播
@Entry(storage)
@Component
... ... @@ -66,6 +68,7 @@ export struct VideoChannelDetail {
pageHideTime: number = 0;
@Provide onlyWifiLoadVideo: boolean = false
@Provide toastTextVisible: boolean = false
@StorageLink('GestureLoadStrategy') GestureLoadStrategy: number = 0
autoRefreshChange() {
if (this.topNavIndex === 0 && !this.isRequesting) {
... ... @@ -277,7 +280,7 @@ export struct VideoChannelDetail {
}
build() {
Column() {
Stack({ alignContent: Alignment.Center }) {
if (this.isRequestError) {
EmptyComponent({
emptyType: WDViewDefaultType.WDViewDefaultType_NoVideo,
... ... @@ -289,6 +292,7 @@ export struct VideoChannelDetail {
PictureLoading()
.visibility(this.isMouted ? Visibility.None : Visibility.Visible)
Swiper(this.swiperController) {
ForEach(this.data, (item: ContentDetailDTO, index: number) => {
DetailPlayShortVideoPage({
... ... @@ -319,6 +323,29 @@ export struct VideoChannelDetail {
this.getRecCompInfo()
}
})
// 作为手势动画的背景
Row() {}
.justifyContent(FlexAlign.Center)
.width('100%')
.height('100%')
.visibility(this.isMouted && this.GestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden)
.backgroundColor('rgba(0, 0, 0, 0.50)')
.onTouch(() => {
this.GestureLoadStrategy = 1
})
// 手势动画 初次进入显示
LottieView({
name: 'slider_up_view_more',
path: "lottie/slider_up_view_more.json",
lottieWidth: 167,
lottieHeight: 167,
autoplay: true,
loop: true
})
.visibility(this.isMouted && this.GestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden)
.onTouch(() => {
this.GestureLoadStrategy = 1
})
}
}
... ...
... ... @@ -51,7 +51,6 @@ export struct PlayerTitleView {
/**
* 截断文本
* @author liuzhendong(猩猩G)
* @param {string} str 要截断的文本 '啊啊啊啊啊'
* @param {number} fontSize 字体大小(px)
* @param {number} maxLines 最大行数 3
... ...