陈剑华

Merge remote-tracking branch 'origin/main'

Showing 17 changed files with 229 additions and 117 deletions
@@ -40,7 +40,6 @@ export struct ENewspaperItemComponent { @@ -40,7 +40,6 @@ export struct ENewspaperItemComponent {
40 Image(this.newspaperListItemBean.pagePic) 40 Image(this.newspaperListItemBean.pagePic)
41 .width(px2vp(this.itemPicWidth)) 41 .width(px2vp(this.itemPicWidth))
42 .height(px2vp(this.itemPicHeight)) 42 .height(px2vp(this.itemPicHeight))
43 - .alt($r('app.media.paper_placeholder'))  
44 .onComplete((event) => { 43 .onComplete((event) => {
45 if (event?.loadingStatus == 1) { 44 if (event?.loadingStatus == 1) {
46 this.contentWidth = event?.contentWidth 45 this.contentWidth = event?.contentWidth
@@ -50,9 +49,10 @@ export struct ENewspaperItemComponent { @@ -50,9 +49,10 @@ export struct ENewspaperItemComponent {
50 }) 49 })
51 .objectFit(ImageFit.Fill) 50 .objectFit(ImageFit.Fill)
52 .zIndex(10) 51 .zIndex(10)
53 - // newsSkeleton()  
54 - // .height('100%')  
55 - // .zIndex(1) 52 + newsSkeleton()
  53 + .visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None)
  54 + .width('100%')
  55 + .zIndex(1)
56 if (this.contentWidth !== 0) { 56 if (this.contentWidth !== 0) {
57 Canvas(this.context) 57 Canvas(this.context)
58 .width(px2vp(this.contentWidth)) 58 .width(px2vp(this.contentWidth))
@@ -145,7 +145,6 @@ export struct ENewspaperPageComponent { @@ -145,7 +145,6 @@ export struct ENewspaperPageComponent {
145 145
146 let ratio = this.ratio == '100%' ? 1 : 0.5 146 let ratio = this.ratio == '100%' ? 1 : 0.5
147 this.picWidth = this.picWidth * ratio 147 this.picWidth = this.picWidth * ratio
148 - this.picHeight = this.picHeight  
149 // 默认日期 148 // 默认日期
150 const date = new Date() 149 const date = new Date()
151 const month = date.getMonth() + 1 150 const month = date.getMonth() + 1
@@ -174,13 +173,16 @@ export struct ENewspaperPageComponent { @@ -174,13 +173,16 @@ export struct ENewspaperPageComponent {
174 173
175 resizeWindow() { 174 resizeWindow() {
176 this.windowClass?.on('windowSizeChange', () => { 175 this.windowClass?.on('windowSizeChange', () => {
  176 + this.resize()
  177 + });
  178 + }
  179 + resize() {
177 this.screenWidth = this.windowClass?.getWindowProperties()?.windowRect.width || this.displayTool.width 180 this.screenWidth = this.windowClass?.getWindowProperties()?.windowRect.width || this.displayTool.width
178 // 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件 181 // 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件
179 this.ratio = this.screenWidth > 2000 ? '50%' : '100%' 182 this.ratio = this.screenWidth > 2000 ? '50%' : '100%'
180 let ratio = this.ratio == '100%' ? 1 : 0.5 183 let ratio = this.ratio == '100%' ? 1 : 0.5
181 this.picWidth = this.screenWidth - vp2px(20) 184 this.picWidth = this.screenWidth - vp2px(20)
182 this.picWidth = this.picWidth * ratio 185 this.picWidth = this.picWidth * ratio
183 - });  
184 } 186 }
185 187
186 build() { 188 build() {
@@ -257,9 +259,10 @@ export struct ENewspaperPageComponent { @@ -257,9 +259,10 @@ export struct ENewspaperPageComponent {
257 middle: { anchor: "__container__", align: HorizontalAlign.Center } 259 middle: { anchor: "__container__", align: HorizontalAlign.Center }
258 }) 260 })
259 .id('news_skeleton_id') 261 .id('news_skeleton_id')
260 - .width('100%')  
261 - .height(px2vp(this.picHeight) + 32) 262 + .width(px2vp(this.picWidth))
  263 + .height(px2vp(this.picHeight))
262 .margin({ top: 59, left: 10, right: 10 }) 264 .margin({ top: 59, left: 10, right: 10 })
  265 + // .padding({ right: 10, left: 10 })
263 } 266 }
264 267
265 if (this.newspaperListBean && this.newspaperListBean.list && this.newspaperListBean.list.length > 0) { 268 if (this.newspaperListBean && this.newspaperListBean.list && this.newspaperListBean.list.length > 0) {
@@ -447,8 +450,7 @@ export struct ENewspaperPageComponent { @@ -447,8 +450,7 @@ export struct ENewspaperPageComponent {
447 private async getNewspaperList() { 450 private async getNewspaperList() {
448 // ENewspaperItemComponent .padding({ top:14, right: 10, bottom: 14, left: 10 }) 451 // ENewspaperItemComponent .padding({ top:14, right: 10, bottom: 14, left: 10 })
449 // 计算图片的内容宽高 452 // 计算图片的内容宽高
450 - let ratio = this.ratio == '100%' ? 1 : 0.6  
451 - this.itemPicWidth = this.picWidth * ratio - vp2px(20) 453 + this.itemPicWidth = this.picWidth - vp2px(20)
452 this.itemPicHeight = this.picHeight - vp2px(28) 454 this.itemPicHeight = this.picHeight - vp2px(28)
453 try { 455 try {
454 if (NetworkUtil.isNetConnected()) { 456 if (NetworkUtil.isNetConnected()) {
@@ -237,14 +237,13 @@ export struct MorningEveningPaperComponent { @@ -237,14 +237,13 @@ export struct MorningEveningPaperComponent {
237 if (imageSource) { 237 if (imageSource) {
238 const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource); 238 const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource);
239 effectKit.createColorPicker(pixelMap, (err, colorPicker) => { 239 effectKit.createColorPicker(pixelMap, (err, colorPicker) => {
240 - let color = colorPicker.getLargestProportionColor(); 240 + let color = colorPicker.getMainColorSync();
241 console.log(TAG, "compInfoBean compStyle = " + color) 241 console.log(TAG, "compInfoBean compStyle = " + color)
242 // color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha}) 242 // color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha})
243 // 将取色器选取的color示例转换为十六进制颜色代码 243 // 将取色器选取的color示例转换为十六进制颜色代码
244 this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16); 244 this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16);
245 console.log(TAG, "compInfoBean compStyle = " + this.mixedBgColor) 245 console.log(TAG, "compInfoBean compStyle = " + this.mixedBgColor)
246 }); 246 });
247 -  
248 } 247 }
249 } 248 }
250 249
@@ -275,7 +274,7 @@ export struct MorningEveningPaperComponent { @@ -275,7 +274,7 @@ export struct MorningEveningPaperComponent {
275 this.AudioBarView() 274 this.AudioBarView()
276 } 275 }
277 .margin({ 276 .margin({
278 - top: this.isHasTopView ? 10 : 44+this.topSafeHeight 277 + top: this.isHasTopView ? 10 : 44 + this.topSafeHeight
279 }) 278 })
280 } 279 }
281 280
@@ -328,8 +327,8 @@ export struct MorningEveningPaperComponent { @@ -328,8 +327,8 @@ export struct MorningEveningPaperComponent {
328 Stack({ alignContent: Alignment.Start }) { 327 Stack({ alignContent: Alignment.Start }) {
329 Image($r('app.media.listen_left_bg')) 328 Image($r('app.media.listen_left_bg'))
330 .width('100%') 329 .width('100%')
331 - .height('100%')  
332 - .objectFit(ImageFit.Contain) 330 + // .height('100%')
  331 + .objectFit(ImageFit.Fill)
333 Image($r('app.media.icon_listen')) 332 Image($r('app.media.icon_listen'))
334 .width(20) 333 .width(20)
335 .height(20) 334 .height(20)
@@ -98,18 +98,18 @@ export struct PaperTitleComponent { @@ -98,18 +98,18 @@ export struct PaperTitleComponent {
98 }) 98 })
99 .margin({ right: 16 }) 99 .margin({ right: 16 })
100 100
101 - Image($r('app.media.icon_share'))  
102 - .height($r('app.float.top_arrow_size'))  
103 - .width($r('app.float.top_arrow_size'))  
104 - .alignRules({  
105 - right: { anchor: "img_close", align: HorizontalAlign.Start },  
106 - center: { anchor: "__container__", align: VerticalAlign.Center }  
107 - })  
108 - .id('img_share')  
109 - .margin({ right: 16 })  
110 - .onClick(() => {  
111 - this.share()  
112 - }) 101 + // Image($r('app.media.icon_share'))
  102 + // .height($r('app.float.top_arrow_size'))
  103 + // .width($r('app.float.top_arrow_size'))
  104 + // .alignRules({
  105 + // right: { anchor: "img_close", align: HorizontalAlign.Start },
  106 + // center: { anchor: "__container__", align: VerticalAlign.Center }
  107 + // })
  108 + // .id('img_share')
  109 + // .margin({ right: 16 })
  110 + // .onClick(() => {
  111 + // this.share()
  112 + // })
113 } 113 }
114 // .margin({ left: 14, right: 14 }) 114 // .margin({ left: 14, right: 14 })
115 .height($r('app.float.top_bar_height')) 115 .height($r('app.float.top_bar_height'))
1 import { ContentDTO, FrontLinkObject } from 'wdBean'; 1 import { ContentDTO, FrontLinkObject } from 'wdBean';
  2 +import { Logger } from 'wdKit/Index';
2 import { ProcessUtils } from 'wdRouter/Index'; 3 import { ProcessUtils } from 'wdRouter/Index';
  4 +import { CommentText } from '../comment/view/CommentText';
3 5
4 /** 6 /**
5 * 早晚报,topic 7 * 早晚报,topic
@@ -69,17 +71,25 @@ export struct topicInfoView { @@ -69,17 +71,25 @@ export struct topicInfoView {
69 71
70 72
71 Row(){ 73 Row(){
72 - Text(this.frontLinkObject?.summary ?? "")  
73 - .fontSize(14)  
74 - .fontColor('#CCFFFFFF')  
75 - .maxLines(this.isExpansion?999:3)  
76 - .textOverflow({ overflow: TextOverflow.Ellipsis })  
77 74
78 - Text(this.isExpansion?'收起':'展开').onClick(()=>{  
79 - this.isExpansion = !this.isExpansion  
80 - })  
81 - .fontSize(14)  
82 - .fontColor($r('app.color.white')) 75 + CommentText({longMessage:this.frontLinkObject?.summary ?? "",fontSize:14,fontColor:'#CCFFFFFF',isMorningEveningPaper:true})
  76 + // Text(this.frontLinkObject?.summary ?? "")
  77 + // .fontSize(14)
  78 + // .fontColor('#CCFFFFFF')
  79 + // .maxLines(this.isExpansion?999:3)
  80 + // .textOverflow({ overflow: TextOverflow.Ellipsis })
  81 + // .onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => {
  82 + // Logger.debug('TAG', `当前屏幕可见区域大小: currentRatio:' +${currentRatio}`)
  83 + // if (!isVisible && currentRatio <= 0.0) {
  84 + //
  85 + // }
  86 + // })
  87 + //
  88 + // Text(this.isExpansion?'收起':'展开').onClick(()=>{
  89 + // this.isExpansion = !this.isExpansion
  90 + // })
  91 + // .fontSize(14)
  92 + // .fontColor($r('app.color.white'))
83 }.alignItems(VerticalAlign.Bottom) 93 }.alignItems(VerticalAlign.Bottom)
84 .alignRules({ 94 .alignRules({
85 left: { anchor: "__container__", align: HorizontalAlign.Start }, 95 left: { anchor: "__container__", align: HorizontalAlign.Start },
@@ -32,6 +32,7 @@ export struct CommentText { @@ -32,6 +32,7 @@ export struct CommentText {
32 fontColor: ResourceColor = $r('app.color.color_222222') 32 fontColor: ResourceColor = $r('app.color.color_222222')
33 // 测量文本宽度(单位px) 33 // 测量文本宽度(单位px)
34 @State textWidth: number = 0; 34 @State textWidth: number = 0;
  35 + isMorningEveningPaper:boolean = false
35 // constructor(longMessage?:string,) { 36 // constructor(longMessage?:string,) {
36 // super(); 37 // super();
37 // this.longMessage = longMessage; 38 // this.longMessage = longMessage;
@@ -108,6 +109,11 @@ export struct CommentText { @@ -108,6 +109,11 @@ export struct CommentText {
108 // if (this.maxLineMesssage.endsWith('\n')) { 109 // if (this.maxLineMesssage.endsWith('\n')) {
109 // this.maxLineMesssage = this.maxLineMesssage.slice(0, this.maxLineMesssage.length - 1) 110 // this.maxLineMesssage = this.maxLineMesssage.slice(0, this.maxLineMesssage.length - 1)
110 // } 111 // }
  112 +
  113 + ///早晚报三行显示 展开功能显示末尾
  114 + if (this.isMorningEveningPaper) {
  115 + this.maxLineMesssage = this.maxLineMesssage.substring(0,this.maxLineMesssage.length - 7)
  116 + }
111 break 117 break
112 } 118 }
113 this.maxLineMesssage = element; 119 this.maxLineMesssage = element;
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 +import { Logger, SPHelper } from 'wdKit/Index';
  4 +import { SpConstants } from 'wdConstant/Index';
4 5
5 const INDEX_SETTING_TITLE: string = '首页设置' 6 const INDEX_SETTING_TITLE: string = '首页设置'
6 const INDEX_SETTING_SUBTITLE: string = '将指定频道设置为首页' 7 const INDEX_SETTING_SUBTITLE: string = '将指定频道设置为首页'
@@ -43,7 +44,6 @@ struct ChannelSubscriptionLayout { @@ -43,7 +44,6 @@ struct ChannelSubscriptionLayout {
43 @State isEditIng: boolean = false 44 @State isEditIng: boolean = false
44 // 顶部导航栏是否有临时跳转频道数据不 45 // 顶部导航栏是否有临时跳转频道数据不
45 @Prop haveTempTabData: boolean 46 @Prop haveTempTabData: boolean
46 -  
47 changeTab: (index: number) => void = () => { 47 changeTab: (index: number) => void = () => {
48 } 48 }
49 49
@@ -67,9 +67,14 @@ struct ChannelSubscriptionLayout { @@ -67,9 +67,14 @@ struct ChannelSubscriptionLayout {
67 delChannelItem(index: number) { 67 delChannelItem(index: number) {
68 68
69 let item = this.myChannelList.splice(index, 1)[0] 69 let item = this.myChannelList.splice(index, 1)[0]
70 - this.channelIds.splice(index, 1) 70 + // this.channelIds.splice(index, 1)
71 AppStorage.setOrCreate('channelIds', this.channelIds.join(',')) 71 AppStorage.setOrCreate('channelIds', this.channelIds.join(','))
72 72
  73 + // 本地频道特殊处理
  74 + let provinceName = SPHelper.default.getSync(SpConstants.LOCATION_PROVINCE_NAME, '') as string
  75 + if (provinceName && provinceName.includes(item.name) && item.localChannel == '0') {
  76 + item.localChannel = '1'
  77 + }
73 /* 78 /*
74 删除的频道信息回到原栏目中去 79 删除的频道信息回到原栏目中去
75 */ 80 */
@@ -130,8 +135,8 @@ struct ChannelSubscriptionLayout { @@ -130,8 +135,8 @@ struct ChannelSubscriptionLayout {
130 this.myChannelList.push(item) 135 this.myChannelList.push(item)
131 AppStorage.setOrCreate('channelIds', this.channelIds.join(',')) 136 AppStorage.setOrCreate('channelIds', this.channelIds.join(','))
132 137
133 - let storageChannelIds: string = AppStorage.get<string>('channelIds') || ''  
134 - console.debug('TopNavigationComponent', 'addChannelItem==>' + storageChannelIds) 138 + // let storageChannelIds: string = AppStorage.get<string>('channelIds') || ''
  139 + // console.debug('TopNavigationComponent', 'addChannelItem==>' + storageChannelIds)
135 } 140 }
136 141
137 itemMove(index: number, newIndex: number): void { 142 itemMove(index: number, newIndex: number): void {
@@ -570,7 +575,7 @@ struct ChannelSubscriptionLayout { @@ -570,7 +575,7 @@ struct ChannelSubscriptionLayout {
570 .backgroundColor(Color.White) 575 .backgroundColor(Color.White)
571 .onClick(() => { 576 .onClick(() => {
572 this.isShow = true 577 this.isShow = true
573 - if(this.haveTempTabData){ 578 + if (this.haveTempTabData) {
574 // 存储数据 579 // 存储数据
575 AppStorage.setOrCreate('channelIds', this.channelIds.join(',')) 580 AppStorage.setOrCreate('channelIds', this.channelIds.join(','))
576 this.haveTempTabData = false 581 this.haveTempTabData = false
@@ -578,18 +583,23 @@ struct ChannelSubscriptionLayout { @@ -578,18 +583,23 @@ struct ChannelSubscriptionLayout {
578 }) 583 })
579 .bindContentCover(this.isShow, this.sheetBuilder(), { 584 .bindContentCover(this.isShow, this.sheetBuilder(), {
580 modalTransition: ModalTransition.DEFAULT, 585 modalTransition: ModalTransition.DEFAULT,
581 - onWillAppear: () => {console.log("BindContentCover onWillAppear.")},  
582 - onAppear: () => {console.log("BindContentCover onAppear.")},  
583 - onWillDisappear: () => {console.log("BindContentCover onWillDisappear.") 586 + onWillAppear: () => {
  587 + console.log("BindContentCover onWillAppear.")
  588 + },
  589 + onAppear: () => {
  590 + console.log("BindContentCover onAppear.")
  591 + },
  592 + onWillDisappear: () => {
  593 + console.log("BindContentCover onWillDisappear.")
584 this.isShow = false 594 this.isShow = false
585 - this.isEditIng = false},  
586 - onDisappear: () => {console.log("BindContentCover onDisappear.") 595 + this.isEditIng = false
  596 + },
  597 + onDisappear: () => {
  598 + console.log("BindContentCover onDisappear.")
587 } 599 }
588 }) 600 })
589 } 601 }
590 602
591 -  
592 -  
593 /** 603 /**
594 * 改变我的频道栏目中频道id数据 604 * 改变我的频道栏目中频道id数据
595 */ 605 */
1 -import { BottomNavDTO, TopNavDTO } from 'wdBean';  
2 -import { SpConstants } from 'wdConstant'; 1 +import { BottomNavDTO, NavigationDetailDTO, TopNavDTO } from 'wdBean';
3 import { Logger, NetworkUtil, SPHelper, ToastUtils } from 'wdKit'; 2 import { Logger, NetworkUtil, SPHelper, ToastUtils } from 'wdKit';
4 import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter'; 3 import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter';
5 import { PageComponent } from './PageComponent'; 4 import { PageComponent } from './PageComponent';
@@ -422,7 +421,6 @@ export struct TopNavigationComponentNew { @@ -422,7 +421,6 @@ export struct TopNavigationComponentNew {
422 421
423 async aboutToAppear() { 422 async aboutToAppear() {
424 423
425 -  
426 if (CompUtils.isNews(this.navItem)) { 424 if (CompUtils.isNews(this.navItem)) {
427 425
428 // 请求顶导网络数据 426 // 请求顶导网络数据
@@ -619,20 +617,51 @@ export struct TopNavigationComponentNew { @@ -619,20 +617,51 @@ export struct TopNavigationComponentNew {
619 //请求顶导数据 617 //请求顶导数据
620 async getTopNavList(id: number) { 618 async getTopNavList(id: number) {
621 619
  620 +
622 Logger.debug(TAG, 'getTopNavList=存储=>' + this.storageChannelIds) 621 Logger.debug(TAG, 'getTopNavList=存储=>' + this.storageChannelIds)
623 622
  623 + // 1 、使用存储数据
  624 + let bottomDetailCache = await ChannelViewModel.getBottomNavDetailCacheData(id)
  625 +
  626 + if (bottomDetailCache != null && bottomDetailCache.topNavChannelList.length > 0) {
  627 + Logger.debug(TAG, '使用缓存数据')
  628 + this.processTopNewsTapData(bottomDetailCache, false)
  629 + }
  630 +
  631 + // 2、请求网络数据
624 let bottomNavDetail = await ChannelViewModel.getBottomNavDetailData(id, this.storageChannelIds) 632 let bottomNavDetail = await ChannelViewModel.getBottomNavDetailData(id, this.storageChannelIds)
  633 +
  634 + if (bottomNavDetail != null) {
  635 + // 3、 接口数据md5和存储数据md5对比,一致不更新
  636 + if (bottomNavDetail.md5 == bottomDetailCache?.md5) {
  637 + Logger.debug(TAG, '不使用接口数据')
  638 + } else {
  639 + Logger.debug(TAG, '使用接口数据')
  640 + this.processTopNewsTapData(bottomNavDetail, true)
  641 + //存储
  642 + ChannelViewModel.saveBottomDetailData(bottomNavDetail)
  643 + }
  644 +
  645 + }
  646 +
  647 + }
  648 +
  649 + /**
  650 + * 加工新闻tab 顶导数据
  651 + * @param bottomNavDetail
  652 + */
  653 + private processTopNewsTapData(bottomNavDetail: NavigationDetailDTO, isNetData: boolean) {
  654 +
625 let topNavList = bottomNavDetail?.topNavChannelList || [] 655 let topNavList = bottomNavDetail?.topNavChannelList || []
626 656
627 - //let provinceName = SPHelper.default.getSync(SpConstants.LOCATION_PROVINCE_NAME, '') as string  
628 let _myChannelList: TopNavDTO [] = [] 657 let _myChannelList: TopNavDTO [] = []
629 - 658 + this.homeChannelList = []
  659 + this.moreChannelList = []
  660 + this.localChannelList = []
630 topNavList.forEach(item => { 661 topNavList.forEach(item => {
631 if (item.defaultPermitted === 1) { 662 if (item.defaultPermitted === 1) {
632 - console.debug('TopNavigationComponent', '--homeChannelList--->' + item.name)  
633 this.homeChannelList.push(item) 663 this.homeChannelList.push(item)
634 } 664 }
635 -  
636 //TODO 暂时隐藏播报 665 //TODO 暂时隐藏播报
637 if (item.name !== '播报') { 666 if (item.name !== '播报') {
638 if (item.myChannel === '1') { 667 if (item.myChannel === '1') {
@@ -645,6 +674,33 @@ export struct TopNavigationComponentNew { @@ -645,6 +674,33 @@ export struct TopNavigationComponentNew {
645 } 674 }
646 }) 675 })
647 676
  677 + //根据缓存数组排序
  678 + if (this.storageChannelIds && !isNetData) {
  679 + Logger.debug(TAG, '根据存储内容')
  680 + let sortedyChannelList: TopNavDTO [] = []
  681 + let _storageChannelIds = this.storageChannelIds.split(',')
  682 + _storageChannelIds.forEach((channelId) => {
  683 + for (let a of _myChannelList) {
  684 + if (channelId == String(a.channelId)) {
  685 + let startIndex = _myChannelList.findIndex(b => b.channelId == a.channelId)
  686 + _myChannelList.splice(startIndex, 1)
  687 + sortedyChannelList.push(a)
  688 + break;
  689 + }
  690 + }
  691 + })
  692 + // 依据存储的我的频道中频道id集合,过滤出符合条件频道,剩余的频道,针对本地频道处理,每次删除,再次进入存储的频道详情信息里面我的频道栏目的信息集合都有本地频道
  693 + if (_myChannelList.length > 0) {
  694 +
  695 + _myChannelList.forEach((localChannelBean) => {
  696 + localChannelBean.localChannel = '1'
  697 + })
  698 + this.localChannelList.unshift(..._myChannelList)
  699 + }
  700 +
  701 + _myChannelList = sortedyChannelList
  702 + }
  703 +
648 this.myChannelList = _myChannelList 704 this.myChannelList = _myChannelList
649 705
650 //缓存首页频道 706 //缓存首页频道
@@ -653,7 +709,9 @@ export struct TopNavigationComponentNew { @@ -653,7 +709,9 @@ export struct TopNavigationComponentNew {
653 this.currentTopNavSelectedIndex = index 709 this.currentTopNavSelectedIndex = index
654 } 710 }
655 711
  712 + if (isNetData) {
656 // 存储我的频道栏目中的频道id信息 713 // 存储我的频道栏目中的频道id信息
  714 + Logger.debug(TAG, '存储我的频道栏目数据')
657 let channelIds: number [] = [] 715 let channelIds: number [] = []
658 this.myChannelList.forEach(item => { 716 this.myChannelList.forEach(item => {
659 if (item != undefined && item.channelId != undefined) { 717 if (item != undefined && item.channelId != undefined) {
@@ -662,4 +720,6 @@ export struct TopNavigationComponentNew { @@ -662,4 +720,6 @@ export struct TopNavigationComponentNew {
662 }) 720 })
663 AppStorage.setOrCreate('channelIds', channelIds.join(',')) 721 AppStorage.setOrCreate('channelIds', channelIds.join(','))
664 } 722 }
  723 +
  724 + }
665 } 725 }
@@ -9,7 +9,7 @@ const TAG = 'AboutPageUI'; @@ -9,7 +9,7 @@ const TAG = 'AboutPageUI';
9 9
10 @Component 10 @Component
11 export struct AboutPageUI { 11 export struct AboutPageUI {
12 - @State listData: Array<string | Array<string>> = ['隐私授权协议', '软件许可及用户协议','收集个人信息明示清单','第三方信息共享清单']; 12 + @State listData: Array<string | Array<string>> = ['隐私授权协议', '软件许可及用户协议','APP个人信息收集清单','第三方信息共享清单'];
13 @State message: string = '京ICP备16066560号-6A Copyright © 人民日报客户端\nall rights reserved.' 13 @State message: string = '京ICP备16066560号-6A Copyright © 人民日报客户端\nall rights reserved.'
14 @State version: string = '版本号:v' 14 @State version: string = '版本号:v'
15 dialogController: CustomDialogController = new CustomDialogController({ 15 dialogController: CustomDialogController = new CustomDialogController({
@@ -14,32 +14,40 @@ export struct newsSkeleton { @@ -14,32 +14,40 @@ export struct newsSkeleton {
14 Column() { 14 Column() {
15 Row() { 15 Row() {
16 Column() { 16 Column() {
17 - Image($r('app.media.peopleSeleton')).width('100%').height(47)// 后缀名不能省略 17 + Image($r('app.media.peopleSeleton'))
  18 + .width('100%')
  19 + .height(47)// 后缀名不能省略
18 .interpolation(ImageInterpolation.High) 20 .interpolation(ImageInterpolation.High)
  21 + .margin({
  22 + bottom: 6
  23 + })
19 textArea('100%', 8) 24 textArea('100%', 8)
20 } 25 }
21 - .width(124) 26 + .margin({
  27 + right: '2%'
  28 + })
  29 + .width(`76%`)
22 .alignItems(HorizontalAlign.Start) 30 .alignItems(HorizontalAlign.Start)
23 - .margin({ right: 5 })  
24 31
25 Column() { 32 Column() {
26 Row() 33 Row()
27 - .width(27) 34 + .width(`100%`)
28 .height(25) 35 .height(25)
29 .backgroundColor('#FFF5F5F5') 36 .backgroundColor('#FFF5F5F5')
30 Row() 37 Row()
31 - .width(27) 38 + .width(`100%`)
32 .height(4) 39 .height(4)
33 .backgroundColor('#FFF5F5F5') 40 .backgroundColor('#FFF5F5F5')
34 .margin({ top: 3, bottom: 3 }) 41 .margin({ top: 3, bottom: 3 })
35 Row() 42 Row()
36 - .width(27) 43 + .width(`100%`)
37 .height(20) 44 .height(20)
38 .backgroundColor('#FFF5F5F5') 45 .backgroundColor('#FFF5F5F5')
39 // textArea(27, 25) 46 // textArea(27, 25)
40 // textArea(27, 4) 47 // textArea(27, 4)
41 // textArea(27, 20) 48 // textArea(27, 20)
42 } 49 }
  50 + .width(`22%`)
43 .border({ width: 1 }) 51 .border({ width: 1 })
44 .borderColor('#FFF5F5F5') 52 .borderColor('#FFF5F5F5')
45 .padding({ 53 .padding({
@@ -113,9 +121,9 @@ export struct newsSkeleton { @@ -113,9 +121,9 @@ export struct newsSkeleton {
113 Column().backgroundColor('#909090').height(5).width(326) 121 Column().backgroundColor('#909090').height(5).width(326)
114 } 122 }
115 .width('100%') 123 .width('100%')
116 - .padding({ right: 10, left: 10 })  
117 } 124 }
118 .height('100%') 125 .height('100%')
  126 + .width('100%')
119 127
120 } 128 }
121 } 129 }
@@ -192,11 +192,11 @@ export class PageRepository { @@ -192,11 +192,11 @@ export class PageRepository {
192 /** 192 /**
193 * 早晚报pageInfo请求 193 * 早晚报pageInfo请求
194 * */ 194 * */
195 - static getMorningEveningPageInfoUrl(pageId: string,topicId:string) { 195 + static getMorningEveningPageInfoUrl(pageId: string, topicId: string) {
196 let url = HttpUrlUtils.getHost() + HttpUrlUtils.PAGE_INFO_PATH; 196 let url = HttpUrlUtils.getHost() + HttpUrlUtils.PAGE_INFO_PATH;
197 url = url + "?pageId=" + pageId; 197 url = url + "?pageId=" + pageId;
198 - if(!StringUtils.isEmpty(topicId)){  
199 - url = url+ "&topicId=" + topicId; 198 + if (!StringUtils.isEmpty(topicId)) {
  199 + url = url + "&topicId=" + topicId;
200 } 200 }
201 Logger.info(TAG, "getMorningEveningPageInfoUrl url = " + url) 201 Logger.info(TAG, "getMorningEveningPageInfoUrl url = " + url)
202 return url; 202 return url;
@@ -237,10 +237,11 @@ export class PageRepository { @@ -237,10 +237,11 @@ export class PageRepository {
237 static fetchNavigationDetailDataApi(id: number = 210, myChannelIds?: string) { 237 static fetchNavigationDetailDataApi(id: number = 210, myChannelIds?: string) {
238 let url = PageRepository.getBottomNavGroupDetailUrl() + `?id=${id}`; 238 let url = PageRepository.getBottomNavGroupDetailUrl() + `?id=${id}`;
239 239
  240 + // 310000 310100 310115120
240 let provinceCode = HttpUtils.getProvinceCode() 241 let provinceCode = HttpUtils.getProvinceCode()
241 if (provinceCode) { 242 if (provinceCode) {
242 url = url + "&districtCode=" + HttpUtils.getDistrictCode() 243 url = url + "&districtCode=" + HttpUtils.getDistrictCode()
243 - + "&provinceCode=" + HttpUtils.getProvinceCode() 244 + + "&provinceCode=" + provinceCode
244 + "&cityCode=" + HttpUtils.getCityCode() 245 + "&cityCode=" + HttpUtils.getCityCode()
245 } 246 }
246 if (myChannelIds) { 247 if (myChannelIds) {
@@ -395,8 +396,8 @@ export class PageRepository { @@ -395,8 +396,8 @@ export class PageRepository {
395 /** 396 /**
396 * 获取早晚报pageInfo 397 * 获取早晚报pageInfo
397 * */ 398 * */
398 - static fetchMorningEveningPageInfo(pageId: string,topicId:string) {  
399 - let url = PageRepository.getMorningEveningPageInfoUrl(pageId,topicId) 399 + static fetchMorningEveningPageInfo(pageId: string, topicId: string) {
  400 + let url = PageRepository.getMorningEveningPageInfoUrl(pageId, topicId)
400 return WDHttp.get<ResponseDTO<PageInfoBean>>(url) 401 return WDHttp.get<ResponseDTO<PageInfoBean>>(url)
401 }; 402 };
402 403
@@ -421,7 +422,7 @@ export class PageRepository { @@ -421,7 +422,7 @@ export class PageRepository {
421 * 获取播报pageInfo 422 * 获取播报pageInfo
422 * */ 423 * */
423 static fetchBroadcastPageInfo(pageId: string) { 424 static fetchBroadcastPageInfo(pageId: string) {
424 - let url = PageRepository.getMorningEveningPageInfoUrl(pageId,'') 425 + let url = PageRepository.getMorningEveningPageInfoUrl(pageId, '')
425 return WDHttp.get<ResponseDTO<PageInfoBean>>(url) 426 return WDHttp.get<ResponseDTO<PageInfoBean>>(url)
426 }; 427 };
427 428
@@ -58,7 +58,7 @@ export class ChannelViewModel { @@ -58,7 +58,7 @@ export class ChannelViewModel {
58 } 58 }
59 59
60 /** 60 /**
61 - * 保存导详情数据到缓存 61 + * 保存顶部导详情数据到缓存
62 */ 62 */
63 saveBottomDetailData(data: NavigationDetailDTO) { 63 saveBottomDetailData(data: NavigationDetailDTO) {
64 CacheData.saveCacheData(CacheData.channelCacheDataKey + data?.id, data, data.md5) 64 CacheData.saveCacheData(CacheData.channelCacheDataKey + data?.id, data, data.md5)
@@ -75,7 +75,7 @@ export class ChannelViewModel { @@ -75,7 +75,7 @@ export class ChannelViewModel {
75 /** 75 /**
76 * 获取底导详情(顶导)接口数据 76 * 获取底导详情(顶导)接口数据
77 */ 77 */
78 - async getBottomNavDetailData(id: number, myChannelIds?: string): Promise<NavigationDetailDTO> { 78 + async getBottomNavDetailData(id: number, myChannelIds?: string): Promise<NavigationDetailDTO|null> {
79 Logger.info(TAG, `getBottomNavDetailData start`); 79 Logger.info(TAG, `getBottomNavDetailData start`);
80 return this.getNavDetailData(id,myChannelIds); 80 return this.getNavDetailData(id,myChannelIds);
81 } 81 }
@@ -111,18 +111,18 @@ export class ChannelViewModel { @@ -111,18 +111,18 @@ export class ChannelViewModel {
111 * @param myChannelIds 111 * @param myChannelIds
112 * @returns 112 * @returns
113 */ 113 */
114 - private getNavDetailData(id: number, myChannelIds?: string): Promise<NavigationDetailDTO> {  
115 - return new Promise<NavigationDetailDTO>((success, error) => { 114 + private getNavDetailData(id: number, myChannelIds?: string): Promise<NavigationDetailDTO|null> {
  115 + return new Promise<NavigationDetailDTO|null>((success, error) => {
116 Logger.info(TAG, `getNavData start`); 116 Logger.info(TAG, `getNavData start`);
117 PageRepository.fetchNavigationDetailDataApi(id,myChannelIds).then((navResDTO: ResponseDTO<NavigationDetailDTO>) => { 117 PageRepository.fetchNavigationDetailDataApi(id,myChannelIds).then((navResDTO: ResponseDTO<NavigationDetailDTO>) => {
118 if (!navResDTO || !navResDTO.data) { 118 if (!navResDTO || !navResDTO.data) {
119 Logger.error(TAG, 'getNavData then navResDTO is empty'); 119 Logger.error(TAG, 'getNavData then navResDTO is empty');
120 - error('navResDTO is empty'); 120 + success(null);
121 return 121 return
122 } 122 }
123 if (navResDTO.code != 0) { 123 if (navResDTO.code != 0) {
124 Logger.error(TAG, `getNavData then code:${navResDTO.code}, message:${navResDTO.message}`); 124 Logger.error(TAG, `getNavData then code:${navResDTO.code}, message:${navResDTO.message}`);
125 - error('navResDTO Response Code is failure'); 125 + success(null);
126 return 126 return
127 } 127 }
128 // let navResStr = JSON.stringify(navResDTO); 128 // let navResStr = JSON.stringify(navResDTO);
@@ -131,7 +131,7 @@ export class ChannelViewModel { @@ -131,7 +131,7 @@ export class ChannelViewModel {
131 success(navResDTO.data); 131 success(navResDTO.data);
132 }).catch((err: Error) => { 132 }).catch((err: Error) => {
133 Logger.error(TAG, `fetchNavigationDataApi catch, error.name : ${err.name}, error.message:${err.message}`); 133 Logger.error(TAG, `fetchNavigationDataApi catch, error.name : ${err.name}, error.message:${err.message}`);
134 - error(err); 134 + success(null);
135 }) 135 })
136 }) 136 })
137 } 137 }
@@ -77,9 +77,9 @@ export class PageHelper { @@ -77,9 +77,9 @@ export class PageHelper {
77 * 进页面请求数据 77 * 进页面请求数据
78 */ 78 */
79 async getInitCacheData(pageModel: PageModel, pageAdvModel: PageAdModel) { 79 async getInitCacheData(pageModel: PageModel, pageAdvModel: PageAdModel) {
80 - Logger.debug(TAG, 'getInitCacheData') 80 + // Logger.debug(TAG, 'getInitCacheData')
81 PageViewModel.getPageInfoCache(pageModel.pageId).then(pageInfo => { 81 PageViewModel.getPageInfoCache(pageModel.pageId).then(pageInfo => {
82 - Logger.debug(TAG, 'getInitCacheData back: ' + pageInfo) 82 + // Logger.debug(TAG, 'getInitCacheData back: ' + pageInfo)
83 if (pageInfo == null) { 83 if (pageInfo == null) {
84 return; 84 return;
85 } 85 }
@@ -125,9 +125,9 @@ export class PageHelper { @@ -125,9 +125,9 @@ export class PageHelper {
125 this.refreshUIEnd(pageModel, false) 125 this.refreshUIEnd(pageModel, false)
126 }) 126 })
127 } else { 127 } else {
128 - Logger.debug(TAG, 'getPageInfo') 128 + // Logger.debug(TAG, 'getPageInfo')
129 PageViewModel.getPageInfo(pageModel.pageId).then(pageInfo => { 129 PageViewModel.getPageInfo(pageModel.pageId).then(pageInfo => {
130 - Logger.debug(TAG, 'getPageInfo back: ' + JSON.stringify(pageInfo)) 130 + // Logger.debug(TAG, 'getPageInfo back: ' + JSON.stringify(pageInfo))
131 if (pageInfo == null) { 131 if (pageInfo == null) {
132 pageModel.viewType = ViewType.EMPTY; 132 pageModel.viewType = ViewType.EMPTY;
133 pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoContent1; 133 pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoContent1;
@@ -137,9 +137,9 @@ export class PageHelper { @@ -137,9 +137,9 @@ export class PageHelper {
137 pageModel.pageInfo = pageInfo; 137 pageModel.pageInfo = pageInfo;
138 if (pageInfo.md5 == pageModel.displayPageInfoMd5) { 138 if (pageInfo.md5 == pageModel.displayPageInfoMd5) {
139 // 缓存一致,不解析 139 // 缓存一致,不解析
140 - Logger.debug(TAG, 'getPageInfo 与缓存一致,不解析广告。。。') 140 + // Logger.debug(TAG, 'getPageInfo 与缓存一致,不解析广告。。。')
141 } else { 141 } else {
142 - Logger.debug(TAG, 'getPageInfo 要解析广告') 142 + // Logger.debug(TAG, 'getPageInfo 要解析广告')
143 if (pageModel.currentPage == 1) { 143 if (pageModel.currentPage == 1) {
144 // 保存缓存 144 // 保存缓存
145 CacheData.saveCacheData(CacheData.comPageInfoCacheKey + pageModel.pageId, pageInfo, pageInfo.md5) 145 CacheData.saveCacheData(CacheData.comPageInfoCacheKey + pageModel.pageId, pageInfo, pageInfo.md5)
@@ -148,7 +148,7 @@ export class PageHelper { @@ -148,7 +148,7 @@ export class PageHelper {
148 //解析页面挂角广告资源 148 //解析页面挂角广告资源
149 pageAdvModel.analysisAdvSource(pageInfo); 149 pageAdvModel.analysisAdvSource(pageInfo);
150 } 150 }
151 - Logger.debug(TAG, 'getPageInfo go on') 151 + // Logger.debug(TAG, 'getPageInfo go on')
152 this.parseGroup(pageModel, false) 152 this.parseGroup(pageModel, false)
153 }).catch(() => { 153 }).catch(() => {
154 this.refreshUIEnd(pageModel, false) 154 this.refreshUIEnd(pageModel, false)
@@ -190,14 +190,14 @@ export class PageHelper { @@ -190,14 +190,14 @@ export class PageHelper {
190 190
191 //Logger.error("ZZZXXXXX", '楼层id-start--》' + pageModel.groupId); 191 //Logger.error("ZZZXXXXX", '楼层id-start--》' + pageModel.groupId);
192 let pageDto: PageDTO 192 let pageDto: PageDTO
193 - Logger.debug(TAG, 'parseGroup isCache: ' + isCache) 193 + //Logger.debug(TAG, 'parseGroup isCache: ' + isCache)
194 if (isCache) { 194 if (isCache) {
195 pageDto = await PageViewModel.getPageGroupCacheData(pageModel.bizCopy()) as PageDTO 195 pageDto = await PageViewModel.getPageGroupCacheData(pageModel.bizCopy()) as PageDTO
196 pageModel.displayGroupInfoMd5 = pageDto.md5 196 pageModel.displayGroupInfoMd5 = pageDto.md5
197 } else { 197 } else {
198 pageDto = await PageViewModel.getPageGroupCompData(pageModel.bizCopy()) as PageDTO 198 pageDto = await PageViewModel.getPageGroupCompData(pageModel.bizCopy()) as PageDTO
199 if (pageDto.md5 == pageModel.displayGroupInfoMd5) { 199 if (pageDto.md5 == pageModel.displayGroupInfoMd5) {
200 - Logger.debug(TAG, 'parseGroup cache load, return: ' + pageDto.md5) 200 + // Logger.debug(TAG, 'parseGroup cache load, return: ' + pageDto.md5)
201 // 下拉刷新场景,数据没变,拦截刷新UI,重置相关参数 201 // 下拉刷新场景,数据没变,拦截刷新UI,重置相关参数
202 if (pageModel.loadStrategy === 2) { 202 if (pageModel.loadStrategy === 2) {
203 // 缓存数据一致,不再刷新 203 // 缓存数据一致,不再刷新
@@ -211,17 +211,17 @@ export class PageHelper { @@ -211,17 +211,17 @@ export class PageHelper {
211 return 211 return
212 } 212 }
213 pageModel.displayGroupInfoMd5 = pageDto.md5 213 pageModel.displayGroupInfoMd5 = pageDto.md5
214 - Logger.debug(TAG, 'parseGroup cache load, save: ' + pageDto.md5) 214 + // Logger.debug(TAG, 'parseGroup cache load, save: ' + pageDto.md5)
215 // 保存缓存 215 // 保存缓存
216 CacheData.saveCacheData(CacheData.compGroupInfoDataCacheKey + pageModel.pageId + pageModel.groupId, pageDto, 216 CacheData.saveCacheData(CacheData.compGroupInfoDataCacheKey + pageModel.pageId + pageModel.groupId, pageDto,
217 pageDto.md5) 217 pageDto.md5)
218 } 218 }
219 - Logger.debug(TAG, 'parseGroup go on') 219 + // Logger.debug(TAG, 'parseGroup go on')
220 // await,确保groups接口顺序执行 220 // await,确保groups接口顺序执行
221 // let pageDto = page 221 // let pageDto = page
222 let index = pageInfo.groups.indexOf(group) 222 let index = pageInfo.groups.indexOf(group)
223 223
224 - Logger.debug(TAG, 'yyyy parseGroup print') 224 + // Logger.debug(TAG, 'yyyy parseGroup print')
225 this.printComp(pageDto) 225 this.printComp(pageDto)
226 // 解析楼层组件 226 // 解析楼层组件
227 this.analysisPageGroupCompData(pageDto, pageInfo) 227 this.analysisPageGroupCompData(pageDto, pageInfo)
@@ -268,7 +268,7 @@ export class PageHelper { @@ -268,7 +268,7 @@ export class PageHelper {
268 268
269 if (pageModel.compList.isEmpty()) { 269 if (pageModel.compList.isEmpty()) {
270 // 没数据,展示空页面 270 // 没数据,展示空页面
271 - Logger.debug(TAG, 'aboutToAppear, data response page ' + pageModel.pageId + ', comp list is empty.'); 271 + //Logger.debug(TAG, 'aboutToAppear, data response page ' + pageModel.pageId + ', comp list is empty.');
272 pageModel.viewType = ViewType.EMPTY; 272 pageModel.viewType = ViewType.EMPTY;
273 pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoContent1; 273 pageModel.emptyType = WDViewDefaultType.WDViewDefaultType_NoContent1;
274 274
@@ -296,7 +296,7 @@ export class PageHelper { @@ -296,7 +296,7 @@ export class PageHelper {
296 pageInfo.pageAdList.push(...pageDto.compAdList) 296 pageInfo.pageAdList.push(...pageDto.compAdList)
297 } 297 }
298 // TODO 待删除 298 // TODO 待删除
299 - Logger.debug(TAG, 'yyyy analysisPageGroupCompData size, '+pageInfo?.oneRequestPageGroupCompList?.length) 299 + // Logger.debug(TAG, 'yyyy analysisPageGroupCompData size, '+pageInfo?.oneRequestPageGroupCompList?.length)
300 } 300 }
301 301
302 } 302 }
@@ -343,7 +343,7 @@ export class PageHelper { @@ -343,7 +343,7 @@ export class PageHelper {
343 pageModel.currentPage++; 343 pageModel.currentPage++;
344 pageModel.hasMore = true; 344 pageModel.hasMore = true;
345 345
346 - Logger.debug(TAG, 'yyyy compLoadMore print') 346 + // Logger.debug(TAG, 'yyyy compLoadMore print')
347 this.printComp(data) 347 this.printComp(data)
348 //移除音频 和 活动 348 //移除音频 和 活动
349 this.loadMorePageComp(pageModel, data) 349 this.loadMorePageComp(pageModel, data)
@@ -372,7 +372,7 @@ export class PageHelper { @@ -372,7 +372,7 @@ export class PageHelper {
372 pageModel.pageInfo.oneRequestPageGroupCompList.add(comp) 372 pageModel.pageInfo.oneRequestPageGroupCompList.add(comp)
373 }) 373 })
374 // TODO 待删除 374 // TODO 待删除
375 - Logger.debug(TAG, 'yyyy loadMorePageComp size, ' + pageModel.pageInfo.oneRequestPageGroupCompList?.length) 375 + // Logger.debug(TAG, 'yyyy loadMorePageComp size, ' + pageModel.pageInfo.oneRequestPageGroupCompList?.length)
376 376
377 // 记录 377 // 记录
378 pageModel.pageTotalCompSize = pageCompList.length + pageModel.pageTotalCompSize 378 pageModel.pageTotalCompSize = pageCompList.length + pageModel.pageTotalCompSize
@@ -398,7 +398,7 @@ export class PageHelper { @@ -398,7 +398,7 @@ export class PageHelper {
398 let contentInfo: ContentDTO = CollectionUtils.getElement(element.operDataList, 0); 398 let contentInfo: ContentDTO = CollectionUtils.getElement(element.operDataList, 0);
399 //移除音频 和 活动 399 //移除音频 和 活动
400 if (contentInfo && (contentInfo.objectType === '13' || contentInfo.objectType === '3')) { 400 if (contentInfo && (contentInfo.objectType === '13' || contentInfo.objectType === '3')) {
401 - Logger.debug(TAG, 'getGroupData 移除音频 和 活动'); 401 + //Logger.debug(TAG, 'getGroupData 移除音频 和 活动');
402 } else { 402 } else {
403 // 暂时屏蔽活动和音频详情入口 403 // 暂时屏蔽活动和音频详情入口
404 if (element.operDataList[0]?.objectType === '3' || element.operDataList[0]?.objectType === '13') { 404 if (element.operDataList[0]?.objectType === '3' || element.operDataList[0]?.objectType === '13') {
@@ -843,7 +843,7 @@ export class PageHelper { @@ -843,7 +843,7 @@ export class PageHelper {
843 * 删除分页数据,保留第一页的数据。(下拉刷新场景用到) 843 * 删除分页数据,保留第一页的数据。(下拉刷新场景用到)
844 */ 844 */
845 deleteMorePage(pageModel: PageModel) { 845 deleteMorePage(pageModel: PageModel) {
846 - Logger.debug(TAG, 'deleteMorePage endindex: ' + pageModel.firstPageEndIndex) 846 + //Logger.debug(TAG, 'deleteMorePage endindex: ' + pageModel.firstPageEndIndex)
847 if (pageModel.firstPageEndIndex < 0) { 847 if (pageModel.firstPageEndIndex < 0) {
848 return 848 return
849 } 849 }
@@ -855,7 +855,7 @@ export class PageHelper { @@ -855,7 +855,7 @@ export class PageHelper {
855 * 临时打印comp相关信息,用于问题定位。TODO 待删除 855 * 临时打印comp相关信息,用于问题定位。TODO 待删除
856 */ 856 */
857 private printComp(pageDto: PageDTO) { 857 private printComp(pageDto: PageDTO) {
858 - Logger.debug(TAG, 'yyyy printComp pageDto.compList.size: ' + pageDto?.compList?.length) 858 + //Logger.debug(TAG, 'yyyy printComp pageDto.compList.size: ' + pageDto?.compList?.length)
859 new Promise<void>(() => { 859 new Promise<void>(() => {
860 let tmpCompList: CompDTO[] = Array.from(pageDto.compList) 860 let tmpCompList: CompDTO[] = Array.from(pageDto.compList)
861 tmpCompList.forEach((v, k) => { 861 tmpCompList.forEach((v, k) => {
@@ -863,10 +863,10 @@ export class PageHelper { @@ -863,10 +863,10 @@ export class PageHelper {
863 Logger.warn(TAG, 'yyyy printComp comp forEach, ' + v.compStyle) 863 Logger.warn(TAG, 'yyyy printComp comp forEach, ' + v.compStyle)
864 v.operDataList.forEach((cv, ci) => { 864 v.operDataList.forEach((cv, ci) => {
865 if (cv) { 865 if (cv) {
866 - Logger.debug(TAG, 'yyyy printComp ContentDTO print, ' + v.compStyle)  
867 - Logger.debug(TAG, 'yyyy printComp ContentDTO xxxx newsTitle, ' + cv.newsTitle) 866 + // Logger.debug(TAG, 'yyyy printComp ContentDTO print, ' + v.compStyle)
  867 + // Logger.debug(TAG, 'yyyy printComp ContentDTO xxxx newsTitle, ' + cv.newsTitle)
868 } else { 868 } else {
869 - Logger.warn(TAG, 'yyyy printComp ContentDTO is null, ' + v.compStyle) 869 + // Logger.warn(TAG, 'yyyy printComp ContentDTO is null, ' + v.compStyle)
870 } 870 }
871 }) 871 })
872 } else { 872 } else {
@@ -95,6 +95,7 @@ struct LoginProtocolWebview { @@ -95,6 +95,7 @@ struct LoginProtocolWebview {
95 } 95 }
96 }.width("100%") 96 }.width("100%")
97 .height("100%") 97 .height("100%")
  98 + .backgroundColor(Color.White)
98 .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) 99 .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)})
99 100
100 } 101 }
@@ -24,17 +24,17 @@ export class Tracking { @@ -24,17 +24,17 @@ export class Tracking {
24 // Logger.error('yyyy','event track failed') 24 // Logger.error('yyyy','event track failed')
25 // }) 25 // })
26 26
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 - }) 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 + // })
38 } 38 }
39 } 39 }
40 40
@@ -2,14 +2,15 @@ import { ENewspaperPageComponent } from 'wdComponent'; @@ -2,14 +2,15 @@ import { ENewspaperPageComponent } from 'wdComponent';
2 import { DateTimeUtils, Logger } from 'wdKit'; 2 import { DateTimeUtils, Logger } from 'wdKit';
3 import common from '@ohos.app.ability.common'; 3 import common from '@ohos.app.ability.common';
4 import window from '@ohos.window'; 4 import window from '@ohos.window';
5 -import { TrackingPageBrowse ,TrackConstants} from 'wdTracking/Index'; 5 +import { TrackingPageBrowse, TrackConstants } from 'wdTracking/Index';
6 6
7 const TAG = 'ENewspaper'; 7 const TAG = 'ENewspaper';
  8 +
8 //电子报主页面 9 //电子报主页面
9 @Entry 10 @Entry
10 @Component 11 @Component
11 struct ENewspaper { 12 struct ENewspaper {
12 - pageShowTime:number = 0; 13 + pageShowTime: number = 0;
13 // 获取UIAbility上下文 14 // 获取UIAbility上下文
14 context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext 15 context: common.UIAbilityContext = getContext(this) as common.UIAbilityContext
15 16
@@ -49,15 +50,16 @@ struct ENewspaper { @@ -49,15 +50,16 @@ struct ENewspaper {
49 50
50 onPageShow() { 51 onPageShow() {
51 this.pageShowTime = DateTimeUtils.getTimeStamp() 52 this.pageShowTime = DateTimeUtils.getTimeStamp()
52 - this.setSystemBar('#80000000','#80000000', '#FFFFFFFF') 53 + this.setSystemBar('#00000000', '#00000000', '#FFFFFFFF')
53 Logger.info(TAG, 'onPageShow'); 54 Logger.info(TAG, 'onPageShow');
54 } 55 }
55 56
56 onPageHide() { 57 onPageHide() {
57 - this.setSystemBar('#FFFFFFFF','#00000000', '#000000') 58 + this.setSystemBar('#FFFFFFFF', '#00000000', '#000000')
58 Logger.info(TAG, 'onPageHide'); 59 Logger.info(TAG, 'onPageHide');
59 //页面浏览 60 //页面浏览
60 - TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.NewsPaperPage,TrackConstants.PageName.NewsPaperPage,Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime)/1000)) 61 + TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.NewsPaperPage,
  62 + TrackConstants.PageName.NewsPaperPage, Math.floor((DateTimeUtils.getTimeStamp() - this.pageShowTime) / 1000))
61 } 63 }
62 64
63 onBackPress() { 65 onBackPress() {
@@ -14,6 +14,19 @@ @@ -14,6 +14,19 @@
14 } 14 }
15 }, 15 },
16 { 16 {
  17 + "intentName": "ViewColumn",
  18 + "domain": "",
  19 + "intentVersion": "1.0.1",
  20 + "srcEntry": "./ets/utils/InsightIntentExecutorImpl.ets",
  21 + "uiAbility": {
  22 + "ability": "EntryAbility",
  23 + "executeMode": [
  24 + "background",
  25 + "foreground"
  26 + ]
  27 + }
  28 + },
  29 + {
17 "intentName": "ViewColumnUpdate", 30 "intentName": "ViewColumnUpdate",
18 "domain": "", 31 "domain": "",
19 "intentVersion": "1.0.1", 32 "intentVersion": "1.0.1",