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: 稿件详情图片预览单击返回
Showing
3 changed files
with
53 additions
and
26 deletions
| @@ -131,25 +131,34 @@ export struct RmhTitle { | @@ -131,25 +131,34 @@ export struct RmhTitle { | ||
| 131 | 131 | ||
| 132 | build() { | 132 | build() { |
| 133 | Flex() { | 133 | Flex() { |
| 134 | - 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')) | ||
| 137 | - .width(36) | ||
| 138 | - .height(36) | ||
| 139 | - .borderRadius(18) | ||
| 140 | - .border({ | ||
| 141 | - width: 0.5, | ||
| 142 | - color: '#0D000000', // 5% 透明度的黑色 | ||
| 143 | - style: BorderStyle.Solid | ||
| 144 | - }) | ||
| 145 | - Image(this.rmhInfo?.authIcon) | ||
| 146 | - .width(14) | ||
| 147 | - .height(14) | ||
| 148 | - .borderRadius(50) | 134 | + if (this.rmhInfo.userType != '5') { |
| 135 | + Stack() { | ||
| 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')) | ||
| 145 | + .width(36) | ||
| 146 | + .height(36) | ||
| 147 | + .borderRadius(18) | ||
| 148 | + .border({ | ||
| 149 | + width: 0.5, | ||
| 150 | + color: '#0D000000', // 5% 透明度的黑色 | ||
| 151 | + style: BorderStyle.Solid | ||
| 152 | + }) | ||
| 153 | + Image(this.rmhInfo?.authIcon) | ||
| 154 | + .width(14) | ||
| 155 | + .height(14) | ||
| 156 | + .borderRadius(50) | ||
| 157 | + } | ||
| 158 | + .margin({ right: 8 }) | ||
| 159 | + .alignContent(Alignment.BottomEnd) | ||
| 160 | + .flexShrink(0) | ||
| 149 | } | 161 | } |
| 150 | - .margin({ right: 8 }) | ||
| 151 | - .alignContent(Alignment.BottomEnd) | ||
| 152 | - .flexShrink(0) | ||
| 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,18 +279,25 @@ export struct PageComponent { | @@ -278,18 +279,25 @@ 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 | - if (this.navIndex === this.currentTopNavSelectedIndex) { | ||
| 288 | - Logger.debug(TAG, 'page onAutoRefresh111 ' + this.needload) | ||
| 289 | - if (this.needload) { | ||
| 290 | - this.getData(); | 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) { | ||
| 292 | + if (this.navIndex === this.currentTopNavSelectedIndex) { | ||
| 293 | + // console.log(TAG, 'page onAutoRefresh111 ' + this.needload) | ||
| 294 | + if (this.needload) { | ||
| 295 | + this.getData(); | ||
| 296 | + } | ||
| 297 | + this.needload = false; | ||
| 291 | } | 298 | } |
| 292 | - this.needload = false; | 299 | + } else { |
| 300 | + this.pageModel.viewType = ViewType.EMPTY; | ||
| 293 | } | 301 | } |
| 294 | } | 302 | } |
| 295 | 303 |
| @@ -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, |
-
Please register or login to post a comment