wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  底导tab宽度修改,扩大点击响应热区
  ref |> 图文详情页 适配全屏
  fix:bug[17637] 编辑简介区域鸿蒙与安卓区域大小不一致
  fix: 1、读报纸,滑到底部,继续上滑,缺少向上并回弹的效果
  fix:bug[18286]  【UAT】【搜索】根据稿件名称搜索到结果后,再次点击搜索按钮,不能触发搜索
... ... @@ -32,7 +32,7 @@ export struct ENewspaperPageComponent {
@State swiperIndex: number = 0;
//当前选择的日期标记
@State selectDate: Date = new Date()
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State ratio: string = '100%'
@State toastText: ResourceStr = ""
... ... @@ -280,17 +280,18 @@ export struct ENewspaperPageComponent {
this.swiperIndex = index
})
Image($r('app.media.newspaper_shadow'))
.height($r('app.float.vp_12'))
.width('100%')
.margin({ left: 10, right: 10, top: -1 })
.objectFit(ImageFit.Contain)
.alignRules({
top: { anchor: "e_newspaper_content", align: VerticalAlign.Bottom },
// left: { anchor: 'e_newspaper_content', align: HorizontalAlign.Start },
// right: { anchor: 'e_newspaper_content', align: HorizontalAlign.End }
})
.id('e_newspaper_shadow')
Row() {
Image($r('app.media.newspaper_shadow'))
.height($r('app.float.vp_12'))
.width('100%')
.objectFit(ImageFit.Contain)
}.margin({ top: -1,left: 10, right: 10 }).alignRules({
top: { anchor: "e_newspaper_content", align: VerticalAlign.Bottom },
// left: { anchor: 'e_newspaper_content', align: HorizontalAlign.Start },
// right: { anchor: 'e_newspaper_content', align: HorizontalAlign.End }
})
.id('e_newspaper_shadow')
Row() {
Text(this.swiperIndex + 1 == this.newspaperListBean?.list?.length ? '已到底部,可以选择其他日期' :
... ... @@ -407,7 +408,7 @@ export struct ENewspaperPageComponent {
.width('100%')
.height('100%')
.backgroundColor($r('app.color.color_80000000'))
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
// .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
.id('e_newspaper_container')
if (this.isOpenListDialog) {
... ...
... ... @@ -61,6 +61,7 @@ export struct ImageAndTextPageComponent {
@State likeNum: number = 0
@State reachEndIncreament: number = 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State isScrollTop: boolean = true
@State offsetY: number = 0
pageShowTime:number = 0;
... ... @@ -88,7 +89,7 @@ export struct ImageAndTextPageComponent {
action: this.action,
isPageEnd: $isPageEnd
})
.padding({ top: 15, bottom: 10 })
.padding({ bottom: 10 })
Column() {
// 点赞
if (this.contentDetailData?.openLikes && this.contentDetailData?.likesStyle !== 4) {
... ... @@ -159,8 +160,8 @@ export struct ImageAndTextPageComponent {
}
.id('imgTextContainer')
}
.padding({bottom: 44})
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
.scrollBar(BarState.Off)
.align(Alignment.Top)
.onReachEnd(() => {
... ... @@ -174,10 +175,10 @@ export struct ImageAndTextPageComponent {
retry: () => {
this.getDetail()
}
}).padding({ bottom: 200 })
}).padding({ bottom: 44 })
} else {
if (!this.isPageEnd) {
detailedSkeleton().padding({ bottom: this.bottomSafeHeight })
detailedSkeleton().padding({ bottom: 44 })
}
}
// 底部交互区
... ... @@ -206,12 +207,10 @@ export struct ImageAndTextPageComponent {
this.isScrollTop = !this.isScrollTop
}
})
.position({ y: '100%' })
}
.margin({top: `${this.topSafeHeight}px`, bottom: `${this.bottomSafeHeight}px`})
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
.padding({ top: 38 })
// .height(CommonConstants.FULL_HEIGHT)
// 发布时间
Column() {
... ... @@ -242,6 +241,7 @@ export struct ImageAndTextPageComponent {
.backgroundColor(Color.White)
}.backgroundColor(Color.White)
}
.margin({top: `${this.topSafeHeight}px`, bottom: `${this.bottomSafeHeight}px`})
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
.backgroundColor(Color.White)
... ...
import router from '@ohos.router'
import { BreakpointSystem, NetworkUtil, StringUtils, ToastUtils } from 'wdKit'
import { BreakpointSystem, DateTimeUtils, NetworkUtil, StringUtils, ToastUtils } from 'wdKit'
import { ParamType, TrackConstants, Tracking } from 'wdTracking/Index'
import SearcherAboutDataModel from '../../model/SearcherAboutDataModel'
import { SearchHistoryItem } from '../../viewmodel/SearchHistoryItem'
... ... @@ -32,6 +32,7 @@ export struct SearchComponent {
@State count:string[] = []
@State isGetRequest:boolean = false
@Link fromTabName: string
@State sameSearch:number = 0 //再次搜索
@StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm';
private breakpointSystem = new BreakpointSystem();
... ... @@ -175,7 +176,7 @@ export struct SearchComponent {
this.getSearchHistoryData()
this.getSearchInputResData(this.searchText)
}
},percent:this.percent})
},percent:this.percent,sameSearch:this.sameSearch})
} else {
//联想搜索
SearchRelatedComponent({relatedSearchContentData:$relatedSearchContentsData,onGetSearchRes: (item): void => this.getSearchRelatedResData(item),searchText:this.searchText,percent:this.percent})
... ... @@ -402,6 +403,7 @@ export struct SearchComponent {
}
this.isGetRequest = true
this.resetSearch()
this.sameSearch = DateTimeUtils.getTimeStamp()
}).catch((err: Error) => {
console.log(TAG, JSON.stringify(err))
this.isGetRequest = true
... ...
... ... @@ -29,6 +29,8 @@ export struct SearchResultComponent {
onClickTryAgain?: () => void;
@State isConnectNetwork : boolean = NetworkUtil.isNetConnected()
@Prop percent:number = 1
@Prop sameSearch:number = 0
aboutToAppear(): void {
if (this.count.length === 0 && this.isGetRequest == true) {
... ... @@ -137,7 +139,7 @@ export struct SearchResultComponent {
Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
ForEach(this.count, (item: string, index: number) => {
TabContent() {
SearchResultContentComponent({ keywords: this.searchText, searchType: item })
SearchResultContentComponent({ keywords: this.searchText, searchType: item ,sameSearch:this.sameSearch,isCurrentShow:this.currentIndex === index})
}.tabBar(this.TabBuilder(index, item))
.layoutWeight(1)
}, (item: string, index: number) => index.toString())
... ...
... ... @@ -51,7 +51,22 @@ export struct SearchResultContentComponent {
@State moreWidth:number = 20
@State listLeft: number = 0
@State isEnd: boolean = false
@Watch('updateData') @Prop sameSearch:number = 0
@Prop isCurrentShow:boolean = false;
updateData(){
if(this.isCurrentShow){
this.data_rmh = []
this.data.clearAllData()
this.curPageNum = 1
this.hasMore = true
this.isLoading = false
this.getNewSearchResultData()
}
}
aboutToAppear(): void {
if (this.searchType == "全部") {
... ...
... ... @@ -18,6 +18,7 @@ export struct ENewspaperListDialog {
private listScroller: Scroller = new Scroller()
@State scrollOffset: number = 0
@State isCurrentViewOpen: boolean = false
@Consume bottomSafeHeight:number
//文字版选择弹框
pageListDialogController: CustomDialogController = new CustomDialogController({
builder: ENewspaperPageDialog({
... ... @@ -266,13 +267,13 @@ export struct ENewspaperListDialog {
left: 15,
right: 15,
// top: 16,
bottom: 16
// bottom: 16
})
.margin({
bottom: 85
})
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
.edgeEffect(EdgeEffect.Spring)
.onScrollIndex((firstIndex: number, lastIndex: number, centerIndex: number) => {
console.info('ENewspaperListDialog::first' + firstIndex)
console.info('ENewspaperListDialog::last' + lastIndex)
... ... @@ -288,19 +289,14 @@ export struct ENewspaperListDialog {
// }
})
}
// .margin({ top: 124 })
.margin({ top: this.topHeight })
.width('100%')
.backgroundColor(Color.White)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
.onClick(() => {
})
}.width('100%')
.height('100%')
.backgroundColor('#80000000')
.margin({bottom:44})
.margin({bottom:50})
.onClick(() => {
if (this.closeDialog) {
this.closeDialog()
... ...
... ... @@ -214,12 +214,7 @@ struct MineHomePage {
.fontWeight('400lpx')
.fontColor(this.isHasIntroduction?$r('app.color.color_222222'):$r('app.color.color_999999'))
.textAlign(TextAlign.Start)
.onClick(()=>{
let params: editModelParams = {
editContent: this.isHasIntroduction?this.desc:''
}
WDRouterRule.jumpWithPage(WDRouterPage.editUserIntroductionPage,params)
})
if(!this.isHasIntroduction){
Image($r('app.media.user_info_edit_icon'))
.width('27lpx')
... ... @@ -227,7 +222,12 @@ struct MineHomePage {
.interpolation(ImageInterpolation.High)
.objectFit(ImageFit.Auto)
}
}
}.onClick(()=>{
let params: editModelParams = {
editContent: this.isHasIntroduction?this.desc:''
}
WDRouterRule.jumpWithPage(WDRouterPage.editUserIntroductionPage,params)
})
Text(`来到人民日报${this.registerTimeForDay}天`)
... ...
... ... @@ -140,6 +140,7 @@ export struct BottomNavigationComponent {
.opacity(this.currentNavIndex === index ? this.FULL_OPACITY : this.SIXTY_OPACITY)
}
.zIndex(10)
.width('100%')
.height($r('app.float.bottom_navigation_barHeight'))
.hoverEffect(HoverEffect.Highlight)
.visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None)
... ...