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: 1)编辑我的频道- 频道未能去重导致新闻频道栏出现重复频道
  feat: 1)编辑我的频道-bindContentCover 回调关闭
  习惯推 entityId 改成参数拼接方案、习惯推默认 logo
  fix: 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 || '',
... ...
... ... @@ -124,12 +124,10 @@ struct ChannelSubscriptionLayout {
addChannelItem(item: TopNavDTO) {
this.channelIds.push(item.channelId)
this.myChannelList.push(item)
AppStorage.setOrCreate('channelIds', this.channelIds.join(','))
let storageChannelIds: string = AppStorage.get<string>('channelIds') || ''
console.debug('TopNavigationComponent', 'addChannelItem==>' + storageChannelIds)
// let storageChannelIds: string = AppStorage.get<string>('channelIds') || ''
// console.debug('TopNavigationComponent', 'addChannelItem==>' + storageChannelIds)
}
itemMove(index: number, newIndex: number): void {
... ... @@ -569,9 +567,19 @@ struct ChannelSubscriptionLayout {
.onClick(() => {
this.isShow = true
})
.bindContentCover(this.isShow, this.sheetBuilder())
.bindContentCover(this.isShow, this.sheetBuilder(), {
modalTransition: ModalTransition.DEFAULT,
onWillAppear: () => {console.log("BindContentCover onWillAppear.")},
onAppear: () => {console.log("BindContentCover onAppear.")},
onWillDisappear: () => {console.log("BindContentCover onWillDisappear.")},
onDisappear: () => {console.log("BindContentCover onDisappear.")
this.isShow = false
this.isEditIng = false}
})
}
/**
* 改变我的频道栏目中频道id数据
*/
... ... @@ -583,8 +591,6 @@ struct ChannelSubscriptionLayout {
this.channelIds.push(item.channelId)
}
})
console.debug('TopNavigationComponent', '--changeMyChannelData channelIds--->' + this.channelIds.join(','))
}
}
... ...
... ... @@ -495,10 +495,14 @@ export struct TopNavigationComponentNew {
* 频道id变化,即指定频道跳转场景
*/
onAssignChannelChange() {
if (!this.isCurrentPage()) {
return
}
let channelId = this.assignChannel.channelId
Logger.debug(TAG,'------onAssignChannelChange--------->'+channelId+' ==>'+this._currentNavIndex)
let index = -1
if (this._currentNavIndex === 0) {
// 第一个,新闻,先拿我的,再拿其他
... ... @@ -559,12 +563,14 @@ export struct TopNavigationComponentNew {
for (let i = 0; i < this.moreChannelList.length; i++) {
let topNavDTO: TopNavDTO = this.moreChannelList[i]
if (topNavDTO.channelId?.toString() === channelId) {
this.moreChannelList.splice(i,1)
return topNavDTO
}
}
for (let j = 0; j < this.localChannelList.length; j++) {
let topNavDTO: TopNavDTO = this.localChannelList[j]
if (topNavDTO.channelId?.toString() === channelId) {
this.localChannelList.splice(j,1)
return topNavDTO
}
}
... ...
... ... @@ -44,10 +44,10 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent
},
intentEntityInfo: {
entityName: 'Blog',
entityId: item?.objectId || '',//必传
entityId: `objectId=${item?.objectId}&objectType=${item?.objectType}` || '',//必传
displayName: item?.newsTitle || '', //必传
entityGroupId, //channelId
logoURL: item?.coverUrl,
logoURL: item?.coverUrl || 'https://cdnjdphoto.aikan.pdnews.cn/WapApi/800/launcher_icon.png',
metadataModificationTime: Number(item?.publishTime) || 0,//int
blogTitle: item?.newsTitle,
blogType: 'Normal',
... ... @@ -99,7 +99,7 @@ export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext,
entityId: String(item?.newsId) || '',
displayName: item?.newsTitle || '',
entityGroupId: String(item?.reLInfo?.channelId), //channelId
logoURL: item.fullColumnImgUrls.length > 0 ? item.fullColumnImgUrls[0]?.url : item.firstFrameImageUri,
logoURL: item.fullColumnImgUrls.length > 0 ? item.fullColumnImgUrls[0]?.url : item.firstFrameImageUri || 'https://cdnjdphoto.aikan.pdnews.cn/WapApi/800/launcher_icon.png',
metadataModificationTime: new Date(item.publishTime).getTime() || 0,
blogTitle: item?.newsTitle,
blogType: 'Normal',
... ...
... ... @@ -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
... ...
... ... @@ -24,18 +24,17 @@ export class Tracking {
// Logger.error('yyyy','event track failed')
// })
//TODO: 添加运行单独线程?
// let publicParams = new PublicParams()
// publicParams.getPublicParams().then((pubParams) => {
//
// if (params) {
// for (const obj of Object.entries(params)) {
// // Logger.info(TAG, ` ${obj[0]} => ` + `${obj[1]}`);
// pubParams[obj[0]] = obj[1]
// }
// }
// sensors.track(eventId, pubParams)
// })
let publicParams = new PublicParams()
publicParams.getPublicParams().then((pubParams) => {
if (params) {
for (const obj of Object.entries(params)) {
// Logger.info(TAG, ` ${obj[0]} => ` + `${obj[1]}`);
pubParams[obj[0]] = obj[1]
}
}
sensors.track(eventId, pubParams)
})
}
}
... ...
import Url from '@ohos.url'
import { insightIntent, InsightIntentExecutor } from '@kit.AbilityKit';
import { window } from '@kit.ArkUI';
import { BusinessError } from '@kit.BasicServicesKit';
import { NetworkUtil, SPHelper, ToastUtils, FastClickUtil } from 'wdKit';
import { ContentDTO } from 'wdBean';
import { ProcessUtils } from 'wdRouter';
import DailyPaperTopicModel from 'wdComponent/src/main/ets/model/DailyPaperTopicModel'
... ... @@ -52,6 +54,12 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor {
// TODO 热启动是否切到主页
pageLoader.loadContent('pages/MainPage')
.then(() => {
let url: string = param?.entityId as string || ''
let urlParams = new Url.URLParams(url);
let content = new ContentDTO()
content.objectId = urlParams.get('objectId') || ''
content.objectType = urlParams.get('objectType') || ''
ProcessUtils.processPage(content)
resolve({
code: 0,
result: {
... ... @@ -79,7 +87,7 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor {
pageLoader: window.WindowStage): Promise<insightIntent.ExecuteResult> {
return new Promise((resolve, reject) => {
pageLoader.loadContent('pages/MainPage')
.then( async () => {
.then(async () => {
if (NetworkUtil.isNetConnected()) {
if (await FastClickUtil.isMinDelayTime()) {
return
... ... @@ -92,7 +100,7 @@ export default class InsightIntentExecutorImpl extends InsightIntentExecutor {
ToastUtils.showToast('暂无早晚报信息', 1000)
}
}).catch((err: string) => {
console.log('yzlerr',JSON.stringify(err))
console.log('yzlerr', JSON.stringify(err))
ToastUtils.showToast('暂无早晚报信息', 1000)
})
} else {
... ...