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 {
build() {
Flex() {
if (this.rmhInfo.userType != '5') {
Stack() {
Image(this.loadImg ? this.rmhInfo?.rmhHeadUrl : this.rmhInfo.userType == '1'?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon'))
.alt(this.rmhInfo.userType == '1'?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon'))
Image(
this.loadImg
? this.rmhInfo?.rmhHeadUrl
: this.rmhInfo.userType == '1'
? $r('app.media.default_head_userPage')
: $r('app.media.AccountOwner_DefaultIcon'))
.alt(
this.rmhInfo.userType == '1'?$r('app.media.default_head_userPage'):
$r('app.media.AccountOwner_DefaultIcon'))
.width(36)
.height(36)
.borderRadius(18)
... ... @@ -150,6 +158,7 @@ export struct RmhTitle {
.margin({ right: 8 })
.alignContent(Alignment.BottomEnd)
.flexShrink(0)
}
Column() {
Text(this.rmhInfo?.rmhName)
... ...
import { CommonConstants, ViewType } from 'wdConstant';
import { Logger } from 'wdKit';
import { Logger, NetworkUtil } from 'wdKit';
import { EmptyComponent } from '../view/EmptyComponent';
import PageModel from '../../viewmodel/PageModel';
import { autoRefresh, onActionEnd, onActionStart, onActionUpdate } from '../../utils/PullDownRefresh';
... ... @@ -41,6 +41,7 @@ export struct PageComponent {
private pageTrackBean: PageTrackBean = new PageTrackBean()
// 国殇灰度管理
GrayManage: SubscribedAbstractProperty<GrayManageModel> = AppStorage.link<GrayManageModel>('GrayManage')
@State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图
build() {
Column() {
... ... @@ -278,19 +279,26 @@ export struct PageComponent {
if (this.navIndex === this.currentTopNavSelectedIndex) {
this.getData();
this.needload = false;
// console.log(TAG, 'aboutToAppear onAutoRefresh111 ' + this.needload)
}
}
onChange() {
Logger.info(TAG,
`onChangezz id: ${this.pageId} , ${this.channelId} , ${this.navIndex} , navIndex: ${this.currentTopNavSelectedIndex}`);
// console.log(TAG, `onChangezz id: ${this.pageId} , ${this.channelId} , ${this.navIndex} , navIndex: ${this.currentTopNavSelectedIndex}`);
// 注册监听网络连接
this.netStatus = undefined
let netStatus = NetworkUtil.isNetConnected()
if (netStatus) {
if (this.navIndex === this.currentTopNavSelectedIndex) {
Logger.debug(TAG, 'page onAutoRefresh111 ' + this.needload)
// console.log(TAG, 'page onAutoRefresh111 ' + this.needload)
if (this.needload) {
this.getData();
}
this.needload = false;
}
} else {
this.pageModel.viewType = ViewType.EMPTY;
}
}
onAutoRefresh() {
... ...
... ... @@ -113,6 +113,16 @@ export struct MultiPictureListPage {
this.swiperIndex = targetIndex
this.currentUrl = this.photoList[targetIndex]?.picPath
})
.gesture(
GestureGroup(
GestureMode.Exclusive,
// 单击返回上一层
TapGesture({ count: 1 })
.onAction(() => {
router.back()
})
)
)
Flex({
direction: FlexDirection.Row,
... ...