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: 沉浸式播放时关闭网络,恢复网络后,切换到直播tab,tab列表内容未自动重新加载
  fix: 20533 人民号推荐频道,采集数据不应展示号主头像和关注按钮
  fix: 稿件详情图片预览单击返回
@@ -131,9 +131,17 @@ export struct RmhTitle { @@ -131,9 +131,17 @@ export struct RmhTitle {
131 131
132 build() { 132 build() {
133 Flex() { 133 Flex() {
  134 + if (this.rmhInfo.userType != '5') {
134 Stack() { 135 Stack() {
135 - Image(this.loadImg ? this.rmhInfo?.rmhHeadUrl : this.rmhInfo.userType == '1'?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon'))  
136 - .alt(this.rmhInfo.userType == '1'?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon')) 136 + Image(
  137 + this.loadImg
  138 + ? this.rmhInfo?.rmhHeadUrl
  139 + : this.rmhInfo.userType == '1'
  140 + ? $r('app.media.default_head_userPage')
  141 + : $r('app.media.AccountOwner_DefaultIcon'))
  142 + .alt(
  143 + this.rmhInfo.userType == '1'?$r('app.media.default_head_userPage'):
  144 + $r('app.media.AccountOwner_DefaultIcon'))
137 .width(36) 145 .width(36)
138 .height(36) 146 .height(36)
139 .borderRadius(18) 147 .borderRadius(18)
@@ -150,6 +158,7 @@ export struct RmhTitle { @@ -150,6 +158,7 @@ export struct RmhTitle {
150 .margin({ right: 8 }) 158 .margin({ right: 8 })
151 .alignContent(Alignment.BottomEnd) 159 .alignContent(Alignment.BottomEnd)
152 .flexShrink(0) 160 .flexShrink(0)
  161 + }
153 162
154 Column() { 163 Column() {
155 Text(this.rmhInfo?.rmhName) 164 Text(this.rmhInfo?.rmhName)
1 import { CommonConstants, ViewType } from 'wdConstant'; 1 import { CommonConstants, ViewType } from 'wdConstant';
2 -import { Logger } from 'wdKit'; 2 +import { Logger, NetworkUtil } from 'wdKit';
3 import { EmptyComponent } from '../view/EmptyComponent'; 3 import { EmptyComponent } from '../view/EmptyComponent';
4 import PageModel from '../../viewmodel/PageModel'; 4 import PageModel from '../../viewmodel/PageModel';
5 import { autoRefresh, onActionEnd, onActionStart, onActionUpdate } from '../../utils/PullDownRefresh'; 5 import { autoRefresh, onActionEnd, onActionStart, onActionUpdate } from '../../utils/PullDownRefresh';
@@ -41,6 +41,7 @@ export struct PageComponent { @@ -41,6 +41,7 @@ export struct PageComponent {
41 private pageTrackBean: PageTrackBean = new PageTrackBean() 41 private pageTrackBean: PageTrackBean = new PageTrackBean()
42 // 国殇灰度管理 42 // 国殇灰度管理
43 GrayManage: SubscribedAbstractProperty<GrayManageModel> = AppStorage.link<GrayManageModel>('GrayManage') 43 GrayManage: SubscribedAbstractProperty<GrayManageModel> = AppStorage.link<GrayManageModel>('GrayManage')
  44 + @State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图
44 45
45 build() { 46 build() {
46 Column() { 47 Column() {
@@ -278,19 +279,26 @@ export struct PageComponent { @@ -278,19 +279,26 @@ export struct PageComponent {
278 if (this.navIndex === this.currentTopNavSelectedIndex) { 279 if (this.navIndex === this.currentTopNavSelectedIndex) {
279 this.getData(); 280 this.getData();
280 this.needload = false; 281 this.needload = false;
  282 + // console.log(TAG, 'aboutToAppear onAutoRefresh111 ' + this.needload)
281 } 283 }
282 } 284 }
283 285
284 onChange() { 286 onChange() {
285 - Logger.info(TAG,  
286 - `onChangezz id: ${this.pageId} , ${this.channelId} , ${this.navIndex} , navIndex: ${this.currentTopNavSelectedIndex}`); 287 + // console.log(TAG, `onChangezz id: ${this.pageId} , ${this.channelId} , ${this.navIndex} , navIndex: ${this.currentTopNavSelectedIndex}`);
  288 + // 注册监听网络连接
  289 + this.netStatus = undefined
  290 + let netStatus = NetworkUtil.isNetConnected()
  291 + if (netStatus) {
287 if (this.navIndex === this.currentTopNavSelectedIndex) { 292 if (this.navIndex === this.currentTopNavSelectedIndex) {
288 - Logger.debug(TAG, 'page onAutoRefresh111 ' + this.needload) 293 + // console.log(TAG, 'page onAutoRefresh111 ' + this.needload)
289 if (this.needload) { 294 if (this.needload) {
290 this.getData(); 295 this.getData();
291 } 296 }
292 this.needload = false; 297 this.needload = false;
293 } 298 }
  299 + } else {
  300 + this.pageModel.viewType = ViewType.EMPTY;
  301 + }
294 } 302 }
295 303
296 onAutoRefresh() { 304 onAutoRefresh() {
@@ -113,6 +113,16 @@ export struct MultiPictureListPage { @@ -113,6 +113,16 @@ export struct MultiPictureListPage {
113 this.swiperIndex = targetIndex 113 this.swiperIndex = targetIndex
114 this.currentUrl = this.photoList[targetIndex]?.picPath 114 this.currentUrl = this.photoList[targetIndex]?.picPath
115 }) 115 })
  116 + .gesture(
  117 + GestureGroup(
  118 + GestureMode.Exclusive,
  119 + // 单击返回上一层
  120 + TapGesture({ count: 1 })
  121 + .onAction(() => {
  122 + router.back()
  123 + })
  124 + )
  125 + )
116 126
117 Flex({ 127 Flex({
118 direction: FlexDirection.Row, 128 direction: FlexDirection.Row,