wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  fix: 1)【uat】进入栏目订阅,点击电影,没有跳转到对应频道
  fix: HOST_PRODUCT
  fix(二级栏目页面):顶部适配
  fix: 18700 UI还原问题-【uat】人民号》推荐》北京专题卡,直播状态 预约、回看图标没有显示
  fix: 18698 UI还原问题-【uat】人民号》推荐》北京专题卡,标题显示不全,看图
  fix: 进入人民号-关注页,查看“赣州消防”人民号-图集卡,鸿蒙版新包未能显示图片数量,
  fix(直播详情页):非Wifi提示
  全局规则-人民号管理端关闭稿件分享开关,号主文章、视频、图集、动态稿件不应展示分享按钮
  fix: 1)适配 直播列表和预告列表页面全屏
  漏提
  fix: 17666 UI还原问题-【uat】进入新闻-健康频道,专题banner 标题字体换行间距有问题,看图
  deviceTypes修改,只保留phone,临时修改。
  fix: 17971 小视频横滑卡-上下间隙较大
  fix: 17499 UI还原问题-【uat】进入新疆频道,轮播图广告数字字体大小偏框宽和android不一致,看图
  fix: 17260 UI还原问题-【uat】乡村振兴巡礼,直播专题,图片显示样式和android不一致,看图
  fix: 17260 UI还原问题-【uat】乡村振兴巡礼,直播专题,图片显示样式和android不一致,看图
  fix:适配全面屏
  fix: 17260 UI还原问题-【uat】乡村振兴巡礼,直播专题,图片显示样式和android不一致,看图
  fix: 17056 UI还原问题--【生产环境】直播预告字体大小显示问题
Showing 41 changed files with 280 additions and 125 deletions
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
]
}
}
\ No newline at end of file
... ...
... ... @@ -11,6 +11,7 @@ export struct CustomToast {
fontSizeValue :number | string | Resource = "27lpx"
lineHeightValue :number | string | Resource = "38lpx"
controller: CustomDialogController
marginTop :number | string | Resource = 0
dismiss: () => void = () => {
}
... ... @@ -38,5 +39,6 @@ export struct CustomToast {
.padding({top:"23lpx",bottom:'23lpx',left:"35lpx",right:"35lpx"})
.backgroundColor(this.bgColor)
.opacity(this.opacityValue)
.margin({top:this.marginTop})
}
}
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true,
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true,
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true,
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true
... ...
... ... @@ -44,7 +44,7 @@ export struct CarderInteraction {
build() {
Row() {
if(this.contentDTO.shareFlag === '1'){
if(this.contentDetailData?.shareInfo?.shareOpen === 1){
Row() {
Image($r('app.media.CarderInteraction_share'))
.width(18)
... ... @@ -60,14 +60,9 @@ export struct CarderInteraction {
})
}
if(this.contentDTO.rmhInfo != null){
if(this.contentDTO.shareInfo != null && 1 == this.contentDTO.shareInfo.shareOpen && 1 == this.contentDTO.rmhInfo.cnShareControl){
if(this.contentDetailData?.openComment == 1){
this.commentLayout()
}
}else{
this.commentLayout()
}
this.builderLike()
}
.width('100%')
... ...
... ... @@ -12,7 +12,8 @@ import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed
const TAG = 'Card16Component';
interface fullColumnImgUrlItem {
url: string
url: string,
fullUrl: string
}
... ... @@ -81,16 +82,46 @@ export struct Card16Component {
.lineHeight(25)
}
if (this.contentDTO.fullColumnImgUrls?.length > 0) {
Flex() {
//三图
Stack(){
Row() {
GridRow({ gutter: 2 }) {
ForEach(this.contentDTO.fullColumnImgUrls.slice(0, 3), (item: fullColumnImgUrlItem, index: number) => {
Image(this.loadImg ? item.url : '')
if (index < 3) {
GridCol({ span: { xs: 4 } }) {
Image(this.loadImg ? item.url || item.fullUrl : '')
.backgroundColor(0xf5f5f5)
.flexBasis(113)
.height(75)
.margin({ right: index > 1 ? 0 : 2 })
.width('100%')
.aspectRatio(113 / 75)
.borderRadius({
topLeft: index === 0 ? $r('app.float.image_border_radius') : 0,
topRight: index === 2 ? $r('app.float.image_border_radius') : 0,
bottomLeft: index === 0 ? $r('app.float.image_border_radius') : 0,
bottomRight: index === 2 ? $r('app.float.image_border_radius') : 0,
})
}
}
})
}
}
.width(CommonConstants.FULL_PARENT)
.margin({ top: 8 })
CardMediaInfo({
contentDTO: this.contentDTO
})
}
.width(CommonConstants.FULL_PARENT)
.alignContent(Alignment.BottomEnd)
// Flex() {
// ForEach(this.contentDTO.fullColumnImgUrls.slice(0, 3), (item: fullColumnImgUrlItem, index: number) => {
// Image(this.loadImg ? item.url : '')
// .backgroundColor(0xf5f5f5)
// .flexBasis(113)
// .height(75)
// .margin({ right: index > 1 ? 0 : 2 })
// })
// }
}
CarderInteraction({contentDTO: this.contentDTO})
//TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
}
... ...
... ... @@ -53,7 +53,7 @@ export struct Card5Component {
}
)
.aspectRatio(343 / 225)
if (!!this.titleShowPolicy) {
if (!!this.titleShowPolicy || this.titleShowPolicy === null ) {
Row()
.borderRadius(
{
... ...
... ... @@ -273,14 +273,14 @@ struct indicatorAnimations {
if (this.isAutoPlay) {
setTimeout(() => {
this.leftW = '100%'
this.centerFontSize = 11
this.centerFontSize = 10
}, 0)
setTimeout(() => {
this.rightW = '100%'
}, 1500)
} else {
this.leftW = '100%'
this.centerFontSize = 11
this.centerFontSize = 10
this.rightW = '100%'
}
... ... @@ -307,7 +307,7 @@ struct indicatorAnimations {
Text(this.index + 1 < 10 ? `0${this.index + 1}` : `${this.index + 1}`)
.fontSize(this.centerFontSize)
.fontColor($r('app.color.white'))
.width(16)
.width(11)
.textAlign(TextAlign.Center)
.margin({
bottom: -2
... ...
... ... @@ -153,8 +153,8 @@ export struct ZhSingleRow02 {
.padding({
left: $r('app.float.card_comp_pagePadding_lf'),
// right: $r('app.float.card_comp_pagePadding_lf'),
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
top: 8,
bottom: 8
})
.backgroundColor($r('app.color.white'))
.margin({ bottom: 8 })
... ...
... ... @@ -244,6 +244,7 @@ export struct ZhSingleRow03 {
.width(154)
.height(60)
.maxLines(3)
.fontSize(15)
.textOverflow({overflow: TextOverflow.Ellipsis})
}
.margin({bottom: 16})
... ... @@ -254,8 +255,10 @@ export struct ZhSingleRow03 {
Text(this.format(new Date(item.liveInfo.liveStartTime).getTime()))
.margin({right: 6})
.fontColor(0x000000)
.fontSize(13)
.fontSize(12)
.textAlign(TextAlign.Start)
.fontFamily('PingFang SC-Semibold')
.fontWeight(600)
Image($r('app.media.timeline_rect'))
.width(4)
.height(3)
... ... @@ -263,10 +266,13 @@ export struct ZhSingleRow03 {
Text(item.liveInfo.liveStartTime.split(' ')[1].slice(0, 5))
.margin({right: 6})
.fontColor(0x000000)
.fontSize(13)
.fontSize(12)
.fontFamily('PingFang SC-Semibold')
.fontWeight(600)
Text('开始直播')
.fontColor(0xC8C8C8)
.fontSize(13)
.fontSize(12)
.fontFamily('PingFang SC-Semibold')
}
Row() {
... ...
... ... @@ -14,15 +14,16 @@ export struct LottieView {
private politeChickyController: CanvasRenderingContext2D =
new CanvasRenderingContext2D(); // CanvasRenderingContext2D对象
private animateItem: AnimationItem | null = null; // 初始化loadAnimation接口的返回对象
@Prop title: string
// 页面隐藏销毁动画
onPageHide(): void {
this.animateItem?.destroy()
if (this.onComplete) {
this.animateItem?.removeEventListener('complete', this.onComplete)
}
}
// onPageHide(): void {
// this.animateItem?.destroy()
//
// if (this.onComplete) {
// this.animateItem?.removeEventListener('complete', this.onComplete)
// }
// }
/**
* 加载动画
... ... @@ -31,7 +32,7 @@ export struct LottieView {
loadAnimation() {
// 销毁动画,减少缓存
if (this.animateItem !== null) {
this.animateItem.destroy();
this.animateItem.destroy(this.name);
this.animateItem = null;
}
... ... @@ -54,6 +55,32 @@ export struct LottieView {
}
aboutToAppear(): void {
// console.error('XXXXZZZZ', '-------aboutToAppear-------' + this.title)
//lottie?.play()
// if(this.init){
// if(this.animateItem = null){
// this.loadAnimation();
// }
// }
}
aboutToDisappear(): void {
// console.error('XXXXZZZZ', '-------aboutToDisappear-------' + this.title)
// if(this.init){
// lottie?.destroy(this.name)
//
// if (this.onComplete) {
// this.animateItem?.removeEventListener('complete', this.onComplete)
// }
// this.animateItem = null;
// // }
}
build() {
Stack({ alignContent: Alignment.TopStart }) {
Canvas(this.politeChickyController)
... ... @@ -65,9 +92,13 @@ export struct LottieView {
this.onReady(this.animateItem)
}
})
.onClick(() => {
this.animateItem?.play()
.onDisAppear(() => {
lottie.destroy(this.name)
this.animateItem = null;
}).onAppear(()=>{
this.loadAnimation();
})
}
}
}
... ...
... ... @@ -31,7 +31,7 @@ let preferenceTheme: dataPreferences.Preferences | null = null
@Component
struct LiveMorePage {
@State data: LazyDataSource<ContentDTO> = new LazyDataSource();
topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number;
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number;
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
type: number = 1;
pageSize: number = 20;
... ... @@ -46,11 +46,9 @@ struct LiveMorePage {
@State liveRoomList: LiveRoomDataBean[] = []
// 点击过的数据
@State clickDatas: Array<string> = []
@State loadImg: boolean = false;
async aboutToAppear() : Promise<void>{
async aboutToAppear(): Promise<void> {
await this.getPreferencesFromStorage()
this.loadImg = await onlyWifiLoadImg();
this.getLivMoreClickPreference()
... ... @@ -60,16 +58,9 @@ struct LiveMorePage {
}
build() {
// Navigation() {
// //滑动区域
// this.ListLayout()
// }
// .titleMode(NavigationTitleMode.Mini)
// .title('直播列表')
Column() {
this.TabbarNormal()
if (this.viewType == ViewType.LOADING) {
this.LoadingLayout()
} else if (this.viewType == ViewType.ERROR) {
... ... @@ -96,15 +87,13 @@ struct LiveMorePage {
})
}
}
.height('100%')
.padding({
left: $r('app.float.card_comp_pagePadding_lf'),
right: $r('app.float.card_comp_pagePadding_lf'),
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.margin({bottom:px2vp(this.bottomSafeHeight)})
.onClick(() => {
ProcessUtils.processPage(this.contentDTO)
top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)
})
}
@Builder
... ... @@ -133,7 +122,7 @@ struct LiveMorePage {
}
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
.cachedCount(8)
.cachedCount(3)
.height('calc(100% - 44vp)')
.onReachEnd(() => {
Logger.debug(TAG, "触底了");
... ... @@ -160,9 +149,10 @@ struct LiveMorePage {
.margin({ top: 16, bottom: 8 })
.alignSelf(ItemAlign.Start)
.fontColor(this.isClicked(item.objectId) ? $r('app.color.color_848484') : $r('app.color.color_222222'))
Stack() {
if (item.fullColumnImgUrls && item.fullColumnImgUrls.length > 0) {
Image(this.loadImg?item.fullColumnImgUrls[0].url:'')
Image(this.loadImg ? item.fullColumnImgUrls[0].url : '')
.backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5)
.width('100%')
.aspectRatio(16 / 9)
... ... @@ -246,7 +236,6 @@ struct LiveMorePage {
})
}
.height(44)
.margin({top:this.topSafeHeight+'px'})
.width('100%')
}
... ... @@ -260,24 +249,25 @@ struct LiveMorePage {
lottieHeight: 14,
autoplay: true,
loop: true,
title: item.newsTitle
})
.margin({
right: '2vp'
})
Text('直播中')
.fontSize('12vp')
.fontWeight(400)
.fontColor(Color.White)
.textShadow({ radius: 2, color: 'rgba(0,0,0,0.3)', offsetX: 0, offsetY: 2 })
.textShadow({
radius: 2,
color: 'rgba(0,0,0,0.3)',
offsetX: 0,
offsetY: 2
})
.margin({
right: '5vp'
})
// Divider()
// .vertical(true)
// .strokeWidth(1)
// .height('12vp')
// .margin({ top: 2, bottom: 2 })
// .color(Color.White)
Image($r('app.media.icon_comp_line_live')).height('11vp').width('1.5vp')
... ... @@ -285,7 +275,12 @@ struct LiveMorePage {
Text(this.getLiveRoomNumber(item))
.fontSize('12vp')
.fontWeight(400)
.textShadow({ radius: 2, color: 'rgba(0,0,0,0.3)', offsetX: 0, offsetY: 2 })
.textShadow({
radius: 2,
color: 'rgba(0,0,0,0.3)',
offsetX: 0,
offsetY: 2
})
.fontColor(Color.White)
.margin({
left: '5vp'
... ... @@ -422,7 +417,7 @@ struct LiveMorePage {
const arr: Array<string> = []
arr.push(...this.clickDatas)
preferenceTheme.put('liveMorePage', arr).then(() => {
Logger.debug(TAG,"Succeeded in putting value of 'startup'.");
Logger.debug(TAG, "Succeeded in putting value of 'startup'.");
}).catch((err: BusinessError) => {
Logger.debug(TAG, "Failed to put value of 'startup'. code =" + err.code + ", message =" + err.message);
})
... ...
... ... @@ -347,14 +347,18 @@ export struct TopNavigationComponentNew {
} else if (this.isLayoutByIndex(index)) {
ProcessUtils.gotoENewsPaper()
} else {
this.currentTopNavSelectedIndex = index
this.changePage(index)
}
}
})
}
/**
* 改变频道页
* @param index 频道所在的序列号
*/
private changePage(index: number) {
this.currentTopNavSelectedIndex = index
this.swiperController.changeIndex(index)
this.listScroller.scrollToIndex(index, true, ScrollAlign.CENTER)
}
... ...
... ... @@ -26,7 +26,9 @@ import { PeopleShipAttentionContentListTopComponent } from './PeopleShipAttentio
import { CardParser } from '../CardParser'
import { PeopleShipNoMoreData } from '../reusable/PeopleShipNoMoreData';
const TAG = 'PeopleShipMainComponent';
@Preview
/**
* 人民号 --- 关注
*/
@Component
export struct PeopleShipMainComponent {
@State private pageModel: PageModel = new PageModel();
... ... @@ -422,6 +424,7 @@ export struct PeopleShipMainComponent {
}
// 当前页面,自动刷新数据
Logger.debug(TAG, 'page onAutoRefresh ' + this.autoRefresh)
this.listScroller.scrollToIndex(0)
this.currentPage = 1
this.getData()
}
... ...
... ... @@ -31,7 +31,8 @@ const TAG: string = 'ReserveMorePage';
struct ReserveMorePage {
@State data: LazyDataSource<ContentDTO> = new LazyDataSource();
private reserveList: ReserveItemBean[] = []
topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number;
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number;
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
type: number = 2;
pageSize: number = 20;
title: string = '直播预告'
... ... @@ -78,10 +79,13 @@ struct ReserveMorePage {
this.currentPage = 1
this.getData(resolve)
},
})
}).backgroundColor($r('app.color.color_F5F5F5'))
}
}.backgroundColor($r('app.color.color_F5F5F5'))
}.height('100%').backgroundColor('#FFFFFF').padding({
top: px2vp(this.topSafeHeight),
bottom: px2vp(this.bottomSafeHeight)
})
}
... ... @@ -306,8 +310,7 @@ struct ReserveMorePage {
middle: { anchor: "__container__", align: HorizontalAlign.Center }
})
}
.height(vp2px(44) + this.topSafeHeight + 'px')
.padding({ top: this.topSafeHeight + 'px' })
.height(44)
.width('100%').backgroundColor('#FFFFFF')
}
... ...
... ... @@ -2,6 +2,7 @@ import { CommonConstants } from 'wdConstant'
import { ContentDTO, CompDTO, Action, Params } from 'wdBean'
import { ProcessUtils, WDRouterRule, WDRouterPage } from 'wdRouter';
import { InfomationCardClick } from '../../utils/infomationCardClick';
import { CardMediaInfo } from '../cardCommon/CardMediaInfo'
@Component
export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
... ... @@ -128,11 +129,18 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
Row() {
ForEach(this.compDTO.operDataList, (item: ContentDTO, index: number) => {
Column() {
Stack() {
Image(item.coverUrl)
.aspectRatio(1.5)
.width(this.compDTO.operDataList.length == 2 ? 210 : 150)
.borderRadius(4)
.objectFit(ImageFit.Cover)
CardMediaInfo({
livePeopleNum:false,
contentDTO: item
})
}
.align(Alignment.BottomEnd)
Text(item.newsTitle)
.fontSize($r("app.float.font_size_14"))
... ... @@ -142,11 +150,10 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
.textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
.textAlign(TextAlign.Start)
.margin({ top: 8 })
.width(150)
.lineHeight(19)
.height(42)
.width(this.compDTO.operDataList.length == 2 ? 210 : 150)
.lineHeight(21)
}
.height(this.compDTO.operDataList.length == 2 ? 190 : 150)
.padding({ right: 16 })
// .offset({x:16})
.onClick(() => {
... ... @@ -218,7 +225,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
left: $r('app.float.card_comp_pagePadding_lf'),
right: $r('app.float.card_comp_pagePadding_lf'),
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
bottom: 6
})
.backgroundColor($r("app.color.white"))
// .backgroundColor($r("app.color.color_FE4B05"))
... ...
... ... @@ -146,16 +146,18 @@ export struct LiveHorizontalCardComponent {
Column() {
Stack({ alignContent: Alignment.BottomEnd }) {
Image(this.loadImg ? item.coverUrl : '')
.backgroundColor(0xf5f5f5)
.backgroundColor(this.loadImg ? 0xffffff : 0xf5f5f5)
.aspectRatio(16 / 9)
.width(this.compDTO.operDataList.length == 2 ? 210 : 150)
.borderRadius(4)
.objectFit(ImageFit.Cover)
// .borderRadius(4)
.objectFit(ImageFit.Contain)
CardMediaInfo({
livePeopleNum:false,
contentDTO: item
})
}
.borderRadius(4)
.border({width: 1, color: 0xf5f5f5})
Text(item.newsTitle)
.fontSize($r("app.float.font_size_14"))
... ... @@ -168,7 +170,7 @@ export struct LiveHorizontalCardComponent {
.width(this.compDTO.operDataList.length == 2 ? 210 : 150)
.lineHeight(21)
}
.height(134)
.height(this.compDTO.operDataList.length == 2 ? 190 : 150)
.padding({ right: 16 })
.onClick(() => {
InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
... ... @@ -241,7 +243,7 @@ export struct LiveHorizontalCardComponent {
left: $r('app.float.card_comp_pagePadding_lf'),
right: $r('app.float.card_comp_pagePadding_lf'),
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
bottom: 6
})
.backgroundColor($r("app.color.white"))
}
... ...
... ... @@ -156,6 +156,7 @@ export struct OperRowListView {
this.likeBean['contentRelId'] = this.contentDetailData?.reLInfo?.relId + ''
}
console.info(TAG, 'contentDetailData----', JSON.stringify(this.contentDetailData))
console.info(TAG, 'this.contentDetailData.shareInfo.shareOpen', JSON.stringify(this.contentDetailData.shareInfo.shareOpen))
console.info(TAG, 'likeBean----', JSON.stringify(this.likeBean))
console.info(TAG, 'this.operationButtonList', JSON.stringify(this.operationButtonList))
... ... @@ -384,6 +385,7 @@ export struct OperRowListView {
*/
@Builder
builderShare() {
if(this.contentDetailData?.shareInfo?.shareOpen == 1) {
Column() {
Image(this.styleType == 1 ? $r('app.media.iv_live_comment_share') :
$r('app.media.iv_live_comment_share_white'))
... ... @@ -401,6 +403,7 @@ export struct OperRowListView {
.borderRadius(18)
.backgroundColor(this.pageComponentType === 2 ? '#4D000000' : Color.Transparent)
}
}
handleStyle() {
if (this.styleType == 1) {
... ...
... ... @@ -26,6 +26,8 @@ struct SearchCreatorPage {
@State isLoading: boolean = false
@State hasMore: boolean = true
curPageNum: number = 1;
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
onPageShow() {
this.keyword = this.params?.pageID;
... ... @@ -154,6 +156,7 @@ struct SearchCreatorPage {
}
build() {
Column(){
Column() {
CustomTitleUI({ titleName: "全部结果" })
Divider()
... ... @@ -200,5 +203,10 @@ struct SearchCreatorPage {
}
.width('100%')
.height('100%')
}.width("100%")
.height("100%")
.backgroundColor($r('app.color.color_transparent'))
.padding({top:px2vp(this.topSafeHeight)})
}
}
\ No newline at end of file
... ...
... ... @@ -15,4 +15,18 @@ async function onlyWifiLoadImg(): Promise<boolean> {
return false
}
export { onlyWifiLoadImg }
\ No newline at end of file
async function onlyWifiLoadVideo(): Promise<boolean> {
let loadImageOnlyWifiSwitch = await SPHelper.default.get(SpConstants.SETTING_WIFI_VIDEO_SWITCH, '') || false;
if (!loadImageOnlyWifiSwitch) {
// 开关没开,直接让加载视频
return true
}
let netWorkStatus = NetworkUtil.getNetworkType();
// 开关打开,wifi下才加载视频
if (netWorkStatus === NetworkUtil.TYPE_WIFI) {
return true
}
return false
}
export { onlyWifiLoadImg,onlyWifiLoadVideo }
\ No newline at end of file
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true,
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true,
... ...
... ... @@ -4,12 +4,13 @@ import { TabComponent } from '../widgets/details/TabComponent';
import { TopPlayComponent } from '../widgets/details/video/TopPlayComponet';
import { DisplayDirection } from 'wdConstant/Index';
import mediaquery from '@ohos.mediaquery';
import { Logger, WindowModel } from 'wdKit/Index';
import { CustomToast, Logger, WindowModel } from 'wdKit/Index';
import { router, window } from '@kit.ArkUI';
import { WDAliPlayerController } from 'wdPlayer/Index';
import { LiveOperRowListView } from 'wdComponent';
import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel';
import { TrackConstants, TrackingContent, TrackParamConvert } from 'wdTracking/Index';
import { onlyWifiLoadVideo } from 'wdComponent/src/main/ets/utils/lazyloadImg';
let TAG: string = 'DetailPlayLivePage';
... ... @@ -41,7 +42,28 @@ export struct DetailPlayLivePage {
// 顶部状态栏高度
@Consume topSafeHeight: number
aboutToAppear(): void {
@State toastText: ResourceStr = "这是一个非Wi-Fi环境。请注意流量消耗"
dialogToast: CustomDialogController = new CustomDialogController({
builder: CustomToast({
bgColor: 0xB3000000,
opacityValue: 1,
fontSizeValue: "25lpx",
lineHeightValue: "36lpx",
msg: this.toastText,
marginTop:211/2+px2vp(this.topSafeHeight)-px2vp(84/2)
}),
autoCancel: false,
alignment: DialogAlignment.Top,
customStyle: true,
maskColor: "#00000000"
})
showToastTip(msg: ResourceStr) {
this.toastText = msg
this.dialogToast.open()
}
async aboutToAppear(): Promise<void> {
Logger.info(TAG, `wyj-aboutToAppear`)
this.listener?.on("change", (mediaQueryResult) => {
... ... @@ -56,6 +78,9 @@ export struct DetailPlayLivePage {
this.getLiveDetails()
this.getLiveRoomData()
if(!await onlyWifiLoadVideo()){
this.showToastTip(this.toastText)
}
}
async aboutToDisappear() {
... ... @@ -115,7 +140,6 @@ export struct DetailPlayLivePage {
}
.height('100%')
.width('100%')
}
onPageShowCus(): void {
... ...
import { ContentDetailDTO, LiveRoomDataBean } from 'wdBean/Index';
import { LiveViewModel } from '../viewModel/LiveViewModel';
import { WindowModel } from 'wdKit/Index';
import { CustomToast, WindowModel } from 'wdKit/Index';
import { PlayerComponent } from '../widgets/vertical/PlayerComponent';
import { PlayerInfoComponent } from '../widgets/vertical/PlayerInfoComponent';
import { WDAliPlayerController } from 'wdPlayer/Index';
... ... @@ -9,6 +9,7 @@ import { LiveEmptyComponent, WDLiveViewDefaultType } from 'wdComponent/Index';
import { PlayerEndView } from '../widgets/vertical/PlayerEndView';
import { TrackConstants, TrackingButton } from 'wdTracking/Index';
import { LiveDetailPageLogic } from '../viewModel/LiveDetailPageLogic';
import { onlyWifiLoadVideo } from 'wdComponent/src/main/ets/utils/lazyloadImg';
const storage = LocalStorage.getShared();
const TAG = 'DetailPlayVLivePage'
... ... @@ -40,11 +41,32 @@ export struct DetailPlayVLivePage {
//播放错误
@State isPlayerError: boolean = false
@State isCanplay: boolean = false
@State toastText: ResourceStr = "这是一个非Wi-Fi环境。请注意流量消耗"
dialogToast: CustomDialogController = new CustomDialogController({
builder: CustomToast({
bgColor: 0xB3000000,
opacityValue: 1,
fontSizeValue: "25lpx",
lineHeightValue: "36lpx",
msg: this.toastText,
}),
autoCancel: false,
alignment: DialogAlignment.Center,
customStyle: true,
maskColor: "#00000000"
})
showToastTip(msg: ResourceStr) {
this.toastText = msg
this.dialogToast.open()
}
aboutToAppear(): void {
async aboutToAppear(): Promise<void> {
this.openFullScreen()
this.getLiveRoomData()
if(!await onlyWifiLoadVideo()){
this.showToastTip(this.toastText)
}
}
aboutToDisappear(): void {
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true,
... ...
... ... @@ -208,13 +208,17 @@ export struct PlayerRightView {
build() {
Column() {
this.userBuilderView()
if (this.contentDetailData?.openLikes == 1) {
this.likeBuilderView()
}
this.collectBuilderView()
if (this.contentDetailData.openComment == 1) {
if (this.contentDetailData?.openComment == 1) {
this.commentBuilderView()
}
if(this.contentDetailData?.shareInfo?.shareOpen == 1) {
this.shareBuilderView()
}
}
// .backgroundColor(Color.Blue)
// .height('100%')
.width(58)
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true,
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true,
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true,
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true,
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true,
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true,
... ...
... ... @@ -5,8 +5,8 @@
"description": "$string:shared_desc",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true,
... ...
... ... @@ -17,7 +17,7 @@ export struct ColumnPage {
pageId: string = "";
channelId: string = "";
pageName: string = ''
@Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
aboutToAppear() {
this.pageId = this.param.pageId
this.channelId = this.param.channelId
... ... @@ -26,6 +26,7 @@ export struct ColumnPage {
build() {
Column() {
Blank().height(`${this.topSafeHeight}px`)
CustomTitleUI({ titleName: this.pageName })
PageComponent({
currentTopNavSelectedIndex: $currentTopNavSelectedIndex,
... ...
... ... @@ -6,8 +6,8 @@
"mainElement": "EntryAbility",
"deviceTypes": [
"phone",
"tablet",
"2in1"
// "tablet",
// "2in1"
],
"compressNativeLibs": true,
"deliveryWithInstall": true,
... ...