zhenghy

Merge remote-tracking branch 'origin/main'

... ... @@ -211,12 +211,13 @@ export struct MorningEveningPaperComponent {
}
.height('100%')
PaperTitleComponent().margin({
top: this.topSafeHeight
})
PaperTitleComponent()
}
.width('100%')
.height('100%')
.padding({
top: this.topSafeHeight
})
// .backgroundColor(Color.Black)
// .backgroundColor(this.pageInfoBean?.backgroundColor ?? Color.Black)
.backgroundColor(this.mixedBgColor ?? Color.Black)
... ...
... ... @@ -16,6 +16,7 @@ const TAG = 'Zh_Single_Row-03'
@Component
export struct ZhSingleRow03 {
@State compDTO: CompDTO = {} as CompDTO
@State isEndEdge: boolean = false;
scroller: Scroller = new Scroller()
format(timeNum: number) {
... ... @@ -106,6 +107,19 @@ export struct ZhSingleRow03 {
}
.scrollable(ScrollDirection.Horizontal)
.scrollBar(BarState.Off)
.onScrollEdge((side: Edge) => {
if (side === Edge.End) {
this.isEndEdge = true;
}
})
.onScrollStop(() => {
if (this.isEndEdge) {
this.jumpToMore();
}
})
.onScroll((xOffset: number, yOffset: number) => {
this.isEndEdge = false;
})
}
.padding({
left: $r('app.float.card_comp_pagePadding_lf'),
... ... @@ -143,6 +157,19 @@ export struct ZhSingleRow03 {
right: $r('app.float.card_comp_pagePadding_lf'),
})
.onClick(() => {
this.jumpToMore();
})
}
.justifyContent(FlexAlign.SpaceBetween)
.margin({ top: 8, bottom: 8 })
.width('100%')
}
private jumpToLiveMorePage() {
WDRouterRule.jumpWithPage(WDRouterPage.reserveMorePage)
}
private jumpToMore() {
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
... ... @@ -154,23 +181,8 @@ export struct ZhSingleRow03 {
} else {
this.jumpToLiveMorePage()
}
})
}
.justifyContent(FlexAlign.SpaceBetween)
.margin({ top: 8, bottom: 8 })
.width('100%')
}
private jumpToLiveMorePage() {
// let taskAction: Action = {
// type: 'JUMP_INNER_NEW_PAGE',
// params: {
// pageID: 'LIVE_MORE_PAGE'
// } as Params,
// };
// WDRouterRule.jumpWithAction(taskAction)
WDRouterRule.jumpWithPage(WDRouterPage.reserveMorePage)
}
}
@Extend(Text)
... ...
... ... @@ -199,7 +199,9 @@ struct EditUserInfoPage {
getAccountOwnerInfo(){
EditInfoViewModel.queryAccountOwnerInfo(1,getContext(this)).then((editModel) => {
this.listData = []
if (editModel.userExtend.headPhotoUrl) {
this.headerImg = editModel.userExtend.headPhotoUrl
}
this.currentUserInfo = editModel as editModel;
this.listData.push(...EditInfoViewModel.getEditListInfo(editModel))
});
... ...
... ... @@ -4,9 +4,11 @@ import { WDRouterPage } from 'wdRouter';
@Entry
@Component
struct GuidePages {
guideImage = [$r('app.media.guide_static1'), $r('app.media.guide_static2'), $r('app.media.guide_static3'), $r('app.media.guide_static4'),$r('app.media.guide_static5')]
guideTitle = [$r('app.media.guide_title1'), $r('app.media.guide_title2'), $r('app.media.guide_title3'), $r('app.media.guide_title4'),$r('app.media.guide_title5')]
guideIndex = [$r('app.media.guide_index1'), $r('app.media.guide_index2'), $r('app.media.guide_index3'),$r('app.media.guide_index4'), $r('app.media.guide_button')]
// guideImage = [$r('app.media.guide_static1'), $r('app.media.guide_static2'), $r('app.media.guide_static3'), $r('app.media.guide_static4'),$r('app.media.guide_static5')]
// guideTitle = [$r('app.media.guide_title1'), $r('app.media.guide_title2'), $r('app.media.guide_title3'), $r('app.media.guide_title4'),$r('app.media.guide_title5')]
// guideIndex = [$r('app.media.guide_index1'), $r('app.media.guide_index2'), $r('app.media.guide_index3'),$r('app.media.guide_index4'), $r('app.media.guide_button')]
guideImage = [$r('app.media.guide_Static')]
guideIndex = [$r('app.media.guide_button')]
build() {
Column() {
... ... @@ -32,32 +34,34 @@ struct GuidePages {
top: { anchor: "__container__", align: VerticalAlign.Top },
bottom: { anchor: "__container__", align: VerticalAlign.Bottom }
})
.margin({bottom:150})
.width('100%')
.height('100%')
.height('60%')
.id('image')
Image(this.guideTitle[index])
.objectFit(ImageFit.ScaleDown)
.alignRules({
bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
left: { anchor: "__container__", align: HorizontalAlign.Start },
right: { anchor: "__container__", align: HorizontalAlign.End },
})
.margin({ left: 60, bottom: 150, right: 60 })
.alignSelf(ItemAlign.Center)
.id('title')
// Image('')
// .objectFit(imagefit.scaledown)
// .alignRules({
// bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
// left: { anchor: "__container__", align: HorizontalAlign.Start },
// right: { anchor: "__container__", align: HorizontalAlign.End },
// })
// .margin({ left: 60, bottom: 150, right: 60 })
// .alignSelf(ItemAlign.Center)
// .id('title')
Image(this.guideIndex[index])
.objectFit(ImageFit.ScaleDown)
.objectFit(ImageFit.Fill)
.alignRules({
bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
left: { anchor: "__container__", align: HorizontalAlign.Start },
right: { anchor: "__container__", align: HorizontalAlign.End },
})
.margin({ bottom: 85 })
.height(40)
.margin({ bottom: 85})
.width(191)
.height(44)
.onClick(() => {
if (index == 4) {
if (index == 0) {
// 跳转到首页
//WDRouterRule.jumpWithReplacePage(WDRouterPage.mainPage)
//跳转到兴趣偏好选择页
... ...
... ... @@ -17,7 +17,7 @@ struct MorningEveningPaperPage {
pageTransition() {
// 定义页面进入时的效果,从底侧滑入
PageTransitionEnter({ type: RouteType.None, duration: 300 })
PageTransitionEnter({ type: RouteType.Push, duration: 300 })
.slide(SlideEffect.Bottom).onEnter((type: RouteType, progress: number) => {
if (progress >= 0.99) {
WindowModel.shared.setWindowLayoutFullScreen(true)
... ... @@ -25,7 +25,7 @@ struct MorningEveningPaperPage {
}
})
// 定义页面退出时的效果,向底侧滑出
PageTransitionExit({ type: RouteType.None, duration: 300 })
PageTransitionExit({ type: RouteType.Pop, duration: 300 })
.slide(SlideEffect.Bottom)
}
... ...
... ... @@ -66,6 +66,15 @@ struct LaunchInterestsHobbiesPage {
.backgroundColor(Color.White)
.borderRadius(5)
Stack(){
Image('')
.width('100%')
.height('100%')
.backgroundColor(Color.Gray)
.opacity(item.choose?0.7:0)
.borderRadius(5)
}
Stack(){
Column({}){
Text(item.name)
.fontSize(18)
... ... @@ -88,14 +97,6 @@ struct LaunchInterestsHobbiesPage {
}.justifyContent(FlexAlign.Start)
}
Stack(){
Image('')
.width('100%')
.height('100%')
.backgroundColor(Color.White)
.opacity(item.choose?0:0.6)
.borderRadius(5)
}
}
}
.width('192lpx')
... ...