张善主

Merge remote-tracking branch 'origin/main'

@@ -68,8 +68,8 @@ export struct MorningEveningPaperComponent { @@ -68,8 +68,8 @@ export struct MorningEveningPaperComponent {
68 @Provide progressVal: number = 0; 68 @Provide progressVal: number = 0;
69 @State mixedBgColor: string = '' 69 @State mixedBgColor: string = ''
70 // 顶部安全高度赋值 70 // 顶部安全高度赋值
71 - @State topSafeHeight: number = 0;  
72 - @State bottomSafeHeight: number = 0; 71 + @State topSafeHeight: number = px2vp(AppStorage.get<number>('topSafeHeight') || 0)
  72 + @State bottomSafeHeight: number = px2vp(AppStorage.get<number>('bottomSafeHeight') || 0)
73 @State isHasTopView: boolean = false; 73 @State isHasTopView: boolean = false;
74 @State scrollOffset: number = 0 74 @State scrollOffset: number = 0
75 @State currentStatus: number | string |undefined = 0; 75 @State currentStatus: number | string |undefined = 0;
@@ -121,11 +121,11 @@ export struct MorningEveningPaperComponent { @@ -121,11 +121,11 @@ export struct MorningEveningPaperComponent {
121 } 121 }
122 122
123 async aboutToAppear() { 123 async aboutToAppear() {
124 - let windowHight: window.Window = await window.getLastWindow(getContext(this)); 124 + // let windowHight: window.Window = await window.getLastWindow(getContext(this));
125 // await windowHight.setWindowLayoutFullScreen(true); 125 // await windowHight.setWindowLayoutFullScreen(true);
126 // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) 126 // WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
127 - this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height)  
128 - this.bottomSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height) 127 + // this.topSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).topRect.height)
  128 + // this.bottomSafeHeight = px2vp(windowHight.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM).bottomRect.height)
129 129
130 const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String 130 const dailyPaperTopicPageId = await SPHelper.default.getSync('dailyPaperTopicPageId', "") as String
131 console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId) 131 console.info(TAG, `aboutToAppear = ` + dailyPaperTopicPageId)
@@ -331,13 +331,14 @@ export struct MorningEveningPaperComponent { @@ -331,13 +331,14 @@ export struct MorningEveningPaperComponent {
331 .height('100%') 331 .height('100%')
332 .objectFit(ImageFit.Contain) 332 .objectFit(ImageFit.Contain)
333 Image($r('app.media.icon_listen')) 333 Image($r('app.media.icon_listen'))
334 - .width(24)  
335 - .height(24)  
336 - .margin({ left: 10 }) 334 + .width(20)
  335 + .height(20)
  336 + .margin({ left: 20 })
337 .alignSelf(ItemAlign.Start) 337 .alignSelf(ItemAlign.Start)
338 338
339 Text(`${this.pageInfoBean.topicInfo?.topicPattern === 1 ? '早上好' : this.pageInfoBean.topicInfo?.topicPattern === 2 ? '中午好' : '晚上好'}, 请收听今日新闻播报`) 339 Text(`${this.pageInfoBean.topicInfo?.topicPattern === 1 ? '早上好' : this.pageInfoBean.topicInfo?.topicPattern === 2 ? '中午好' : '晚上好'}, 请收听今日新闻播报`)
340 .fontSize(14) 340 .fontSize(14)
  341 + .fontWeight(FontWeight.Medium)
341 .margin({ left: 50 }) 342 .margin({ left: 50 })
342 .fontColor(Color.Black) 343 .fontColor(Color.Black)
343 .maxLines(1) 344 .maxLines(1)
@@ -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 || '',
@@ -109,6 +109,7 @@ export struct HomePageBottomFollowComponent { @@ -109,6 +109,7 @@ export struct HomePageBottomFollowComponent {
109 CustomPullToRefresh({ 109 CustomPullToRefresh({
110 alldata:this.data_follow, 110 alldata:this.data_follow,
111 scroller:this.scroller, 111 scroller:this.scroller,
  112 + hasMore:this.hasMore,
112 customList:()=>{ 113 customList:()=>{
113 this.ListLayout() 114 this.ListLayout()
114 }, 115 },
@@ -128,6 +129,7 @@ export struct HomePageBottomFollowComponent { @@ -128,6 +129,7 @@ export struct HomePageBottomFollowComponent {
128 this.isLoading = true 129 this.isLoading = true
129 //加载分页数据 130 //加载分页数据
130 this.getNewPageData() 131 this.getNewPageData()
  132 + if(resolve) resolve('刷新成功')
131 } 133 }
132 } 134 }
133 }) 135 })
@@ -197,7 +199,7 @@ export struct HomePageBottomFollowComponent { @@ -197,7 +199,7 @@ export struct HomePageBottomFollowComponent {
197 199
198 getMyFollowListDetail() { 200 getMyFollowListDetail() {
199 if (this.hasMore) { 201 if (this.hasMore) {
200 - let object = new FollowListDetailRequestItem(-1, 20, this.curPageNum) 202 + let object = new FollowListDetailRequestItem(-1, 10, this.curPageNum)
201 203
202 MinePageDatasModel.getMineFollowListData(object, getContext(this)).then((value) => { 204 MinePageDatasModel.getMineFollowListData(object, getContext(this)).then((value) => {
203 if (this.curPageNum === 1) this.data_follow.clear() 205 if (this.curPageNum === 1) this.data_follow.clear()
@@ -222,7 +224,7 @@ export struct HomePageBottomFollowComponent { @@ -222,7 +224,7 @@ export struct HomePageBottomFollowComponent {
222 }) 224 })
223 this.data_follow.notifyDataReload() 225 this.data_follow.notifyDataReload()
224 this.count = this.data_follow.totalCount() 226 this.count = this.data_follow.totalCount()
225 - if (this.data_follow.totalCount() < value.totalCount) { 227 + if (value.hasNext === 1) {
226 this.curPageNum++ 228 this.curPageNum++
227 } else { 229 } else {
228 this.hasMore = false 230 this.hasMore = false
@@ -70,6 +70,7 @@ export struct OtherHomePageBottomFollowComponent{ @@ -70,6 +70,7 @@ export struct OtherHomePageBottomFollowComponent{
70 CustomPullToRefresh({ 70 CustomPullToRefresh({
71 alldata:this.data_follow, 71 alldata:this.data_follow,
72 scroller:this.scroller, 72 scroller:this.scroller,
  73 + hasMore:this.hasMore,
73 customList:()=>{ 74 customList:()=>{
74 this.ListLayout() 75 this.ListLayout()
75 }, 76 },
@@ -89,6 +90,7 @@ export struct OtherHomePageBottomFollowComponent{ @@ -89,6 +90,7 @@ export struct OtherHomePageBottomFollowComponent{
89 this.isLoading = true 90 this.isLoading = true
90 //加载分页数据 91 //加载分页数据
91 this.getNewPageData() 92 this.getNewPageData()
  93 + if(resolve) resolve('刷新成功')
92 } 94 }
93 } 95 }
94 }) 96 })
@@ -160,7 +162,7 @@ export struct OtherHomePageBottomFollowComponent{ @@ -160,7 +162,7 @@ export struct OtherHomePageBottomFollowComponent{
160 this.isLoading = true 162 this.isLoading = true
161 //关注列表 163 //关注列表
162 if(this.hasMore){ 164 if(this.hasMore){
163 - let object = new UserFollowListRequestItem(Number(this.curUserId),20,this.curPageNum,"1") 165 + let object = new UserFollowListRequestItem(Number(this.curUserId),10,this.curPageNum,"1")
164 166
165 MinePageDatasModel.getOtherUserFollowListData(object,getContext(this)).then((value)=>{ 167 MinePageDatasModel.getOtherUserFollowListData(object,getContext(this)).then((value)=>{
166 168
@@ -186,7 +188,7 @@ export struct OtherHomePageBottomFollowComponent{ @@ -186,7 +188,7 @@ export struct OtherHomePageBottomFollowComponent{
186 this.data_follow.notifyDataReload() 188 this.data_follow.notifyDataReload()
187 this.count = this.data_follow.totalCount() 189 this.count = this.data_follow.totalCount()
188 190
189 - if (this.data_follow.totalCount() < value.totalCount) { 191 + if (value.hasNext === 1) {
190 this.curPageNum++ 192 this.curPageNum++
191 }else { 193 }else {
192 this.hasMore = false 194 this.hasMore = false
@@ -665,7 +665,7 @@ export struct PaperSingleColumn999CardView { @@ -665,7 +665,7 @@ export struct PaperSingleColumn999CardView {
665 buildSourceString(): string { 665 buildSourceString(): string {
666 let contentString: string = '' 666 let contentString: string = ''
667 if (this.item?.rmhInfo?.rmhName.length > 0) { 667 if (this.item?.rmhInfo?.rmhName.length > 0) {
668 - contentString = this.item?.rmhInfo?.rmhName 668 + // contentString = this.item?.rmhInfo?.rmhName
669 }else if(this.item?.source.length > 0){ 669 }else if(this.item?.source.length > 0){
670 contentString = this.item?.source 670 contentString = this.item?.source
671 } 671 }
1 import { TopNavDTO } from 'wdBean'; 1 import { TopNavDTO } from 'wdBean';
2 import curves from '@ohos.curves'; 2 import curves from '@ohos.curves';
  3 +import { Logger } from 'wdKit/Index';
3 4
4 const INDEX_SETTING_TITLE: string = '首页设置' 5 const INDEX_SETTING_TITLE: string = '首页设置'
5 const INDEX_SETTING_SUBTITLE: string = '将指定频道设置为首页' 6 const INDEX_SETTING_SUBTITLE: string = '将指定频道设置为首页'
@@ -12,7 +13,9 @@ const MORE_CHANNEL: string = '更多频道' @@ -12,7 +13,9 @@ const MORE_CHANNEL: string = '更多频道'
12 const LOCAL_CHANNEL: string = '地方频道' 13 const LOCAL_CHANNEL: string = '地方频道'
13 14
14 const TAG: string = 'ChannelSubscriptionLayout' 15 const TAG: string = 'ChannelSubscriptionLayout'
  16 +
15 export { ChannelSubscriptionLayout } 17 export { ChannelSubscriptionLayout }
  18 +
16 @Component 19 @Component
17 struct ChannelSubscriptionLayout { 20 struct ChannelSubscriptionLayout {
18 @State indexSettingArray: string [] = ['推荐', '热点'] 21 @State indexSettingArray: string [] = ['推荐', '热点']
@@ -20,14 +23,14 @@ struct ChannelSubscriptionLayout { @@ -20,14 +23,14 @@ struct ChannelSubscriptionLayout {
20 @Link currentTopNavSelectedIndex: number; 23 @Link currentTopNavSelectedIndex: number;
21 @Prop homeChannelList: TopNavDTO [] 24 @Prop homeChannelList: TopNavDTO []
22 // 我的频道栏目的频道信息数组 25 // 我的频道栏目的频道信息数组
23 - @Link myChannelList: TopNavDTO [] 26 + @Link @Watch('changeMyChannelData') myChannelList: TopNavDTO []
24 // 更多频道栏目频道信息数组 27 // 更多频道栏目频道信息数组
25 @Link moreChannelList: TopNavDTO [] 28 @Link moreChannelList: TopNavDTO []
26 // 地方频道栏目频道信息数组 29 // 地方频道栏目频道信息数组
27 @Link localChannelList: TopNavDTO [] 30 @Link localChannelList: TopNavDTO []
28 // 收集到的我的频道栏目中的频道id 31 // 收集到的我的频道栏目中的频道id
29 @State channelIds: number [] = [] 32 @State channelIds: number [] = []
30 - 33 + // 是否显示频道编辑页面
31 @State isShow: boolean = false 34 @State isShow: boolean = false
32 @State dragItem: number = -1 35 @State dragItem: number = -1
33 private dragRefOffsetX: number = 0 36 private dragRefOffsetX: number = 0
@@ -38,17 +41,17 @@ struct ChannelSubscriptionLayout { @@ -38,17 +41,17 @@ struct ChannelSubscriptionLayout {
38 private FIX_VP_Y: number = 48 41 private FIX_VP_Y: number = 48
39 @State indexSettingChannelId: number = AppStorage.get<number>('indexSettingChannelId') || 2002 42 @State indexSettingChannelId: number = AppStorage.get<number>('indexSettingChannelId') || 2002
40 @State isEditIng: boolean = false 43 @State isEditIng: boolean = false
41 - // @State currentTopNavSelectedItem: TopNavDTO = {} as TopNavDTO 44 + // 顶部导航栏是否有临时跳转频道数据不
  45 + @Prop haveTempTabData: boolean
  46 +
42 changeTab: (index: number) => void = () => { 47 changeTab: (index: number) => void = () => {
43 } 48 }
44 49
45 aboutToAppear() { 50 aboutToAppear() {
46 - // this.currentTopNavSelectedItem = this.myChannelList[this.currentTopNavSelectedIndex]  
47 - this.myChannelList.forEach(item => {  
48 - if(item != undefined && item.channelId != undefined){  
49 - this.channelIds.push(item.channelId)  
50 - }  
51 - }) 51 + this.changeMyChannelData()
  52 + }
  53 +
  54 + aboutToDisappear(): void {
52 } 55 }
53 56
54 //交换我的频道数组中的位置 57 //交换我的频道数组中的位置
@@ -79,24 +82,22 @@ struct ChannelSubscriptionLayout { @@ -79,24 +82,22 @@ struct ChannelSubscriptionLayout {
79 82
80 83
81 // 删除频道的索引值大于 我的栏目中频道最大索引值 84 // 删除频道的索引值大于 我的栏目中频道最大索引值
82 - if(this.currentTopNavSelectedIndex > this.channelIds.length-1){ 85 + if (this.currentTopNavSelectedIndex > this.channelIds.length - 1) {
83 //使用默认频道 86 //使用默认频道
84 //缓存首页频道 87 //缓存首页频道
85 let index = this.myChannelList.findIndex(_item => _item?.channelId === this.indexSettingChannelId) 88 let index = this.myChannelList.findIndex(_item => _item?.channelId === this.indexSettingChannelId)
86 - console.debug('TopNavigationComponent','index='+index)  
87 if (index > -1) { 89 if (index > -1) {
88 this.currentTopNavSelectedIndex = index 90 this.currentTopNavSelectedIndex = index
89 } 91 }
90 - }else {  
91 - //检测删除频道后的当前频道是否是特殊频道  
92 - let item = this.myChannelList[this.currentTopNavSelectedIndex]  
93 - if(this.isBroadcast(item) || this.isLayout(item)){ 92 + } else {
  93 + //检测删除频道后的当前频道是否是特殊频道
  94 + let item = this.myChannelList[this.currentTopNavSelectedIndex]
  95 + if (this.isBroadcast(item) || this.isLayout(item)) {
94 96
95 this.changeTab(this.currentTopNavSelectedIndex) 97 this.changeTab(this.currentTopNavSelectedIndex)
96 this.isShow = false 98 this.isShow = false
97 99
98 let index = this.myChannelList.findIndex(_item => _item?.channelId === this.indexSettingChannelId) 100 let index = this.myChannelList.findIndex(_item => _item?.channelId === this.indexSettingChannelId)
99 - console.debug('TopNavigationComponent','index='+index)  
100 if (index > -1) { 101 if (index > -1) {
101 this.currentTopNavSelectedIndex = index 102 this.currentTopNavSelectedIndex = index
102 this.changeTab(this.currentTopNavSelectedIndex) 103 this.changeTab(this.currentTopNavSelectedIndex)
@@ -129,6 +130,9 @@ struct ChannelSubscriptionLayout { @@ -129,6 +130,9 @@ struct ChannelSubscriptionLayout {
129 this.channelIds.push(item.channelId) 130 this.channelIds.push(item.channelId)
130 this.myChannelList.push(item) 131 this.myChannelList.push(item)
131 AppStorage.setOrCreate('channelIds', this.channelIds.join(',')) 132 AppStorage.setOrCreate('channelIds', this.channelIds.join(','))
  133 +
  134 + // let storageChannelIds: string = AppStorage.get<string>('channelIds') || ''
  135 + // console.debug('TopNavigationComponent', 'addChannelItem==>' + storageChannelIds)
132 } 136 }
133 137
134 itemMove(index: number, newIndex: number): void { 138 itemMove(index: number, newIndex: number): void {
@@ -273,6 +277,7 @@ struct ChannelSubscriptionLayout { @@ -273,6 +277,7 @@ struct ChannelSubscriptionLayout {
273 .width(24) 277 .width(24)
274 .onClick(() => { 278 .onClick(() => {
275 this.isShow = false 279 this.isShow = false
  280 + this.isEditIng = false
276 }) 281 })
277 } 282 }
278 .width('100%') 283 .width('100%')
@@ -566,8 +571,39 @@ struct ChannelSubscriptionLayout { @@ -566,8 +571,39 @@ struct ChannelSubscriptionLayout {
566 .backgroundColor(Color.White) 571 .backgroundColor(Color.White)
567 .onClick(() => { 572 .onClick(() => {
568 this.isShow = true 573 this.isShow = true
  574 + if(this.haveTempTabData){
  575 + // 存储数据
  576 + AppStorage.setOrCreate('channelIds', this.channelIds.join(','))
  577 + this.haveTempTabData = false
  578 + }
569 }) 579 })
570 - .bindContentCover(this.isShow, this.sheetBuilder()) 580 + .bindContentCover(this.isShow, this.sheetBuilder(), {
  581 + modalTransition: ModalTransition.DEFAULT,
  582 + onWillAppear: () => {console.log("BindContentCover onWillAppear.")},
  583 + onAppear: () => {console.log("BindContentCover onAppear.")},
  584 + onWillDisappear: () => {console.log("BindContentCover onWillDisappear.")
  585 + this.isShow = false
  586 + this.isEditIng = false},
  587 + onDisappear: () => {console.log("BindContentCover onDisappear.")
  588 + }
  589 + })
  590 + }
  591 +
  592 +
  593 +
  594 + /**
  595 + * 改变我的频道栏目中频道id数据
  596 + */
  597 + changeMyChannelData() {
  598 +
  599 + this.channelIds = []
  600 + this.myChannelList.forEach(item => {
  601 + if (item != undefined && item.channelId != undefined) {
  602 + this.channelIds.push(item.channelId)
  603 + }
  604 + })
  605 + // console.debug('TopNavigationComponent', '--changeMyChannelData channelIds--->' + this.channelIds.join(','))
  606 +
571 } 607 }
572 } 608 }
573 609
@@ -64,6 +64,8 @@ export struct TopNavigationComponentNew { @@ -64,6 +64,8 @@ export struct TopNavigationComponentNew {
64 @State indicatorLeftMargin: number = 0 64 @State indicatorLeftMargin: number = 0
65 @State indicatorWidth: number = 0 65 @State indicatorWidth: number = 0
66 @State isClickMorningEveningPaper: boolean = false 66 @State isClickMorningEveningPaper: boolean = false
  67 + // 顶部导航栏是否有临时跳转频道数据不
  68 + @State haveTempTabData : boolean = false
67 69
68 build() { 70 build() {
69 Column() { 71 Column() {
@@ -215,6 +217,7 @@ export struct TopNavigationComponentNew { @@ -215,6 +217,7 @@ export struct TopNavigationComponentNew {
215 myChannelList: $myChannelList, 217 myChannelList: $myChannelList,
216 moreChannelList: $moreChannelList, 218 moreChannelList: $moreChannelList,
217 localChannelList: $localChannelList, 219 localChannelList: $localChannelList,
  220 + haveTempTabData:this.haveTempTabData,
218 changeTab: (index) => { 221 changeTab: (index) => {
219 this.channelJumpToPage(index) 222 this.channelJumpToPage(index)
220 } 223 }
@@ -346,12 +349,11 @@ export struct TopNavigationComponentNew { @@ -346,12 +349,11 @@ export struct TopNavigationComponentNew {
346 }) 349 })
347 } 350 }
348 351
349 -  
350 /** 352 /**
351 * 频道信息跳转页面方法 353 * 频道信息跳转页面方法
352 * @param index 354 * @param index
353 */ 355 */
354 - private channelJumpToPage(index :number){ 356 + private channelJumpToPage(index: number) {
355 if (this.isBroadcastByIndex(index)) { 357 if (this.isBroadcastByIndex(index)) {
356 // 跳转到播报页面 358 // 跳转到播报页面
357 ProcessUtils.gotoBroadcastPage(this.myChannelList[index].pageId) 359 ProcessUtils.gotoBroadcastPage(this.myChannelList[index].pageId)
@@ -375,104 +377,6 @@ export struct TopNavigationComponentNew { @@ -375,104 +377,6 @@ export struct TopNavigationComponentNew {
375 this.listScroller.scrollToIndex(index, true, ScrollAlign.CENTER) 377 this.listScroller.scrollToIndex(index, true, ScrollAlign.CENTER)
376 } 378 }
377 379
378 - //处理新闻tab顶导频道数据  
379 - topNavListHandle() {  
380 - let cityName = SPHelper.default.getSync(SpConstants.LOCATION_CITY_NAME, '') as string  
381 - let _myChannelList: TopNavDTO [] = []  
382 - let _storageChannelIds: string [] = [] //list1  
383 - let defaultMyChannelList: TopNavDTO[] = []  
384 - let defaultList = [...this.topNavList]  
385 - defaultList.sort((a, b) => {  
386 - return a.num - b.num;  
387 - });  
388 -  
389 - //defaultMyChannelList  
390 - defaultList.forEach(item => {  
391 - if (item.defaultPermitted === 1 || item.movePermitted === 0 || item.delPermitted === 0 ||  
392 - item.headlinesOn === 1) {  
393 - defaultMyChannelList.push(item);  
394 - }  
395 - if (item.defaultPermitted === 1) {  
396 - this.homeChannelList.push(item)  
397 - }  
398 - })  
399 -  
400 - //有缓存频道id  
401 - if (this.storageChannelIds) {  
402 - _storageChannelIds = this.storageChannelIds.split(',')  
403 - }  
404 -  
405 - defaultMyChannelList.forEach(item => {  
406 - item.myChannel = '1'  
407 - if (item.defaultPermitted === 1) {  
408 - item.homeChannel = '1'  
409 - }  
410 - let index = defaultList.findIndex(_item => _item.channelId === item.channelId)  
411 - if (index !== -1) {  
412 - defaultList.splice(index, 1)  
413 - }  
414 - })  
415 - defaultList.unshift(...defaultMyChannelList)  
416 - defaultList.forEach((item, index) => {  
417 - if (item.channelType === 2) {  
418 - if (cityName.includes(item.name)) {  
419 - item.myChannel = '1'  
420 - }  
421 - item.localChannel = '1'  
422 - }  
423 - if (index >= 11) {  
424 - if (item.channelType === 1) {  
425 - item.moreChannel = '1'  
426 - }  
427 - } else {  
428 - if (item.channelType === 1 && item.myChannel !== '1') {  
429 - item.moreChannel = '1'  
430 - }  
431 - }  
432 - if (this.storageChannelIds && _storageChannelIds.includes(String(item.channelId))) {  
433 - item.myChannel = '1'  
434 - }  
435 - //频道分类  
436 - //TODO 暂时隐藏播报  
437 - if (item.name !== '播报') {  
438 - if (item.myChannel === '1') {  
439 - _myChannelList.push(item)  
440 - }  
441 - if (item.moreChannel === '1' && item.myChannel !== '1') {  
442 - this.moreChannelList.push(item)  
443 - }  
444 - if (item.localChannel === '1' && item.myChannel !== '1') {  
445 - this.localChannelList.push(item)  
446 - }  
447 - }  
448 - })  
449 -  
450 - //根据缓存数组排序  
451 - if (this.storageChannelIds) {  
452 - let sortedyChannelList = _myChannelList.sort((item1, item2) => {  
453 - let index1 = this.storageChannelIds.indexOf(String(item1.channelId));  
454 - let index2 = this.storageChannelIds.indexOf(String(item2.channelId));  
455 - return index1 - index2;  
456 - });  
457 - _myChannelList = sortedyChannelList  
458 - }  
459 -  
460 -  
461 - if (cityName) {  
462 - let index = _myChannelList.findIndex(ele => cityName.includes(ele.name))  
463 - const localChannelitem = _myChannelList.splice(index, 1)[0];  
464 - // 将当前地区频道插入到第四个  
465 - _myChannelList.splice(3, 0, localChannelitem);  
466 - }  
467 -  
468 - this.myChannelList = _myChannelList  
469 -  
470 - //缓存首页频道  
471 - let index = this.myChannelList.findIndex(_item => _item?.channelId === this.indexSettingChannelId)  
472 - if (index > -1) {  
473 - this.currentTopNavSelectedIndex = index  
474 - }  
475 - }  
476 380
477 /** 381 /**
478 * 频道是播报 382 * 频道是播报
@@ -517,12 +421,24 @@ export struct TopNavigationComponentNew { @@ -517,12 +421,24 @@ export struct TopNavigationComponentNew {
517 return item?.channelType === 3 421 return item?.channelType === 3
518 } 422 }
519 423
520 - aboutToAppear() {  
521 - //处理新闻tab顶导频道数据  
522 - this.topNavListHandle()  
523 - this.changePage(this.currentTopNavSelectedIndex) 424 + async aboutToAppear() {
  425 +
  426 +
  427 + if (CompUtils.isNews(this.navItem)) {
  428 +
  429 + // 请求顶导网络数据
  430 + this.getTopNavList(this.navItem.id)
  431 +
  432 + } else {
  433 + // if(CompUtils.isNews(this.navItem)){
  434 + // //处理新闻tab顶导频道数据
  435 + // this.topNavListHandle()
  436 + // }
  437 +
  438 + this.changePage(this.currentTopNavSelectedIndex)
  439 + }
  440 +
524 441
525 - this.getTopNavList(this.navItem.id)  
526 } 442 }
527 443
528 onTopNavigationDataUpdated() { 444 onTopNavigationDataUpdated() {
@@ -534,7 +450,6 @@ export struct TopNavigationComponentNew { @@ -534,7 +450,6 @@ export struct TopNavigationComponentNew {
534 * 450 *
535 */ 451 */
536 updateCurrentTopNavSelectedIndex() { 452 updateCurrentTopNavSelectedIndex() {
537 - console.debug(TAG, 'updateCurrentTopNavSelectedIndex=>' + this.currentTopNavSelectedIndex)  
538 if (CompUtils.isNews(this.navItem)) { 453 if (CompUtils.isNews(this.navItem)) {
539 const tab = this.myChannelList[this.currentTopNavSelectedIndex] 454 const tab = this.myChannelList[this.currentTopNavSelectedIndex]
540 // 埋点 455 // 埋点
@@ -583,10 +498,12 @@ export struct TopNavigationComponentNew { @@ -583,10 +498,12 @@ export struct TopNavigationComponentNew {
583 * 频道id变化,即指定频道跳转场景 498 * 频道id变化,即指定频道跳转场景
584 */ 499 */
585 onAssignChannelChange() { 500 onAssignChannelChange() {
  501 +
586 if (!this.isCurrentPage()) { 502 if (!this.isCurrentPage()) {
587 return 503 return
588 } 504 }
589 let channelId = this.assignChannel.channelId 505 let channelId = this.assignChannel.channelId
  506 +
590 let index = -1 507 let index = -1
591 if (this._currentNavIndex === 0) { 508 if (this._currentNavIndex === 0) {
592 // 第一个,新闻,先拿我的,再拿其他 509 // 第一个,新闻,先拿我的,再拿其他
@@ -640,6 +557,7 @@ export struct TopNavigationComponentNew { @@ -640,6 +557,7 @@ export struct TopNavigationComponentNew {
640 return -1 557 return -1
641 } 558 }
642 559
  560 +
643 /** 561 /**
644 * 新闻,从其他里拿数据 562 * 新闻,从其他里拿数据
645 */ 563 */
@@ -647,19 +565,22 @@ export struct TopNavigationComponentNew { @@ -647,19 +565,22 @@ export struct TopNavigationComponentNew {
647 for (let i = 0; i < this.moreChannelList.length; i++) { 565 for (let i = 0; i < this.moreChannelList.length; i++) {
648 let topNavDTO: TopNavDTO = this.moreChannelList[i] 566 let topNavDTO: TopNavDTO = this.moreChannelList[i]
649 if (topNavDTO.channelId?.toString() === channelId) { 567 if (topNavDTO.channelId?.toString() === channelId) {
  568 + this.moreChannelList.splice(i,1)
  569 + this.haveTempTabData = true
650 return topNavDTO 570 return topNavDTO
651 } 571 }
652 } 572 }
653 for (let j = 0; j < this.localChannelList.length; j++) { 573 for (let j = 0; j < this.localChannelList.length; j++) {
654 let topNavDTO: TopNavDTO = this.localChannelList[j] 574 let topNavDTO: TopNavDTO = this.localChannelList[j]
655 if (topNavDTO.channelId?.toString() === channelId) { 575 if (topNavDTO.channelId?.toString() === channelId) {
  576 + this.localChannelList.splice(j,1)
  577 + this.haveTempTabData = true
656 return topNavDTO 578 return topNavDTO
657 } 579 }
658 } 580 }
659 return null 581 return null
660 } 582 }
661 583
662 -  
663 /** 584 /**
664 * 进入早晚报专题 585 * 进入早晚报专题
665 */ 586 */
@@ -704,11 +625,131 @@ export struct TopNavigationComponentNew { @@ -704,11 +625,131 @@ export struct TopNavigationComponentNew {
704 625
705 //请求顶导数据 626 //请求顶导数据
706 async getTopNavList(id: number) { 627 async getTopNavList(id: number) {
707 - let bottomNavDetail = await ChannelViewModel.getBottomNavDetailData(id) 628 +
  629 + Logger.debug(TAG, 'getTopNavList==>' + this.storageChannelIds)
  630 +
  631 + let bottomNavDetail = await ChannelViewModel.getBottomNavDetailData(id, this.storageChannelIds)
708 let topNavList = bottomNavDetail?.topNavChannelList || [] 632 let topNavList = bottomNavDetail?.topNavChannelList || []
709 - // for (let topNav of topNavList) {  
710 - // console.debug(TAG, 'getTopNavList=>' + JSON.stringify(topNav))  
711 - // 633 +
  634 + let cityName = SPHelper.default.getSync(SpConstants.LOCATION_CITY_NAME, '') as string
  635 + let _myChannelList: TopNavDTO [] = []
  636 + let _storageChannelIds: string [] = [] //list1
  637 + let defaultMyChannelList: TopNavDTO[] = []
  638 + let defaultList = [...topNavList]
  639 +
  640 + Logger.debug(TAG, 'cityName=>' + cityName)
  641 + // 排序
  642 + defaultList.sort((a, b) => {
  643 + return a.num - b.num;
  644 + });
  645 +
  646 + //defaultMyChannelList
  647 + defaultList.forEach(item => {
  648 + if (item.defaultPermitted === 1 || item.movePermitted === 0 || item.delPermitted === 0 ||
  649 + item.headlinesOn === 1) {
  650 + defaultMyChannelList.push(item);
  651 + }
  652 + if (item.defaultPermitted === 1) {
  653 + this.homeChannelList.push(item)
  654 + }
  655 + })
  656 +
  657 + //有缓存频道id
  658 + if (this.storageChannelIds) {
  659 + _storageChannelIds = this.storageChannelIds.split(',')
  660 +
  661 + }
  662 +
  663 + defaultMyChannelList.forEach(item => {
  664 + item.myChannel = '1'
  665 + if (item.defaultPermitted === 1) {
  666 + item.homeChannel = '1'
  667 + }
  668 + let index = defaultList.findIndex(_item => _item.channelId === item.channelId)
  669 + if (index !== -1) {
  670 + defaultList.splice(index, 1)
  671 + }
  672 + })
  673 + defaultList.unshift(...defaultMyChannelList)
  674 +
  675 + defaultList.forEach((item, index) => {
  676 + if (item.channelType === 2) {
  677 + if (cityName.includes(item.name)) {
  678 + item.myChannel = '1'
  679 + }
  680 + item.localChannel = '1'
  681 + }
  682 + if (index >= 11) {
  683 + if (item.channelType === 1) {
  684 + item.moreChannel = '1'
  685 + }
  686 + } else {
  687 + if (item.channelType === 1 && item.myChannel !== '1') {
  688 + item.moreChannel = '1'
  689 + }
  690 + }
  691 + if (this.storageChannelIds && _storageChannelIds.includes(String(item.channelId))) {
  692 + item.myChannel = '1'
  693 + }
  694 + //频道分类
  695 + //TODO 暂时隐藏播报
  696 + if (item.name !== '播报') {
  697 + if (item.myChannel === '1') {
  698 + _myChannelList.push(item)
  699 + }
  700 + if (item.moreChannel === '1' && item.myChannel !== '1') {
  701 + this.moreChannelList.push(item)
  702 + }
  703 + if (item.localChannel === '1' && item.myChannel !== '1') {
  704 + this.localChannelList.push(item)
  705 + }
  706 + }
  707 + })
  708 +
  709 + //根据缓存数组排序
  710 + if (this.storageChannelIds) {
  711 +
  712 + // let sortedyChannelList: TopNavDTO [] = []
  713 + //
  714 + // _storageChannelIds.forEach((channelId) => {
  715 + // console.debug(TAG, 'getTopNavList=0=>' + channelId)
  716 + // for (let a of _myChannelList) {
  717 + //
  718 + // console.debug(TAG,
  719 + // 'getTopNavList=1=>' + channelId + ' ' + a.channelId + ' ' + (channelId == String(a.channelId)))
  720 + // if (channelId == String(a.channelId)) {
  721 + // sortedyChannelList.push(a)
  722 + // break;
  723 + // }
  724 + // }
  725 + //
  726 + // })
  727 +
  728 + let sortedyChannelList = _myChannelList.sort((item1, item2) => {
  729 + let index1 = this.storageChannelIds.indexOf(String(item1.channelId));
  730 + let index2 = this.storageChannelIds.indexOf(String(item2.channelId));
  731 + return index1 - index2;
  732 + });
  733 + _myChannelList = sortedyChannelList
  734 + }
  735 +
  736 + Logger.debug(TAG,'cityName===>'+cityName)
  737 + // if (cityName) {
  738 + // let index = _myChannelList.findIndex(ele => cityName.includes(ele.name))
  739 + // Logger.debug(TAG,'index===>'+index)
  740 + // const localChannelitem = _myChannelList.splice(index, 1)[0];
  741 + // // 将当前地区频道插入到第四个
  742 + // _myChannelList.splice(3, 0, localChannelitem);
  743 + // //_myChannelList[3] = localChannelitem
712 // } 744 // }
  745 +
  746 + this.myChannelList = _myChannelList
  747 +
  748 +
  749 + //缓存首页频道
  750 + let index = this.myChannelList.findIndex(_item => _item?.channelId === this.indexSettingChannelId)
  751 + if (index > -1) {
  752 + this.currentTopNavSelectedIndex = index
  753 + }
713 } 754 }
714 } 755 }
@@ -346,7 +346,9 @@ export struct SearchResultContentComponent { @@ -346,7 +346,9 @@ export struct SearchResultContentComponent {
346 }.offset({ left: this.listLeft }) 346 }.offset({ left: this.listLeft })
347 347
348 ListItem(){ 348 ListItem(){
349 - this.itemEnd() 349 + if (this.data_rmh.length === 10){
  350 + this.itemEnd()
  351 + }
350 }.height('100%') 352 }.height('100%')
351 .margin({left:'23lpx'}) 353 .margin({left:'23lpx'})
352 } 354 }
@@ -375,6 +377,8 @@ export struct SearchResultContentComponent { @@ -375,6 +377,8 @@ export struct SearchResultContentComponent {
375 console.info(TAG,'Pan start') 377 console.info(TAG,'Pan start')
376 }) 378 })
377 .onActionUpdate((event: GestureEvent) => { 379 .onActionUpdate((event: GestureEvent) => {
  380 + ///小于10个不展示滑动
  381 + if (this.data_rmh.length < 10) return;
378 if (event && this.isEnd) { 382 if (event && this.isEnd) {
379 // console.log('event.offsetX',event.offsetX) 383 // console.log('event.offsetX',event.offsetX)
380 this.listLeft = event.offsetX < -60 ? -60 : event.offsetX > 0 ? 0 : event.offsetX 384 this.listLeft = event.offsetX < -60 ? -60 : event.offsetX > 0 ? 0 : event.offsetX
@@ -384,6 +388,7 @@ export struct SearchResultContentComponent { @@ -384,6 +388,7 @@ export struct SearchResultContentComponent {
384 } 388 }
385 }) 389 })
386 .onActionEnd((event: GestureEvent) => { 390 .onActionEnd((event: GestureEvent) => {
  391 + if (this.data_rmh.length < 10) return;
387 console.info(TAG,'Pan end') 392 console.info(TAG,'Pan end')
388 this.listLeft = 0 393 this.listLeft = 0
389 // this.moreWidth = 20 394 // this.moreWidth = 20
@@ -226,8 +226,25 @@ export class PageRepository { @@ -226,8 +226,25 @@ export class PageRepository {
226 return WDHttp.get<ResponseDTO<NavigationBodyDTO>>(url) 226 return WDHttp.get<ResponseDTO<NavigationBodyDTO>>(url)
227 }; 227 };
228 228
229 - static fetchNavigationDetailDataApi(id:number = 210) { 229 + /**
  230 + * 获取顶导详情
  231 + * @param id
  232 + * @returns
  233 + */
  234 + static fetchNavigationDetailDataApi(id: number = 210, myChannelIds?: string) {
230 let url = PageRepository.getBottomNavGroupDetailUrl() + `?id=${id}`; 235 let url = PageRepository.getBottomNavGroupDetailUrl() + `?id=${id}`;
  236 +
  237 + let provinceCode = HttpUtils.getProvinceCode()
  238 + if (provinceCode) {
  239 + url = url + "&districtCode=" + HttpUtils.getDistrictCode()
  240 + + "&provinceCode=" + HttpUtils.getProvinceCode()
  241 + + "&cityCode=" + HttpUtils.getCityCode()
  242 + }
  243 + if (myChannelIds) {
  244 + url = url + `&channelIds=${myChannelIds}`
  245 + }
  246 +
  247 +
231 return WDHttp.get<ResponseDTO<NavigationDetailDTO>>(url) 248 return WDHttp.get<ResponseDTO<NavigationDetailDTO>>(url)
232 }; 249 };
233 250
@@ -486,5 +503,4 @@ export class PageRepository { @@ -486,5 +503,4 @@ export class PageRepository {
486 url = url + "?mliveId=" + mLiveId 503 url = url + "?mliveId=" + mLiveId
487 return WDHttp.get<ResponseDTO<boolean>>(url) 504 return WDHttp.get<ResponseDTO<boolean>>(url)
488 } 505 }
489 -  
490 } 506 }
@@ -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',
@@ -75,9 +75,9 @@ export class ChannelViewModel { @@ -75,9 +75,9 @@ export class ChannelViewModel {
75 /** 75 /**
76 * 获取底导详情(顶导)接口数据 76 * 获取底导详情(顶导)接口数据
77 */ 77 */
78 - async getBottomNavDetailData(id: number): Promise<NavigationDetailDTO> { 78 + async getBottomNavDetailData(id: number, myChannelIds?: string): Promise<NavigationDetailDTO> {
79 Logger.info(TAG, `getBottomNavDetailData start`); 79 Logger.info(TAG, `getBottomNavDetailData start`);
80 - return this.getNavDetailData(id); 80 + return this.getNavDetailData(id,myChannelIds);
81 } 81 }
82 82
83 private getNavData(): Promise<NavigationBodyDTO> { 83 private getNavData(): Promise<NavigationBodyDTO> {
@@ -105,10 +105,16 @@ export class ChannelViewModel { @@ -105,10 +105,16 @@ export class ChannelViewModel {
105 }) 105 })
106 } 106 }
107 107
108 - private getNavDetailData(id: number): Promise<NavigationDetailDTO> { 108 + /**
  109 + * 请求获取顶部导航栏数据
  110 + * @param id
  111 + * @param myChannelIds
  112 + * @returns
  113 + */
  114 + private getNavDetailData(id: number, myChannelIds?: string): Promise<NavigationDetailDTO> {
109 return new Promise<NavigationDetailDTO>((success, error) => { 115 return new Promise<NavigationDetailDTO>((success, error) => {
110 Logger.info(TAG, `getNavData start`); 116 Logger.info(TAG, `getNavData start`);
111 - PageRepository.fetchNavigationDetailDataApi(id).then((navResDTO: ResponseDTO<NavigationDetailDTO>) => { 117 + PageRepository.fetchNavigationDetailDataApi(id,myChannelIds).then((navResDTO: ResponseDTO<NavigationDetailDTO>) => {
112 if (!navResDTO || !navResDTO.data) { 118 if (!navResDTO || !navResDTO.data) {
113 Logger.error(TAG, 'getNavData then navResDTO is empty'); 119 Logger.error(TAG, 'getNavData then navResDTO is empty');
114 error('navResDTO is empty'); 120 error('navResDTO is empty');
@@ -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
@@ -50,7 +50,7 @@ struct OneKeyLoginPage { @@ -50,7 +50,7 @@ struct OneKeyLoginPage {
50 // 获取到Authorization Code 50 // 获取到Authorization Code
51 let authorizationCode = response.authorizationCode; 51 let authorizationCode = response.authorizationCode;
52 // hilog.info(0x0000, 'testTag', 'response: %{public}s', JSON.stringify(response)); 52 // hilog.info(0x0000, 'testTag', 'response: %{public}s', JSON.stringify(response));
53 - TrackingButton.click("oneClickLoginPageLoginButton", this.pageName, this.pageName) 53 + TrackingButton.click("oneClickLoginPageLoginButton", TrackConstants.PageName.OneClick_Login, TrackConstants.PageName.OneClick_Login)
54 this.requestLogin() 54 this.requestLogin()
55 return; 55 return;
56 } 56 }
@@ -58,7 +58,6 @@ struct OneKeyLoginPage { @@ -58,7 +58,6 @@ struct OneKeyLoginPage {
58 58
59 // 埋点计算页面浏览时长 59 // 埋点计算页面浏览时长
60 private pageStartDate: number = 0 60 private pageStartDate: number = 0
61 - private pageName = TrackConstants.PageName.OneClick_Login  
62 61
63 aboutToAppear(): void { 62 aboutToAppear(): void {
64 this.anonymousPhone = HuaweiAuth.sharedInstance().anonymousPhone||"" 63 this.anonymousPhone = HuaweiAuth.sharedInstance().anonymousPhone||""
@@ -70,7 +69,7 @@ struct OneKeyLoginPage { @@ -70,7 +69,7 @@ struct OneKeyLoginPage {
70 69
71 onPageHide(): void { 70 onPageHide(): void {
72 const duration = Math.floor((Date.now() - this.pageStartDate!)/1000) 71 const duration = Math.floor((Date.now() - this.pageStartDate!)/1000)
73 - TrackingPageBrowse.trackCommonPageExposureEnd(this.pageName, this.pageName, duration) 72 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.OneClick_Login, TrackConstants.PageName.OneClick_Login, duration)
74 } 73 }
75 74
76 // pageTransition() { 75 // pageTransition() {
  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 {