Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main
* 'main' of http://192.168.1.42/developOne/harmonyPool: 进入视频页面,鸿蒙端添加新手引导 fix: 兴趣卡埋点 fix: 1)编辑我的频道- 频道未能去重导致新闻频道栏出现重复频道 feat: 1)编辑我的频道-bindContentCover 回调关闭 习惯推 entityId 改成参数拼接方案、习惯推默认 logo fix: 1)编辑我的频道-编辑中_退出页面,再次进入不该仍为编辑中状态
Showing
8 changed files
with
73 additions
and
28 deletions
| @@ -33,9 +33,9 @@ export struct ZhSingleColumn09 { | @@ -33,9 +33,9 @@ export struct ZhSingleColumn09 { | ||
| 33 | try { | 33 | try { |
| 34 | const contentDTO = this.compDTO.operDataList[0]; | 34 | const contentDTO = this.compDTO.operDataList[0]; |
| 35 | const extParams: ParamType = { | 35 | const extParams: ParamType = { |
| 36 | - 'value': type === 'close_interest_card_click' ? 'closeInterestCard' : 'selectInterestCard', | 36 | + 'action': type === 'close_interest_card_click' ? 'closeInterestCard' : 'selectInterestCard', |
| 37 | 'duration': 0, | 37 | 'duration': 0, |
| 38 | - 'action': 'detailPageShow', | 38 | + // 'action': 'detailPageShow', |
| 39 | 'shareChannel': '', | 39 | 'shareChannel': '', |
| 40 | 'contentName': '兴趣选项卡', | 40 | 'contentName': '兴趣选项卡', |
| 41 | 'contentType': this.compDTO.objectType || '', | 41 | 'contentType': this.compDTO.objectType || '', |
| @@ -124,12 +124,10 @@ struct ChannelSubscriptionLayout { | @@ -124,12 +124,10 @@ struct ChannelSubscriptionLayout { | ||
| 124 | addChannelItem(item: TopNavDTO) { | 124 | addChannelItem(item: TopNavDTO) { |
| 125 | this.channelIds.push(item.channelId) | 125 | this.channelIds.push(item.channelId) |
| 126 | this.myChannelList.push(item) | 126 | this.myChannelList.push(item) |
| 127 | - | ||
| 128 | - | ||
| 129 | AppStorage.setOrCreate('channelIds', this.channelIds.join(',')) | 127 | AppStorage.setOrCreate('channelIds', this.channelIds.join(',')) |
| 130 | 128 | ||
| 131 | - let storageChannelIds: string = AppStorage.get<string>('channelIds') || '' | ||
| 132 | - console.debug('TopNavigationComponent', 'addChannelItem==>' + storageChannelIds) | 129 | + // let storageChannelIds: string = AppStorage.get<string>('channelIds') || '' |
| 130 | + // console.debug('TopNavigationComponent', 'addChannelItem==>' + storageChannelIds) | ||
| 133 | } | 131 | } |
| 134 | 132 | ||
| 135 | itemMove(index: number, newIndex: number): void { | 133 | itemMove(index: number, newIndex: number): void { |
| @@ -569,9 +567,19 @@ struct ChannelSubscriptionLayout { | @@ -569,9 +567,19 @@ struct ChannelSubscriptionLayout { | ||
| 569 | .onClick(() => { | 567 | .onClick(() => { |
| 570 | this.isShow = true | 568 | this.isShow = true |
| 571 | }) | 569 | }) |
| 572 | - .bindContentCover(this.isShow, this.sheetBuilder()) | 570 | + .bindContentCover(this.isShow, this.sheetBuilder(), { |
| 571 | + modalTransition: ModalTransition.DEFAULT, | ||
| 572 | + onWillAppear: () => {console.log("BindContentCover onWillAppear.")}, | ||
| 573 | + onAppear: () => {console.log("BindContentCover onAppear.")}, | ||
| 574 | + onWillDisappear: () => {console.log("BindContentCover onWillDisappear.")}, | ||
| 575 | + onDisappear: () => {console.log("BindContentCover onDisappear.") | ||
| 576 | + this.isShow = false | ||
| 577 | + this.isEditIng = false} | ||
| 578 | + }) | ||
| 573 | } | 579 | } |
| 574 | 580 | ||
| 581 | + | ||
| 582 | + | ||
| 575 | /** | 583 | /** |
| 576 | * 改变我的频道栏目中频道id数据 | 584 | * 改变我的频道栏目中频道id数据 |
| 577 | */ | 585 | */ |
| @@ -583,8 +591,6 @@ struct ChannelSubscriptionLayout { | @@ -583,8 +591,6 @@ struct ChannelSubscriptionLayout { | ||
| 583 | this.channelIds.push(item.channelId) | 591 | this.channelIds.push(item.channelId) |
| 584 | } | 592 | } |
| 585 | }) | 593 | }) |
| 586 | - | ||
| 587 | - console.debug('TopNavigationComponent', '--changeMyChannelData channelIds--->' + this.channelIds.join(',')) | ||
| 588 | } | 594 | } |
| 589 | } | 595 | } |
| 590 | 596 |
| @@ -495,10 +495,14 @@ export struct TopNavigationComponentNew { | @@ -495,10 +495,14 @@ export struct TopNavigationComponentNew { | ||
| 495 | * 频道id变化,即指定频道跳转场景 | 495 | * 频道id变化,即指定频道跳转场景 |
| 496 | */ | 496 | */ |
| 497 | onAssignChannelChange() { | 497 | onAssignChannelChange() { |
| 498 | + | ||
| 498 | if (!this.isCurrentPage()) { | 499 | if (!this.isCurrentPage()) { |
| 499 | return | 500 | return |
| 500 | } | 501 | } |
| 501 | let channelId = this.assignChannel.channelId | 502 | let channelId = this.assignChannel.channelId |
| 503 | + | ||
| 504 | + Logger.debug(TAG,'------onAssignChannelChange--------->'+channelId+' ==>'+this._currentNavIndex) | ||
| 505 | + | ||
| 502 | let index = -1 | 506 | let index = -1 |
| 503 | if (this._currentNavIndex === 0) { | 507 | if (this._currentNavIndex === 0) { |
| 504 | // 第一个,新闻,先拿我的,再拿其他 | 508 | // 第一个,新闻,先拿我的,再拿其他 |
| @@ -559,12 +563,14 @@ export struct TopNavigationComponentNew { | @@ -559,12 +563,14 @@ export struct TopNavigationComponentNew { | ||
| 559 | for (let i = 0; i < this.moreChannelList.length; i++) { | 563 | for (let i = 0; i < this.moreChannelList.length; i++) { |
| 560 | let topNavDTO: TopNavDTO = this.moreChannelList[i] | 564 | let topNavDTO: TopNavDTO = this.moreChannelList[i] |
| 561 | if (topNavDTO.channelId?.toString() === channelId) { | 565 | if (topNavDTO.channelId?.toString() === channelId) { |
| 566 | + this.moreChannelList.splice(i,1) | ||
| 562 | return topNavDTO | 567 | return topNavDTO |
| 563 | } | 568 | } |
| 564 | } | 569 | } |
| 565 | for (let j = 0; j < this.localChannelList.length; j++) { | 570 | for (let j = 0; j < this.localChannelList.length; j++) { |
| 566 | let topNavDTO: TopNavDTO = this.localChannelList[j] | 571 | let topNavDTO: TopNavDTO = this.localChannelList[j] |
| 567 | if (topNavDTO.channelId?.toString() === channelId) { | 572 | if (topNavDTO.channelId?.toString() === channelId) { |
| 573 | + this.localChannelList.splice(j,1) | ||
| 568 | return topNavDTO | 574 | return topNavDTO |
| 569 | } | 575 | } |
| 570 | } | 576 | } |
| @@ -44,10 +44,10 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent | @@ -44,10 +44,10 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent | ||
| 44 | }, | 44 | }, |
| 45 | intentEntityInfo: { | 45 | intentEntityInfo: { |
| 46 | entityName: 'Blog', | 46 | entityName: 'Blog', |
| 47 | - entityId: item?.objectId || '',//必传 | 47 | + entityId: `objectId=${item?.objectId}&objectType=${item?.objectType}` || '',//必传 |
| 48 | displayName: item?.newsTitle || '', //必传 | 48 | displayName: item?.newsTitle || '', //必传 |
| 49 | entityGroupId, //channelId | 49 | entityGroupId, //channelId |
| 50 | - logoURL: item?.coverUrl, | 50 | + logoURL: item?.coverUrl || 'https://cdnjdphoto.aikan.pdnews.cn/WapApi/800/launcher_icon.png', |
| 51 | metadataModificationTime: Number(item?.publishTime) || 0,//int | 51 | metadataModificationTime: Number(item?.publishTime) || 0,//int |
| 52 | blogTitle: item?.newsTitle, | 52 | blogTitle: item?.newsTitle, |
| 53 | blogType: 'Normal', | 53 | blogType: 'Normal', |
| @@ -99,7 +99,7 @@ export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext, | @@ -99,7 +99,7 @@ export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext, | ||
| 99 | entityId: String(item?.newsId) || '', | 99 | entityId: String(item?.newsId) || '', |
| 100 | displayName: item?.newsTitle || '', | 100 | displayName: item?.newsTitle || '', |
| 101 | entityGroupId: String(item?.reLInfo?.channelId), //channelId | 101 | entityGroupId: String(item?.reLInfo?.channelId), //channelId |
| 102 | - logoURL: item.fullColumnImgUrls.length > 0 ? item.fullColumnImgUrls[0]?.url : item.firstFrameImageUri, | 102 | + logoURL: item.fullColumnImgUrls.length > 0 ? item.fullColumnImgUrls[0]?.url : item.firstFrameImageUri || 'https://cdnjdphoto.aikan.pdnews.cn/WapApi/800/launcher_icon.png', |
| 103 | metadataModificationTime: new Date(item.publishTime).getTime() || 0, | 103 | metadataModificationTime: new Date(item.publishTime).getTime() || 0, |
| 104 | blogTitle: item?.newsTitle, | 104 | blogTitle: item?.newsTitle, |
| 105 | blogType: 'Normal', | 105 | blogType: 'Normal', |
| @@ -15,6 +15,7 @@ import { DisplayDirection } from 'wdConstant/Index'; | @@ -15,6 +15,7 @@ import { DisplayDirection } from 'wdConstant/Index'; | ||
| 15 | import { window } from '@kit.ArkUI'; | 15 | import { window } from '@kit.ArkUI'; |
| 16 | import { EmptyComponent, WDViewDefaultType } from 'wdComponent/Index'; | 16 | import { EmptyComponent, WDViewDefaultType } from 'wdComponent/Index'; |
| 17 | import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index'; | 17 | import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index'; |
| 18 | +import { LottieView } from 'wdComponent/Index' | ||
| 18 | 19 | ||
| 19 | interface loadMoreData { | 20 | interface loadMoreData { |
| 20 | pageNum: number; | 21 | pageNum: number; |
| @@ -24,6 +25,7 @@ interface loadMoreData { | @@ -24,6 +25,7 @@ interface loadMoreData { | ||
| 24 | 25 | ||
| 25 | const TAG = 'VideoChannelDetail' | 26 | const TAG = 'VideoChannelDetail' |
| 26 | const storage = LocalStorage.getShared(); | 27 | const storage = LocalStorage.getShared(); |
| 28 | +PersistentStorage.persistProp('GestureLoadStrategy', 0); // 点播视频手势动画0为用户首次进入视频点播,1为用户已进入视频点播 | ||
| 27 | 29 | ||
| 28 | @Entry(storage) | 30 | @Entry(storage) |
| 29 | @Component | 31 | @Component |
| @@ -66,6 +68,7 @@ export struct VideoChannelDetail { | @@ -66,6 +68,7 @@ export struct VideoChannelDetail { | ||
| 66 | pageHideTime: number = 0; | 68 | pageHideTime: number = 0; |
| 67 | @Provide onlyWifiLoadVideo: boolean = false | 69 | @Provide onlyWifiLoadVideo: boolean = false |
| 68 | @Provide toastTextVisible: boolean = false | 70 | @Provide toastTextVisible: boolean = false |
| 71 | + @StorageLink('GestureLoadStrategy') GestureLoadStrategy: number = 0 | ||
| 69 | 72 | ||
| 70 | autoRefreshChange() { | 73 | autoRefreshChange() { |
| 71 | if (this.topNavIndex === 0 && !this.isRequesting) { | 74 | if (this.topNavIndex === 0 && !this.isRequesting) { |
| @@ -277,7 +280,7 @@ export struct VideoChannelDetail { | @@ -277,7 +280,7 @@ export struct VideoChannelDetail { | ||
| 277 | } | 280 | } |
| 278 | 281 | ||
| 279 | build() { | 282 | build() { |
| 280 | - Column() { | 283 | + Stack({ alignContent: Alignment.Center }) { |
| 281 | if (this.isRequestError) { | 284 | if (this.isRequestError) { |
| 282 | EmptyComponent({ | 285 | EmptyComponent({ |
| 283 | emptyType: WDViewDefaultType.WDViewDefaultType_NoVideo, | 286 | emptyType: WDViewDefaultType.WDViewDefaultType_NoVideo, |
| @@ -289,6 +292,7 @@ export struct VideoChannelDetail { | @@ -289,6 +292,7 @@ export struct VideoChannelDetail { | ||
| 289 | 292 | ||
| 290 | PictureLoading() | 293 | PictureLoading() |
| 291 | .visibility(this.isMouted ? Visibility.None : Visibility.Visible) | 294 | .visibility(this.isMouted ? Visibility.None : Visibility.Visible) |
| 295 | + | ||
| 292 | Swiper(this.swiperController) { | 296 | Swiper(this.swiperController) { |
| 293 | ForEach(this.data, (item: ContentDetailDTO, index: number) => { | 297 | ForEach(this.data, (item: ContentDetailDTO, index: number) => { |
| 294 | DetailPlayShortVideoPage({ | 298 | DetailPlayShortVideoPage({ |
| @@ -319,6 +323,29 @@ export struct VideoChannelDetail { | @@ -319,6 +323,29 @@ export struct VideoChannelDetail { | ||
| 319 | this.getRecCompInfo() | 323 | this.getRecCompInfo() |
| 320 | } | 324 | } |
| 321 | }) | 325 | }) |
| 326 | + // 作为手势动画的背景 | ||
| 327 | + Row() {} | ||
| 328 | + .justifyContent(FlexAlign.Center) | ||
| 329 | + .width('100%') | ||
| 330 | + .height('100%') | ||
| 331 | + .visibility(this.isMouted && this.GestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden) | ||
| 332 | + .backgroundColor('rgba(0, 0, 0, 0.50)') | ||
| 333 | + .onTouch(() => { | ||
| 334 | + this.GestureLoadStrategy = 1 | ||
| 335 | + }) | ||
| 336 | + // 手势动画 初次进入显示 | ||
| 337 | + LottieView({ | ||
| 338 | + name: 'slider_up_view_more', | ||
| 339 | + path: "lottie/slider_up_view_more.json", | ||
| 340 | + lottieWidth: 167, | ||
| 341 | + lottieHeight: 167, | ||
| 342 | + autoplay: true, | ||
| 343 | + loop: true | ||
| 344 | + }) | ||
| 345 | + .visibility(this.isMouted && this.GestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden) | ||
| 346 | + .onTouch(() => { | ||
| 347 | + this.GestureLoadStrategy = 1 | ||
| 348 | + }) | ||
| 322 | 349 | ||
| 323 | } | 350 | } |
| 324 | } | 351 | } |
| @@ -51,7 +51,6 @@ export struct PlayerTitleView { | @@ -51,7 +51,6 @@ export struct PlayerTitleView { | ||
| 51 | 51 | ||
| 52 | /** | 52 | /** |
| 53 | * 截断文本 | 53 | * 截断文本 |
| 54 | - * @author liuzhendong(猩猩G) | ||
| 55 | * @param {string} str 要截断的文本 '啊啊啊啊啊' | 54 | * @param {string} str 要截断的文本 '啊啊啊啊啊' |
| 56 | * @param {number} fontSize 字体大小(px) | 55 | * @param {number} fontSize 字体大小(px) |
| 57 | * @param {number} maxLines 最大行数 3 | 56 | * @param {number} maxLines 最大行数 3 |
| @@ -24,18 +24,17 @@ export class Tracking { | @@ -24,18 +24,17 @@ export class Tracking { | ||
| 24 | // Logger.error('yyyy','event track failed') | 24 | // Logger.error('yyyy','event track failed') |
| 25 | // }) | 25 | // }) |
| 26 | 26 | ||
| 27 | - //TODO: 添加运行单独线程? | ||
| 28 | - // let publicParams = new PublicParams() | ||
| 29 | - // publicParams.getPublicParams().then((pubParams) => { | ||
| 30 | - // | ||
| 31 | - // if (params) { | ||
| 32 | - // for (const obj of Object.entries(params)) { | ||
| 33 | - // // Logger.info(TAG, ` ${obj[0]} => ` + `${obj[1]}`); | ||
| 34 | - // pubParams[obj[0]] = obj[1] | ||
| 35 | - // } | ||
| 36 | - // } | ||
| 37 | - // sensors.track(eventId, pubParams) | ||
| 38 | - // }) | 27 | + let publicParams = new PublicParams() |
| 28 | + publicParams.getPublicParams().then((pubParams) => { | ||
| 29 | + | ||
| 30 | + if (params) { | ||
| 31 | + for (const obj of Object.entries(params)) { | ||
| 32 | + // Logger.info(TAG, ` ${obj[0]} => ` + `${obj[1]}`); | ||
| 33 | + pubParams[obj[0]] = obj[1] | ||
| 34 | + } | ||
| 35 | + } | ||
| 36 | + sensors.track(eventId, pubParams) | ||
| 37 | + }) | ||
| 39 | } | 38 | } |
| 40 | } | 39 | } |
| 41 | 40 |
| 1 | +import Url from '@ohos.url' | ||
| 1 | import { insightIntent, InsightIntentExecutor } from '@kit.AbilityKit'; | 2 | import { insightIntent, InsightIntentExecutor } from '@kit.AbilityKit'; |
| 2 | import { window } from '@kit.ArkUI'; | 3 | import { window } from '@kit.ArkUI'; |
| 3 | import { BusinessError } from '@kit.BasicServicesKit'; | 4 | import { BusinessError } from '@kit.BasicServicesKit'; |
| 4 | import { NetworkUtil, SPHelper, ToastUtils, FastClickUtil } from 'wdKit'; | 5 | import { NetworkUtil, SPHelper, ToastUtils, FastClickUtil } from 'wdKit'; |
| 6 | +import { ContentDTO } from 'wdBean'; | ||
| 5 | import { ProcessUtils } from 'wdRouter'; | 7 | import { ProcessUtils } from 'wdRouter'; |
| 6 | import DailyPaperTopicModel from 'wdComponent/src/main/ets/model/DailyPaperTopicModel' | 8 | import DailyPaperTopicModel from 'wdComponent/src/main/ets/model/DailyPaperTopicModel' |
| 7 | 9 | ||
| @@ -52,6 +54,12 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor { | @@ -52,6 +54,12 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor { | ||
| 52 | // TODO 热启动是否切到主页 | 54 | // TODO 热启动是否切到主页 |
| 53 | pageLoader.loadContent('pages/MainPage') | 55 | pageLoader.loadContent('pages/MainPage') |
| 54 | .then(() => { | 56 | .then(() => { |
| 57 | + let url: string = param?.entityId as string || '' | ||
| 58 | + let urlParams = new Url.URLParams(url); | ||
| 59 | + let content = new ContentDTO() | ||
| 60 | + content.objectId = urlParams.get('objectId') || '' | ||
| 61 | + content.objectType = urlParams.get('objectType') || '' | ||
| 62 | + ProcessUtils.processPage(content) | ||
| 55 | resolve({ | 63 | resolve({ |
| 56 | code: 0, | 64 | code: 0, |
| 57 | result: { | 65 | result: { |
| @@ -79,7 +87,7 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor { | @@ -79,7 +87,7 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor { | ||
| 79 | pageLoader: window.WindowStage): Promise<insightIntent.ExecuteResult> { | 87 | pageLoader: window.WindowStage): Promise<insightIntent.ExecuteResult> { |
| 80 | return new Promise((resolve, reject) => { | 88 | return new Promise((resolve, reject) => { |
| 81 | pageLoader.loadContent('pages/MainPage') | 89 | pageLoader.loadContent('pages/MainPage') |
| 82 | - .then( async () => { | 90 | + .then(async () => { |
| 83 | if (NetworkUtil.isNetConnected()) { | 91 | if (NetworkUtil.isNetConnected()) { |
| 84 | if (await FastClickUtil.isMinDelayTime()) { | 92 | if (await FastClickUtil.isMinDelayTime()) { |
| 85 | return | 93 | return |
| @@ -92,7 +100,7 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor { | @@ -92,7 +100,7 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor { | ||
| 92 | ToastUtils.showToast('暂无早晚报信息', 1000) | 100 | ToastUtils.showToast('暂无早晚报信息', 1000) |
| 93 | } | 101 | } |
| 94 | }).catch((err: string) => { | 102 | }).catch((err: string) => { |
| 95 | - console.log('yzlerr',JSON.stringify(err)) | 103 | + console.log('yzlerr', JSON.stringify(err)) |
| 96 | ToastUtils.showToast('暂无早晚报信息', 1000) | 104 | ToastUtils.showToast('暂无早晚报信息', 1000) |
| 97 | }) | 105 | }) |
| 98 | } else { | 106 | } else { |
-
Please register or login to post a comment