陈剑华

Merge remote-tracking branch 'origin/main'

... ... @@ -45,13 +45,18 @@ export struct CardMediaInfo {
.mediaLogo()
Text('回看')
.mediaText()
} else if (this.contentDTO?.liveInfo?.liveState === 'end' && this.contentDTO?.liveInfo
?.replayUri) {
// Image($r('app.media.card_live'))
// .mediaLogo()
Text('直播结束')
.mediaText()
}else if(this.contentDTO?.liveInfo?.liveState === 'end' && !this.contentDTO?.liveInfo
?.replayUri){
Text('已结束')
.mediaText()
}
// } else if (this.contentDTO?.liveInfo?.liveState === 'end' && this.contentDTO?.liveInfo
// ?.replayUri) {
// // Image($r('app.media.card_live'))
// // .mediaLogo()
// Text('直播结束')
// .mediaText()
// }
}
} else if (this.contentDTO.objectType === '9') {
// 显示组图;图片数量
... ...
... ... @@ -48,8 +48,8 @@ export struct MessageListUI {
this.msgData.forEach((item) => {
if (item.title == "预约消息") {
if (value.subscribeInfo != null) {
if (value.subscribeInfo.title) {
item.desc = value.subscribeInfo.title
if (value.subscribeInfo.message) {
item.desc = value.subscribeInfo.message
}
if (value.subscribeInfo.time) {
item.time = this.getPublishTime(value.subscribeInfo.time,DateTimeUtils.getDateTimestamp(value.subscribeInfo.time)+"")
... ... @@ -63,8 +63,8 @@ export struct MessageListUI {
item.unReadCount = value.activeCount
}
if (value.activeInfo != null) {
if (value.activeInfo.title) {
item.desc = value.activeInfo.title
if (value.activeInfo.message) {
item.desc = value.activeInfo.message
}
if (value.activeInfo.time) {
item.time = this.getPublishTime(value.subscribeInfo.time,DateTimeUtils.getDateTimestamp(value.activeInfo.time) + "")
... ... @@ -72,8 +72,8 @@ export struct MessageListUI {
}
}/*else if (item.title == "系统消息") {
if (value.systemInfo != null) {
if (value.systemInfo.title) {
item.desc = value.systemInfo.title
if (value.systemInfo.message) {
item.desc = value.systemInfo.message
}
if (value.systemInfo.time) {
item.time = this.getPublishTime(value.subscribeInfo.time,DateTimeUtils.getDateTimestamp(value.systemInfo.time) + "")
... ...
... ... @@ -84,11 +84,13 @@ export struct SubscribeListChildComponent{
}.backgroundColor($r('app.color.white'))
.borderRadius("8lpx")
.height("336lpx")
.width("100%")
.padding({left:"23lpx",right:"23lpx"})
}
.backgroundColor($r('app.color.color_F5F5F5'))
.width("100%")
.height("423lpx")
.padding({left:"31lpx",right:"31lpx"})
.alignItems(HorizontalAlign.Center)
}
... ...
import { LazyDataSource, StringUtils } from 'wdKit/Index';
import { LazyDataSource, NetworkUtil, StringUtils } from 'wdKit/Index';
import { Remark, SubscribeMessageModel,
WDMessageCenterMessageType } from '../../../../model/InteractMessageModel';
import MinePageDatasModel from '../../../../model/MinePageDatasModel';
... ... @@ -21,6 +21,8 @@ export struct SubscribeMessageComponent{
curPageNum: number = 1;
@State isGetRequest: boolean = false
private scroller: Scroller = new Scroller();
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@State isConnectNetwork : boolean = NetworkUtil.isNetConnected()
aboutToAppear() {
this.getNewPageData()
... ... @@ -32,9 +34,27 @@ export struct SubscribeMessageComponent{
CustomTitleUI({ titleName: "预约消息" })
if (this.count == 0) {
if (this.isGetRequest == true) {
EmptyComponent({ emptyType: 5 })
.height('100%')
.width('100%')
if(this.isConnectNetwork){
EmptyComponent({ emptyType: 5 })
.height('100%')
.width('100%')
}else{
EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => {
this.isConnectNetwork = NetworkUtil.isNetConnected()
if(this.isConnectNetwork){
this.curPageNum = 1;
this.hasMore = true
this.isGetRequest = false
this.data.clear()
if (!this.isLoading) {
this.getNewPageData()
}
}
},})
.layoutWeight(1)
.width('100%')
}
}
} else {
CustomPullToRefresh({
... ... @@ -60,6 +80,8 @@ export struct SubscribeMessageComponent{
}
}
})
.width('100%')
.margin({bottom:px2vp(this.bottomSafeHeight)})
}
}
.backgroundColor($r('app.color.color_F9F9F9'))
... ... @@ -94,7 +116,7 @@ export struct SubscribeMessageComponent{
}
}
}.width('100%')
.cachedCount(4)
.height("100%")
.scrollBar(BarState.Off)
.layoutWeight(1)
}
... ...
... ... @@ -38,16 +38,30 @@ struct PeopleShipHomePage {
@State attentionOpacity: boolean = false
@Provide topHeight: number = 286
@State isLoading: boolean = true
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
build() {
Stack({ alignContent: Alignment.TopStart }) {
// 顶部图片
Image($r('app.media.home_page_bg'))
.width('100%')
.height('120vp')
.objectFit(ImageFit.Fill)
.backgroundColor(Color.White)
.visibility(this.isLoading ? Visibility.None : Visibility.Visible)
Stack({ alignContent: Alignment.Top }){
// 顶部图片
Image($r('app.media.home_page_bg'))
.width('100%')
.height('120vp')
.objectFit(ImageFit.Fill)
.backgroundColor(Color.White)
.visibility(this.isLoading ? Visibility.None : Visibility.Visible)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
Row()
.height(px2vp(this.topSafeHeight))
.width("100%")
.backgroundColor($r('app.color.white'))
.visibility(this.attentionOpacity ? 1 : 0)
.opacity(this.topOpacity )
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
}
Column(){
// 头部返回
... ... @@ -109,7 +123,7 @@ struct PeopleShipHomePage {
})
}
}
}.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
.alignItems(HorizontalAlign.Start)
.justifyContent(FlexAlign.Start)
.width('100%')
... ...
... ... @@ -36,6 +36,7 @@ struct MineHomePage {
@State params:Record<string, string> = router.getParams() as Record<string, string>;
@State isCommentEnter:string = "";
@State isConnectNetwork : boolean = NetworkUtil.isNetConnected()
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
onPageShow(): void {
this.getUserInfo()
... ... @@ -52,10 +53,21 @@ struct MineHomePage {
build() {
if(this.isConnectNetwork){
Stack({ alignContent: Alignment.Top }){
Image($r('app.media.title_bg'))
.width('100%')
.height('355lpx')
.objectFit(ImageFit.Cover)
Stack({ alignContent: Alignment.Top }){
Image($r('app.media.title_bg'))
.width('100%')
.height('355lpx')
.objectFit(ImageFit.Cover)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
Row()
.height(px2vp(this.topSafeHeight))
.width("100%")
.backgroundColor($r('app.color.white'))
.visibility(this.tileOpacity > 0 ? 0 : 1)
.opacity(this.tileOpacity )
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
}
Column(){
Stack({ alignContent: Alignment.Top }){
... ... @@ -262,7 +274,7 @@ struct MineHomePage {
.scrollBar(BarState.Off)
.width('100%')
.layoutWeight(1)
}
}.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
}.width('100%')
.layoutWeight(1)
}else{
... ... @@ -385,10 +397,10 @@ struct MineHomePage {
this.editUserInfo()
})
}
.visibility(this.tileOpacity > 0 ? 0 : 1)
.height('84lpx')
.width('100%')
.backgroundColor($r('app.color.white'))
.visibility(this.tileOpacity > 0 ? 0 : 1)
.opacity(this.tileOpacity )
}
... ...
... ... @@ -15,6 +15,7 @@ const TAG = "OtherNormalUserHomePage"
struct OtherNormalUserHomePage {
@State params:Record<string, string> = router.getParams() as Record<string, string>;
@Watch('change') @State curUserId: string = '-1';
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
onPageShow() {
this.curUserId = this.params?.['userId'];
... ... @@ -52,10 +53,21 @@ struct OtherNormalUserHomePage {
build() {
if(this.isConnectNetwork){
Stack({ alignContent: Alignment.Top }){
Image($r('app.media.title_bg'))
.width('100%')
.height('355lpx')
.objectFit(ImageFit.Cover)
Stack({ alignContent: Alignment.Top }){
Image($r('app.media.title_bg'))
.width('100%')
.height('355lpx')
.objectFit(ImageFit.Cover)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
Row()
.height(px2vp(this.topSafeHeight))
.width("100%")
.backgroundColor($r('app.color.white'))
.visibility(this.tileOpacity > 0 ? 0 : 1)
.opacity(this.tileOpacity )
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
}
Column(){
Stack({ alignContent: Alignment.Top }){
... ... @@ -229,7 +241,7 @@ struct OtherNormalUserHomePage {
.scrollBar(BarState.Off)
.width('100%')
.layoutWeight(1)
}
}.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
}.width('100%')
.layoutWeight(1)
}else{
... ...
... ... @@ -9,6 +9,7 @@ struct SubscribeMessagePage {
build() {
Column(){
SubscribeMessageComponent()
}
}.height("100%")
.width("100%")
}
}
\ No newline at end of file
... ...