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:  【生产】直播频道,直播预约卡,直播稿件封面图应为圆角
  fix: 单图卡-图片与上下分割线间距不一致,下分割线间距较大。
  fix |> 回复框几直播预告卡UI样式修改
  fix: 注释log
  19969 【生产】在版面页面,右下角切换至14版后,点击读报纸后,不能定位到14版
  fix: 修改版本号,替换logo
  fix: 【UI走查-卡片】折叠屏展开-图集卡
... ... @@ -2,8 +2,8 @@
"app": {
"bundleName": "com.peopledailychina.hosactivity",
"vendor": "$string:app_vendor",
"versionCode": 7394,
"versionName": "7.3.9.4",
"versionCode": 7395,
"versionName": "7.3.9.5",
"icon": "$media:app_icon",
"label": "$string:app_name"
}
... ...
{
"ruleSet": [
"plugin:@performance/all"
]
}
\ No newline at end of file
... ...
... ... @@ -211,16 +211,16 @@ export struct CompParser {
this.compDTO.compStyle === CompStyle.Zh_Single_Row_06
) {
if (this.compDTO.compStyle === this.nextCompDTO.compStyle) {
Divider().strokeWidth(1).color('#f5f5f5').width('103%').padding({ left: 16, right: 16 }).margin({left: -6})
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
} else {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
}
} else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
Divider().strokeWidth(1).color('#f5f5f5').width('103%').padding({ left: 16, right: 16 }).margin({left: -6})
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
} else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
// 大专题
if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) {
Divider().strokeWidth(1).color('#f5f5f5').width('103%').padding({ left: 16, right: 16 }).margin({left: -6})
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
} else {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
}
... ... @@ -234,7 +234,8 @@ export struct CompParser {
) {
Divider().strokeWidth(5).color('#f5f5f5').width('120%').margin({left: -6})
} else {
Divider().strokeWidth(1).color('#f5f5f5').width('103%').padding({ left: 16, right: 16 }).margin({left: -6,top:8})
// Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 }).margin({top:8})
Divider().strokeWidth(1).color('#f5f5f5').width(CommonConstants.FULL_WIDTH).padding({ left: 10, right: 10 })
}
} else {
// Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
... ...
... ... @@ -9,6 +9,7 @@ import { persistentStorage, hasClicked } from '../../utils/persistentStorage';
import { InfomationCardClick } from '../../utils/infomationCardClick'
import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed';
import router from '@ohos.router'
import { CompUtils } from '../../utils/CompUtils';
const TAG = 'Card17Component';
... ... @@ -57,7 +58,7 @@ export struct Card17Component {
}
}
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontSize($r('app.float.font_size_17'))
.fontSize(18)
.fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222'))
.lineHeight(25)
.maxLines(3)
... ... @@ -71,7 +72,7 @@ export struct Card17Component {
this.contentDTO.fullColumnImgUrls.length > 0 ? this.contentDTO.fullColumnImgUrls[0].url || this.contentDTO.fullColumnImgUrls[0].fullUrl : '' : '')
.backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
.width(CommonConstants.FULL_WIDTH)
.height(160)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9)
.aspectRatio(CompUtils.ASPECT_RATIO_3_2)
.borderRadius({
topLeft: $r('app.float.image_border_radius'),
bottomLeft: $r('app.float.image_border_radius'),
... ... @@ -83,7 +84,7 @@ export struct Card17Component {
this.contentDTO.fullColumnImgUrls.length > 1 ? this.contentDTO.fullColumnImgUrls[1].url || this.contentDTO.fullColumnImgUrls[1].fullUrl : '' : '')
.backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
.width(CommonConstants.FULL_WIDTH)
.height(79)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9)
.aspectRatio(CompUtils.ASPECT_RATIO_3_2)
.margin({ bottom: 1 })
.borderRadius({
topRight: $r('app.float.image_border_radius'),
... ... @@ -100,7 +101,7 @@ export struct Card17Component {
this.contentDTO.fullColumnImgUrls.length > 2 ? this.contentDTO.fullColumnImgUrls[2].url || this.contentDTO.fullColumnImgUrls[2].fullUrl : '' : '')
.backgroundColor(this.loadImg ? '#f5f5f5' : 0xf5f5f5)
.width(CommonConstants.FULL_WIDTH)
.height(79)// .aspectRatio(CompUtils.ASPECT_RATIO_16_9)
.aspectRatio(CompUtils.ASPECT_RATIO_3_2)
.margin({ top: 1 })
.borderRadius({
bottomRight: $r('app.float.image_border_radius'),
... ... @@ -132,13 +133,13 @@ export struct Card17Component {
})
// 评论等信息
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO, viewShowData: false })
}
.padding({
left: 10,
right: 10,
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
top: 14,
bottom: 14
})
.backgroundColor(0xffffff)
.width(CommonConstants.FULL_WIDTH)
... ...
... ... @@ -456,7 +456,7 @@ struct ChildCommentItem {
if (this.item.id && this.item.checkStatus == '2') { // 审核通过的才显示回复
this.publishCommentModel.rootCommentId = this.item.rootCommentId
this.publishCommentModel.parentId = this.item.id
this.publishCommentModel.placeHolderText = '回复' + this.item.fromUserName + ':'
this.publishCommentModel.placeHolderText = '回复 ' + this.item.fromUserName + ':'
if (this.dialogController != null) {
this.dialogController.open()
}
... ... @@ -668,7 +668,7 @@ struct commentHeaderView {
if (this.item.id && this.item.checkStatus == '2') { // 审核通过的才显示回复
this.publishCommentModel.rootCommentId = this.item.rootCommentId
this.publishCommentModel.parentId = this.item.id
this.publishCommentModel.placeHolderText = '回复' + this.item.fromUserName + ':'
this.publishCommentModel.placeHolderText = '回复 ' + this.item.fromUserName + ':'
if (this.dialogController != null) {
this.dialogController.open()
}
... ... @@ -745,7 +745,7 @@ struct commentFooterView {
if (this.item.id && this.item.checkStatus == '2') { // 审核通过的才显示回复
this.publishCommentModel.rootCommentId = this.item.rootCommentId
this.publishCommentModel.parentId = this.item.id
this.publishCommentModel.placeHolderText = '回复' + this.item.fromUserName + ':'
this.publishCommentModel.placeHolderText = '回复 ' + this.item.fromUserName + ':'
if (this.dialogController != null) {
this.dialogController.open()
}
... ...
... ... @@ -13,7 +13,7 @@ import { ParamType, Tracking } from 'wdTracking/Index';
/**
* 直播预约卡
* Zh_Single_Row-02
* Zh_Single_Row-03
*/
const TAG = 'Zh_Single_Row-03'
... ... @@ -261,11 +261,15 @@ export struct ZhSingleRow03 {
Column() {
Row() {
Image(this.loadImg ? item.coverUrl : '')
.width(106)
.height(60)
.margin({right: 12})
.backgroundColor(0xf5f5f5)
.margin({right: 12})
.borderRadius(3)
.aspectRatio(106 / 60)
.height(60)
.border({
width: 0.7,
color: '#EDEDED',
})
Text(item.newsTitle)
.width(154)
... ... @@ -273,6 +277,7 @@ export struct ZhSingleRow03 {
.maxLines(3)
.fontSize(15)
.textOverflow({overflow: TextOverflow.Ellipsis})
.margin({left: 12})
}
.margin({bottom: 16})
... ... @@ -348,6 +353,7 @@ export struct ZhSingleRow03 {
.padding({top: 12, bottom: 12, left: 12, right: 12})
.backgroundColor(0xf9f9f9)
.margin({right: 8})
.borderRadius(4)
.onClick(() => {
InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
ProcessUtils.processPage(item)
... ... @@ -356,16 +362,21 @@ export struct ZhSingleRow03 {
Column() {
Row() {
Image(this.loadImg ? item.coverUrl : '')
.width(106)
.height(60)
.backgroundColor(0xf5f5f5)
.margin({right: 12})
.borderRadius(3)
.aspectRatio(106 / 60)
.height(60)
.border({
width: 0.7,
color: '#EDEDED',
})
Text(item.newsTitle)
.width(201)
.height(60)
.maxLines(3)
.textOverflow({overflow: TextOverflow.Ellipsis})
.margin({left: 12})
}
.margin({bottom: 16})
.justifyContent(FlexAlign.Start)
... ... @@ -415,6 +426,7 @@ export struct ZhSingleRow03 {
.padding({top: 12, bottom: 12, left: 12, right: 12})
.backgroundColor(0xf9f9f9)
.margin({right: 8})
.borderRadius(4)
.onClick(() => {
InfomationCardClick.track(this.compDTO, item, this.pageId, this.pageName)
ProcessUtils.processPage(item)
... ...
... ... @@ -49,7 +49,7 @@ export struct ENewspaperListDialog {
private deviceHeight: number = 0
selectPageNum : boolean = true
selectPageNum : boolean = false
//watch监听报纸页码回调
onCurrentPageNumUpdated(): void {
... ...
... ... @@ -11,6 +11,7 @@ export class CompUtils {
public static readonly ASPECT_RATIO_1_1: number = 1;
public static readonly ASPECT_RATIO_2_1: number = 2;
public static readonly ASPECT_RATIO_3_4: number = 3 / 4;
public static readonly ASPECT_RATIO_3_2: number = 3 / 2;
public static readonly ASPECT_RATIO_16_9: number = 16 / 9;
public static readonly ASPECT_RATIO_75_45: number = 75 / 45; // 角标宽高比
/**
... ...
... ... @@ -24,16 +24,16 @@ export class AudioSuspensionModel {
*/
private initPlayerController() {
if(this.playerController === undefined) {
Logger.info(TAG, 'playerController undefined')
// Logger.info(TAG, 'playerController undefined')
AppStorage.setOrCreate('playerController', new WDPlayerController({loop: false}));
this.playerController = AppStorage.link<WDPlayerController>('playerController')
Logger.info(TAG, 'playerController create success')
// Logger.info(TAG, 'playerController create success')
this.playerController.get().onStatusChange = (status: number) => {
console.info(TAG, 'this.currentStatus Model', status)
// console.info(TAG, 'this.currentStatus Model', status)
EmitterUtils.sendEvent(EmitterEventId.AUDIO_CHANGE_STATUS, status)
}
} else {
Logger.info(TAG, 'playerController already exit')
// Logger.info(TAG, 'playerController already exit')
}
}
/**
... ... @@ -52,7 +52,7 @@ export class AudioSuspensionModel {
if (this.url === url) {
this.isMinimize = AppStorage.link<boolean>('isMinimize')
console.log(TAG, 'this.isMinimize', this.isMinimize?.get())
// console.log(TAG, 'this.isMinimize', this.isMinimize?.get())
if (this.isMinimize?.get()) {
EmitterUtils.sendEvent(EmitterEventId.AUDIO_WINDOW_EXPAND, 1)
AppStorage.setOrCreate('isMinimize', false);
... ... @@ -78,19 +78,19 @@ export class AudioSuspensionModel {
this.floatWindowClass.get().isShowing((err: BusinessError, data) => {
const errCode: number = err.code;
if (errCode) {
console.error(TAG, 'Failed window is showing Cause:' + JSON.stringify(err));
// console.error(TAG, 'Failed window is showing Cause:' + JSON.stringify(err));
return;
}
console.info(TAG, 'window is showing: ' + JSON.stringify(data));
// console.info(TAG, 'window is showing: ' + JSON.stringify(data));
if(data === false) {
// 显示当前窗口,使用callback异步回调。
this.floatWindowClass.get().showWindow((err: BusinessError) => {
let errCode: number = err.code;
if (errCode) {
console.error(TAG, 'floatWindowClass Failed to show the window. Cause: ' + JSON.stringify(err));
// console.error(TAG, 'floatWindowClass Failed to show the window. Cause: ' + JSON.stringify(err));
return;
}
console.info(TAG, 'floatWindowClass Succeeded in showing the window.');
// console.info(TAG, 'floatWindowClass Succeeded in showing the window.');
});
}
});
... ... @@ -101,10 +101,10 @@ export class AudioSuspensionModel {
this.floatWindowClass.get().resize(width, height, (err: BusinessError) => {
let errCode: number = err.code;
if (errCode) {
console.error(TAG, 'floatWindowClass Failed to change the window size. Cause:' + JSON.stringify(err));
// console.error(TAG, 'floatWindowClass Failed to change the window size. Cause:' + JSON.stringify(err));
return;
}
console.info(TAG, 'floatWindowClass Succeeded in changing the window size.');
// console.info(TAG, 'floatWindowClass Succeeded in changing the window size.');
});
}
... ... @@ -113,11 +113,11 @@ export class AudioSuspensionModel {
this.floatWindowClass.get().minimize((err: BusinessError) => {
const errCode: number = err.code;
if (errCode) {
console.error(TAG, 'Failed to minimize the window. Cause: ' + JSON.stringify(err));
// console.error(TAG, 'Failed to minimize the window. Cause: ' + JSON.stringify(err));
return;
}
AppStorage.setOrCreate('isMinimize', true);
console.info(TAG, 'Succeeded in minimizing the window.');
// console.info(TAG, 'Succeeded in minimizing the window.');
});
}
... ...
... ... @@ -64,7 +64,7 @@ export struct DetailVideoListPage {
await this.getContentDetail(this.contentId, this.relId, this.relType)
}
await this.queryVideoList()
console.log(TAG, 'aboutToAppear', JSON.stringify(action.params))
// console.log(TAG, 'aboutToAppear', JSON.stringify(action.params))
} else {
// 无网络
... ... @@ -77,13 +77,13 @@ export struct DetailVideoListPage {
}
aboutToDisappear(): void {
console.log(TAG, 'aboutToDisappear')
// console.log(TAG, 'aboutToDisappear')
this.closeFullScreen()
}
// page show/hide只能在外层组件触发
onPageShow(): void {
console.log(TAG, 'onPageShow')
// console.log(TAG, 'onPageShow')
this.pageShow = Math.random()
this.switchVideoStatus = true
this.openFullScreen()
... ... @@ -94,10 +94,10 @@ export struct DetailVideoListPage {
this.AudioSuspension.floatWindowClass.get().isShowing((err: BusinessError, data) => {
const errCode: number = err.code;
if (errCode) {
console.error(TAG, 'Failed window is showing Cause:' + JSON.stringify(err));
// console.error(TAG, 'Failed window is showing Cause:' + JSON.stringify(err));
return;
}
console.info(TAG, 'window is showing: ' + JSON.stringify(data));
// console.info(TAG, 'window is showing: ' + JSON.stringify(data));
if(data) {
this.isShowAudioCom = true
this.AudioSuspension.playerController.get()?.pause();
... ... @@ -107,7 +107,7 @@ export struct DetailVideoListPage {
}
onPageHide(): void {
console.log(TAG, 'onPageHide')
// console.log(TAG, 'onPageHide')
this.switchVideoStatus = false
this.closeFullScreen()
... ... @@ -116,7 +116,7 @@ export struct DetailVideoListPage {
duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,duration)
console.info(TAG, 'this.isShowAudioCom: ' + this.isShowAudioCom);
// console.info(TAG, 'this.isShowAudioCom: ' + this.isShowAudioCom);
if (this.isShowAudioCom) {
this.AudioSuspension.showWindow()
this.isShowAudioCom = false
... ... @@ -170,7 +170,7 @@ export struct DetailVideoListPage {
relId: relId,
relType: relType
}).then(async (resDTO: ResponseDTO<ContentDetailDTO[]>) => {
console.log(TAG, 'getContentDetail:', JSON.stringify(resDTO.data))
// console.log(TAG, 'getContentDetail:', JSON.stringify(resDTO.data))
this.isOffLine = resDTO.data == null ? true : false
if (resDTO.data) {
const params: contentListParams = {
... ... @@ -184,7 +184,7 @@ export struct DetailVideoListPage {
if (res.data) {
this.interactDataList = this.interactDataList.concat(res.data)
}
console.log('获取互动点赞等数据===', JSON.stringify(res))
// console.log('获取互动点赞等数据===', JSON.stringify(res))
})
this.data.push(resDTO.data[0])
}
... ... @@ -202,7 +202,7 @@ export struct DetailVideoListPage {
if (res.data) {
await this.getContentInteract(res.data)
this.data = this.data.concat(res.data)
console.log('视频列表===', JSON.stringify(res.data))
// console.log('视频列表===', JSON.stringify(res.data))
}
})
}
... ... @@ -226,7 +226,7 @@ export struct DetailVideoListPage {
if (res.data) {
this.interactDataList = this.interactDataList.concat(res.data)
}
console.log('获取互动点赞等数据===', JSON.stringify(res))
// console.log('获取互动点赞等数据===', JSON.stringify(res))
})
}
}
... ...
... ... @@ -66,43 +66,43 @@ export default class EntryAbility extends UIAbility {
//../../../../../../features/wdLogin/src/main/ets/pages/launchPage/LaunchPage
windowStage.loadContent('pages/launchPage/LaunchPage', (err, data) => {
if (err.code) {
Logger.error(TAG, 'Failed to load the content. Cause: ' + JSON.stringify(err) ?? '');
// Logger.error(TAG, 'Failed to load the content. Cause: ' + JSON.stringify(err) ?? '');
return;
}
Logger.info(TAG, 'Succeeded in loading the content. Data: ' + JSON.stringify(data) ?? '');
// Logger.info(TAG, 'Succeeded in loading the content. Data: ' + JSON.stringify(data) ?? '');
});
// 1.创建悬浮窗
windowStage.createSubWindow('subWindow', (err: BusinessError, data) => {
let errCode: number = err.code;
if (errCode) {
Logger.error('floatWindowClass Failed to create the subwindow. Cause: ' + JSON.stringify(err));
// Logger.error('floatWindowClass Failed to create the subwindow. Cause: ' + JSON.stringify(err));
return;
}
Logger.info('floatWindowClass Succeeded in creating the subwindow. Data: ' + JSON.stringify(data));
// Logger.info('floatWindowClass Succeeded in creating the subwindow. Data: ' + JSON.stringify(data));
floatWindowClass = data;
AppStorage.setOrCreate('floatWindowClass', floatWindowClass);
// 2.悬浮窗窗口创建成功后,设置悬浮窗的位置、大小及相关属性等。
floatWindowClass.moveWindowTo(initMoveX, initMoveY, (err: BusinessError) => {
let errCode: number = err.code;
if (errCode) {
Logger.error('floatWindowClass Failed to move the window. Cause:' + JSON.stringify(err));
// Logger.error('floatWindowClass Failed to move the window. Cause:' + JSON.stringify(err));
return;
}
Logger.info('floatWindowClass Succeeded in moving the window.');
// Logger.info('floatWindowClass Succeeded in moving the window.');
});
// 3.为悬浮窗加载对应的目标页面。
floatWindowClass.setUIContent("pages/view/AudioComponent", (err: BusinessError) => {
let errCode: number = err.code;
if (errCode) {
Logger.error('floatWindowClass Failed to load the content. Cause:' + JSON.stringify(err));
// Logger.error('floatWindowClass Failed to load the content. Cause:' + JSON.stringify(err));
return;
}
Logger.info('floatWindowClass Succeeded in loading the content.');
// Logger.info('floatWindowClass Succeeded in loading the content.');
let color: string = 'rgba(0,0,0,0)';
try {
(floatWindowClass as window.Window).setWindowBackgroundColor(color);
} catch (exception) {
Logger.error('Failed to set the background color. Cause: ' + JSON.stringify(exception));
// Logger.error('Failed to set the background color. Cause: ' + JSON.stringify(exception));
}
;
});
... ... @@ -110,14 +110,14 @@ export default class EntryAbility extends UIAbility {
floatWindowClass.setWindowFocusable(false, (err: BusinessError) => {
const errCode: number = err.code;
if (errCode) {
console.error(`Failed to set the window to be focusable. Cause code: ${err.code}, message: ${err.message}`);
// console.error(`Failed to set the window to be focusable. Cause code: ${err.code}, message: ${err.message}`);
return;
}
console.info('Succeeded in setting the window to be focusable.');
// console.info('Succeeded in setting the window to be focusable.');
});
floatWindowClass.on('touchOutside', () => {
console.info('touchOutside');
// console.info('touchOutside');
EmitterUtils.sendEvent(EmitterEventId.AUDIO_WINDOW_TYPE, 3)
});
... ... @@ -142,20 +142,20 @@ export default class EntryAbility extends UIAbility {
// 普通phone以PORTRAIT/竖屏显示模式启动
// 折叠屏和tablet是以AUTO_ROTATION_RESTRICTED/受开关控制的自动旋转模式启动
WindowModel.shared.setPreferredOrientation(window.Orientation.PORTRAIT)
.then(() => {
Logger.info(TAG, 'setPreferredOrientation Succeeded');
})
.catch((err: Error) => {
Logger.info(TAG,
`setPreferredOrientation catch, error error.name : ${err.name}, error.message:${err.message}`);
})
} else if (DeviceUtil.is2in1()) {
// 2in1(PC)设备不支持旋转(无横竖屏模式),会以默认窗口(非全屏)显示模式启动Logger.info(TAG,`start at 2in1 window device )
Logger.info(TAG, 'start at 2in1 window device')
} else {
// 轻量级智能穿戴/lite wearable device
Logger.info(TAG, 'start at other type device')
// .then(() => {
// Logger.info(TAG, 'setPreferredOrientation Succeeded');
// })
// .catch((err: Error) => {
// Logger.info(TAG, `setPreferredOrientation catch, error error.name : ${err.name}, error.message:${err.message}`);
// })
}
// else if (DeviceUtil.is2in1()) {
// // 2in1(PC)设备不支持旋转(无横竖屏模式),会以默认窗口(非全屏)显示模式启动Logger.info(TAG,`start at 2in1 window device )
// Logger.info(TAG, 'start at 2in1 window device')
// } else {
// // 轻量级智能穿戴/lite wearable device
// Logger.info(TAG, 'start at other type device')
// }
}
... ... @@ -163,29 +163,29 @@ export default class EntryAbility extends UIAbility {
(floatWindowClass as window.Window).destroyWindow((err: BusinessError) => {
let errCode: number = err.code;
if (errCode) {
Logger.error('floatWindowClass Failed to destroy the window. Cause: ' + JSON.stringify(err));
// Logger.error('floatWindowClass Failed to destroy the window. Cause: ' + JSON.stringify(err));
return;
}
Logger.info('floatWindowClass Succeeded in destroying the window.');
// Logger.info('floatWindowClass Succeeded in destroying the window.');
});
}
onWindowStageDestroy(): void {
// Main window is destroyed, release UI related resources
this.destroyFloatWindow()
Logger.info(TAG, 'Ability onWindowStageDestroy');
// Logger.info(TAG, 'Ability onWindowStageDestroy');
}
onForeground(): void {
// Ability has brought to foreground
Logger.info(TAG, 'Ability onForeground');
// Logger.info(TAG, 'Ability onForeground');
EmitterUtils.sendEmptyEvent(EmitterEventId.APP_ENTER_FOREGROUD)
}
onBackground(): void {
// Ability has back to background
Logger.info(TAG, 'Ability onBackground');
// Logger.info(TAG, 'Ability onBackground');
EmitterUtils.sendEmptyEvent(EmitterEventId.APP_ENTER_BACKGROUD)
}
... ...
... ... @@ -50,10 +50,10 @@ struct Index {
EmitterUtils.receiveEvent(EmitterEventId.AUDIO_CHANGE_STATUS, (val: number | string | undefined) => {
// val 2 pause
if(val === PlayerConstants.STATUS_PAUSE || val === PlayerConstants.STATUS_COMPLETION) {
console.log(TAG,'AUDIO_CHANGE_STATUS this.currentStatus 2 ', val)
// console.log(TAG,'AUDIO_CHANGE_STATUS this.currentStatus 2 ', val)
lottie.pause(this.name)
} else if(val === PlayerConstants.STATUS_START) {
console.log(TAG,'AUDIO_CHANGE_STATUS this.currentStatus 1 ', val)
// console.log(TAG,'AUDIO_CHANGE_STATUS this.currentStatus 1 ', val)
lottie.play(this.name)
}
this.currentStatus = val
... ... @@ -80,7 +80,7 @@ struct Index {
moveWindow() {
if (this.subWindow == null) {
console.info('Faild in destroying the window.');
// console.info('Faild in destroying the window.');
} else {
this.subWindow.moveWindowTo(this.windowPosition.x, this.windowPosition.y);
}
... ... @@ -88,7 +88,7 @@ struct Index {
onPageHide() {
// this.status = PlayerConstants.STATUS_PAUSE;
console.info('onPageHide');
// console.info('onPageHide');
// this.AudioSuspension.playerController.get()?.pause();
}
... ... @@ -110,15 +110,15 @@ struct Index {
.fontFamily('PingFang SC-Medium')
.fontWeight(500)
.alignSelf(ItemAlign.Start)
.onStart(() => {
console.info('Marquee animation complete onStart')
})
.onBounce(() => {
console.info('Marquee animation complete onBounce')
})
.onFinish(() => {
console.info('Marquee animation complete onFinish')
})
// .onStart(() => {
// console.info('Marquee animation complete onStart')
// })
// .onBounce(() => {
// console.info('Marquee animation complete onBounce')
// })
// .onFinish(() => {
// console.info('Marquee animation complete onFinish')
// })
Row() {
Text(this.currentTime)
... ... @@ -209,9 +209,9 @@ struct Index {
}),
PanGesture(this.panOption)
//手势识别成功回调。
.onActionStart((event: GestureEvent) => {
console.info('Pan start');
})
// .onActionStart((event: GestureEvent) => {
// console.info('Pan start');
// })
// 手势移动过程中回调。发生拖拽时,获取到触摸点的位置,并将位置信息传递给windowPosition
.onActionUpdate((event: GestureEvent) => {
// this.windowPosition.x += event.offsetX;
... ... @@ -219,9 +219,9 @@ struct Index {
this.windowPosition.y = Math.min(Math.max(newY, this.topSafeHeight), this.bottomSafeHeight);
})
//手势识别成功,手指抬起后触发回调。
.onActionEnd(() => {
console.info('Pan end');
})
// .onActionEnd(() => {
// console.info('Pan end');
// })
)
)
.borderRadius(4)
... ...
... ... @@ -61,11 +61,11 @@ export struct BottomNavigationComponent {
async aboutToAppear() {
Logger.info(TAG, `aboutToAppear currentNavIndex: ${this.currentNavIndex}`);
// Logger.info(TAG, `aboutToAppear currentNavIndex: ${this.currentNavIndex}`);
this.getBottomData()
EmitterUtils.receiveEvent(EmitterEventId.JUMP_HOME_CHANNEL, (str?: string) => {
Logger.debug(TAG, 'receiveEvent JUMP_HOME_CHANNEL: ' + str)
// Logger.debug(TAG, 'receiveEvent JUMP_HOME_CHANNEL: ' + str)
if (str) {
// 跳转指定频道场景,传参底导id、频道id
let assignChannel = JSON.parse(str) as AssignChannelParam
... ... @@ -75,7 +75,7 @@ export struct BottomNavigationComponent {
}
aboutToDisappear() {
Logger.info(TAG, `aboutToDisappear, this.currentNavIndex: ${this.currentNavIndex}`);
// Logger.info(TAG, `aboutToDisappear, this.currentNavIndex: ${this.currentNavIndex}`);
}
build() {
... ... @@ -153,8 +153,8 @@ export struct BottomNavigationComponent {
this.handleAudio(navItem)
})
.onClick(() => {
Logger.info(TAG, `onChange, index: ${index}`);
Logger.info(TAG, `onChange, navItem: ${JSON.stringify(navItem)}`);
// Logger.info(TAG, `onChange, index: ${index}`);
// Logger.info(TAG, `onChange, navItem: ${JSON.stringify(navItem)}`);
// 底部bar埋点
const params: ParamType = {
"pageName": navItem.pageName,
... ... @@ -267,10 +267,10 @@ export struct BottomNavigationComponent {
this.AudioSuspension.floatWindowClass.get().isShowing((err: BusinessError, data) => {
const errCode: number = err.code;
if (errCode) {
console.error(TAG, 'Failed window is showing Cause:' + JSON.stringify(err));
// console.error(TAG, 'Failed window is showing Cause:' + JSON.stringify(err));
return;
}
console.info(TAG, 'window is showing: ' + JSON.stringify(data));
// console.info(TAG, 'window is showing: ' + JSON.stringify(data));
if(data) {
this.isShowAudioCom = true
this.AudioSuspension.playerController.get()?.pause();
... ... @@ -278,7 +278,7 @@ export struct BottomNavigationComponent {
}
});
} else {
console.info(TAG, 'this.isShowAudioCom: ' + this.isShowAudioCom);
// console.info(TAG, 'this.isShowAudioCom: ' + this.isShowAudioCom);
if (this.isShowAudioCom) {
this.AudioSuspension.showWindow()
this.isShowAudioCom = false
... ... @@ -288,7 +288,7 @@ export struct BottomNavigationComponent {
// 底导切换函数
async onBottomNavigationIndexChange(navItem: BottomNavDTO, index: number) {
Logger.info(TAG, `onBottomNavigationIndexChange to Index:${index},this.currentNavIndex: ${this.currentNavIndex}`);
// Logger.info(TAG, `onBottomNavigationIndexChange to Index:${index},this.currentNavIndex: ${this.currentNavIndex}`);
if (navItem.name === '我的') {
this.barBackgroundColor = Color.White
... ... @@ -309,7 +309,7 @@ export struct BottomNavigationComponent {
onBottomNavigationDataUpdated() {
Logger.error('yyyy', 'onBottomNavigationDataUpdated ' + JSON.stringify(this.bottomNavList))
// Logger.error('yyyy', 'onBottomNavigationDataUpdated ' + JSON.stringify(this.bottomNavList))
}
/**
... ... @@ -339,18 +339,18 @@ export struct BottomNavigationComponent {
}
private async getBottomData() {
Logger.debug(TAG, 'getBottomData')
// Logger.debug(TAG, 'getBottomData')
// 1、缓存底导数据
let bottomCache = await ChannelViewModel.getBottomNavCacheData()
if (bottomCache && bottomCache.bottomNavList != null) {
Logger.debug(TAG, 'getBottomData cache success')
// Logger.debug(TAG, 'getBottomData cache success')
this.setData(bottomCache)
this.getBottomDetail()
}else{
let bottomPreset = await ChannelViewModel.getBottomNavPresetData()
if (bottomPreset && bottomPreset.bottomNavList != null) {
Logger.debug(TAG, 'getBottomData Preset success')
// Logger.debug(TAG, 'getBottomData Preset success')
this.setData(bottomPreset)
this.getBottomDetail()
}
... ... @@ -359,7 +359,7 @@ export struct BottomNavigationComponent {
// 3、接口底导数据
let bottomNav = await ChannelViewModel.getBottomNavData()
if (bottomNav && bottomNav.bottomNavList != null) {
Logger.debug(TAG, 'getBottomNavData')
// Logger.debug(TAG, 'getBottomNavData')
HomeChannelUtils.setBottomNavData(bottomNav)
if (this.bottomNavList == null || this.bottomNavList.length <= 0) {
// 底导没展示,则用接口数据(接口数据回来,不去覆盖缓存数据,没有缓存才加载)
... ... @@ -395,7 +395,7 @@ export struct BottomNavigationComponent {
}
private setData(data: NavigationBodyDTO) {
Logger.debug(TAG, 'setData')
// Logger.debug(TAG, 'setData')
if (data == null) {
return
}
... ... @@ -421,7 +421,7 @@ export struct BottomNavigationComponent {
list = data.bottomNavList
}
if (list.length > 0) {
Logger.info(TAG, `setData, bottomNav.length: ${list.length}`);
// Logger.info(TAG, `setData, bottomNav.length: ${list.length}`);
// 使用filter方法移除name为'服务'的项
list = list.filter(item => item.name !== '服务');
list.forEach(item => {
... ...