Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
20 changed files
with
121 additions
and
91 deletions
| @@ -163,7 +163,7 @@ function buildErrorMsg(httpStatus: number): string { | @@ -163,7 +163,7 @@ function buildErrorMsg(httpStatus: number): string { | ||
| 163 | if(httpStatus != undefined){ | 163 | if(httpStatus != undefined){ |
| 164 | message = `连接出错(${httpStatus})!`; | 164 | message = `连接出错(${httpStatus})!`; |
| 165 | }else{ | 165 | }else{ |
| 166 | - message = `连接出错!`; | 166 | + message = `网络出小差了,请检查网络后重试`; |
| 167 | } | 167 | } |
| 168 | } | 168 | } |
| 169 | 169 |
| @@ -13,7 +13,7 @@ export class HttpUrlUtils { | @@ -13,7 +13,7 @@ export class HttpUrlUtils { | ||
| 13 | */ | 13 | */ |
| 14 | static readonly BOTTOM_NAV_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/bottomNavGroup"; | 14 | static readonly BOTTOM_NAV_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/bottomNavGroup"; |
| 15 | /** | 15 | /** |
| 16 | - * 底导详情接口 | 16 | + * 顶导详情接口 |
| 17 | */ | 17 | */ |
| 18 | static readonly BOTTOM_NAV_DETAIL_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/bottomNavGroup/detail"; | 18 | static readonly BOTTOM_NAV_DETAIL_PATH: string = "/api/rmrb-bff-display-zh/display/zh/c/bottomNavGroup/detail"; |
| 19 | /** | 19 | /** |
| @@ -45,8 +45,6 @@ export struct CompParser { | @@ -45,8 +45,6 @@ export struct CompParser { | ||
| 45 | 45 | ||
| 46 | aboutToAppear(): void { | 46 | aboutToAppear(): void { |
| 47 | 47 | ||
| 48 | - | ||
| 49 | - | ||
| 50 | console.log('CompParser-compDTO', JSON.stringify(this.compDTO)) | 48 | console.log('CompParser-compDTO', JSON.stringify(this.compDTO)) |
| 51 | this.pageName = this.pageModel.pageInfo.name | 49 | this.pageName = this.pageModel.pageInfo.name |
| 52 | // 轮播图屏蔽音频类型稿件 | 50 | // 轮播图屏蔽音频类型稿件 |
| @@ -81,13 +79,11 @@ export struct CompParser { | @@ -81,13 +79,11 @@ export struct CompParser { | ||
| 81 | @Builder | 79 | @Builder |
| 82 | componentBuilder() { | 80 | componentBuilder() { |
| 83 | 81 | ||
| 84 | - //CardParser({ contentDTO: this.compDTO.operDataList[0], compDTO:this.compDTO }) | ||
| 85 | - | ||
| 86 | if (this.compDTO.operDataList[0]?.objectType !== '3' && | 82 | if (this.compDTO.operDataList[0]?.objectType !== '3' && |
| 87 | this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口 | 83 | this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口 |
| 88 | if (this.compDTO.compStyle === CompStyle.Label_03) { | 84 | if (this.compDTO.compStyle === CompStyle.Label_03) { |
| 89 | LabelComponent({ compDTO: this.compDTO }) | 85 | LabelComponent({ compDTO: this.compDTO }) |
| 90 | - Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 86 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 91 | } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { | 87 | } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { |
| 92 | if (this.compDTO.operDataList.length > this.audioItems.length) { | 88 | if (this.compDTO.operDataList.length > this.audioItems.length) { |
| 93 | ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 89 | ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| @@ -104,7 +100,7 @@ export struct CompParser { | @@ -104,7 +100,7 @@ export struct CompParser { | ||
| 104 | } else { | 100 | } else { |
| 105 | HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 101 | HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 106 | } | 102 | } |
| 107 | - Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 103 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 108 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) { | 104 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) { |
| 109 | ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 105 | ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 110 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 106 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| @@ -121,20 +117,20 @@ export struct CompParser { | @@ -121,20 +117,20 @@ export struct CompParser { | ||
| 121 | 117 | ||
| 122 | } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) { | 118 | } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) { |
| 123 | ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 119 | ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 124 | - Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 120 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 125 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) { | 121 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) { |
| 126 | ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 122 | ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 127 | - Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 123 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 128 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) { | 124 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) { |
| 129 | // ZhSingleRow05({ compDTO }) | 125 | // ZhSingleRow05({ compDTO }) |
| 130 | // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 126 | // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 131 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) { | 127 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) { |
| 132 | ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 128 | ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 133 | - Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 129 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 134 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) { | 130 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) { |
| 135 | //头图卡 和comStyle 2相同, | 131 | //头图卡 和comStyle 2相同, |
| 136 | Card5Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], titleShowPolicy: this.compDTO.titleShowPolicy, pageId: this.pageId, pageName: this.pageName }) | 132 | Card5Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], titleShowPolicy: this.compDTO.titleShowPolicy, pageId: this.pageId, pageName: this.pageName }) |
| 137 | - Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 133 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 138 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) { | 134 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) { |
| 139 | // 大图卡 | 135 | // 大图卡 |
| 140 | Card2Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) | 136 | Card2Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) |
| @@ -142,28 +138,28 @@ export struct CompParser { | @@ -142,28 +138,28 @@ export struct CompParser { | ||
| 142 | } else if (this.compDTO.compStyle === CompStyle.Card_09) { | 138 | } else if (this.compDTO.compStyle === CompStyle.Card_09) { |
| 143 | //时间链卡 | 139 | //时间链卡 |
| 144 | Card9Component({ compDTO: this.compDTO, contentDTO:this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) | 140 | Card9Component({ compDTO: this.compDTO, contentDTO:this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) |
| 145 | - Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 141 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 146 | } else if(this.compDTO.compStyle === CompStyle.Card_13){ | 142 | } else if(this.compDTO.compStyle === CompStyle.Card_13){ |
| 147 | Card6Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) | 143 | Card6Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) |
| 148 | - Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 144 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 149 | } else if(this.compDTO.compStyle === CompStyle.Card_03){ | 145 | } else if(this.compDTO.compStyle === CompStyle.Card_03){ |
| 150 | Card3Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) | 146 | Card3Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) |
| 151 | - Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 147 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 152 | }else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) { | 148 | }else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) { |
| 153 | ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 149 | ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 154 | - Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 150 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 155 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { | 151 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { |
| 156 | // ZhSingleColumn05({ compDTO: compDTO }) | 152 | // ZhSingleColumn05({ compDTO: compDTO }) |
| 157 | // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 153 | // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 158 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) { | 154 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) { |
| 159 | - Divider().strokeWidth(3).color('#ffffff').padding({ left: 0, right: 0 }).margin({ top: -3 }) | ||
| 160 | - Divider().strokeWidth(6).color('#f5f5f5') | 155 | + // Divider().strokeWidth(3).color('#ffffff').padding({ left: 0, right: 0 }).margin({ top: -3 }) |
| 156 | + // Divider().strokeWidth(6).color('#f5f5f5') | ||
| 161 | ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 157 | ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 162 | - Divider().strokeWidth(6).color('#f5f5f5') | 158 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 163 | } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 | 159 | } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 |
| 164 | AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO }) | 160 | AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO }) |
| 165 | //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 }) | 161 | //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 }) |
| 166 | - Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 162 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 167 | } else if (!Number.isNaN(Number(this.compDTO.compStyle))) { | 163 | } else if (!Number.isNaN(Number(this.compDTO.compStyle))) { |
| 168 | CardParser({ contentDTO: this.compDTO.operDataList[0], compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }); | 164 | CardParser({ contentDTO: this.compDTO.operDataList[0], compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }); |
| 169 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 165 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| @@ -32,7 +32,7 @@ export struct ENewspaperPageComponent { | @@ -32,7 +32,7 @@ export struct ENewspaperPageComponent { | ||
| 32 | @State swiperIndex: number = 0; | 32 | @State swiperIndex: number = 0; |
| 33 | //当前选择的日期标记 | 33 | //当前选择的日期标记 |
| 34 | @State selectDate: Date = new Date() | 34 | @State selectDate: Date = new Date() |
| 35 | - @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | 35 | + @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 |
| 36 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | 36 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 |
| 37 | @State ratio: string = '100%' | 37 | @State ratio: string = '100%' |
| 38 | @State toastText: ResourceStr = "" | 38 | @State toastText: ResourceStr = "" |
| @@ -280,17 +280,18 @@ export struct ENewspaperPageComponent { | @@ -280,17 +280,18 @@ export struct ENewspaperPageComponent { | ||
| 280 | this.swiperIndex = index | 280 | this.swiperIndex = index |
| 281 | }) | 281 | }) |
| 282 | 282 | ||
| 283 | - Image($r('app.media.newspaper_shadow')) | ||
| 284 | - .height($r('app.float.vp_12')) | ||
| 285 | - .width('100%') | ||
| 286 | - .margin({ left: 10, right: 10, top: -1 }) | ||
| 287 | - .objectFit(ImageFit.Contain) | ||
| 288 | - .alignRules({ | ||
| 289 | - top: { anchor: "e_newspaper_content", align: VerticalAlign.Bottom }, | ||
| 290 | - // left: { anchor: 'e_newspaper_content', align: HorizontalAlign.Start }, | ||
| 291 | - // right: { anchor: 'e_newspaper_content', align: HorizontalAlign.End } | ||
| 292 | - }) | ||
| 293 | - .id('e_newspaper_shadow') | 283 | + Row() { |
| 284 | + Image($r('app.media.newspaper_shadow')) | ||
| 285 | + .height($r('app.float.vp_12')) | ||
| 286 | + .width('100%') | ||
| 287 | + .objectFit(ImageFit.Contain) | ||
| 288 | + | ||
| 289 | + }.margin({ top: -1,left: 10, right: 10 }).alignRules({ | ||
| 290 | + top: { anchor: "e_newspaper_content", align: VerticalAlign.Bottom }, | ||
| 291 | + // left: { anchor: 'e_newspaper_content', align: HorizontalAlign.Start }, | ||
| 292 | + // right: { anchor: 'e_newspaper_content', align: HorizontalAlign.End } | ||
| 293 | + }) | ||
| 294 | + .id('e_newspaper_shadow') | ||
| 294 | 295 | ||
| 295 | Row() { | 296 | Row() { |
| 296 | Text(this.swiperIndex + 1 == this.newspaperListBean?.list?.length ? '已到底部,可以选择其他日期' : | 297 | Text(this.swiperIndex + 1 == this.newspaperListBean?.list?.length ? '已到底部,可以选择其他日期' : |
| @@ -407,7 +408,7 @@ export struct ENewspaperPageComponent { | @@ -407,7 +408,7 @@ export struct ENewspaperPageComponent { | ||
| 407 | .width('100%') | 408 | .width('100%') |
| 408 | .height('100%') | 409 | .height('100%') |
| 409 | .backgroundColor($r('app.color.color_80000000')) | 410 | .backgroundColor($r('app.color.color_80000000')) |
| 410 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | 411 | + // .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) |
| 411 | .id('e_newspaper_container') | 412 | .id('e_newspaper_container') |
| 412 | 413 | ||
| 413 | if (this.isOpenListDialog) { | 414 | if (this.isOpenListDialog) { |
| @@ -61,6 +61,7 @@ export struct ImageAndTextPageComponent { | @@ -61,6 +61,7 @@ export struct ImageAndTextPageComponent { | ||
| 61 | @State likeNum: number = 0 | 61 | @State likeNum: number = 0 |
| 62 | @State reachEndIncreament: number = 0 | 62 | @State reachEndIncreament: number = 0 |
| 63 | @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | 63 | @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 |
| 64 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | ||
| 64 | @State isScrollTop: boolean = true | 65 | @State isScrollTop: boolean = true |
| 65 | @State offsetY: number = 0 | 66 | @State offsetY: number = 0 |
| 66 | pageShowTime:number = 0; | 67 | pageShowTime:number = 0; |
| @@ -88,7 +89,7 @@ export struct ImageAndTextPageComponent { | @@ -88,7 +89,7 @@ export struct ImageAndTextPageComponent { | ||
| 88 | action: this.action, | 89 | action: this.action, |
| 89 | isPageEnd: $isPageEnd | 90 | isPageEnd: $isPageEnd |
| 90 | }) | 91 | }) |
| 91 | - .padding({ top: 15, bottom: 10 }) | 92 | + .padding({ bottom: 10 }) |
| 92 | Column() { | 93 | Column() { |
| 93 | // 点赞 | 94 | // 点赞 |
| 94 | if (this.contentDetailData?.openLikes && this.contentDetailData?.likesStyle !== 4) { | 95 | if (this.contentDetailData?.openLikes && this.contentDetailData?.likesStyle !== 4) { |
| @@ -159,8 +160,8 @@ export struct ImageAndTextPageComponent { | @@ -159,8 +160,8 @@ export struct ImageAndTextPageComponent { | ||
| 159 | } | 160 | } |
| 160 | .id('imgTextContainer') | 161 | .id('imgTextContainer') |
| 161 | } | 162 | } |
| 163 | + .padding({bottom: 44}) | ||
| 162 | .width(CommonConstants.FULL_WIDTH) | 164 | .width(CommonConstants.FULL_WIDTH) |
| 163 | - .height(CommonConstants.FULL_HEIGHT) | ||
| 164 | .scrollBar(BarState.Off) | 165 | .scrollBar(BarState.Off) |
| 165 | .align(Alignment.Top) | 166 | .align(Alignment.Top) |
| 166 | .onReachEnd(() => { | 167 | .onReachEnd(() => { |
| @@ -174,10 +175,10 @@ export struct ImageAndTextPageComponent { | @@ -174,10 +175,10 @@ export struct ImageAndTextPageComponent { | ||
| 174 | retry: () => { | 175 | retry: () => { |
| 175 | this.getDetail() | 176 | this.getDetail() |
| 176 | } | 177 | } |
| 177 | - }).padding({ bottom: 200 }) | 178 | + }).padding({ bottom: 44 }) |
| 178 | } else { | 179 | } else { |
| 179 | if (!this.isPageEnd) { | 180 | if (!this.isPageEnd) { |
| 180 | - detailedSkeleton().padding({ bottom: this.bottomSafeHeight }) | 181 | + detailedSkeleton().padding({ bottom: 44 }) |
| 181 | } | 182 | } |
| 182 | } | 183 | } |
| 183 | // 底部交互区 | 184 | // 底部交互区 |
| @@ -206,12 +207,10 @@ export struct ImageAndTextPageComponent { | @@ -206,12 +207,10 @@ export struct ImageAndTextPageComponent { | ||
| 206 | this.isScrollTop = !this.isScrollTop | 207 | this.isScrollTop = !this.isScrollTop |
| 207 | } | 208 | } |
| 208 | }) | 209 | }) |
| 209 | - .position({ y: '100%' }) | ||
| 210 | } | 210 | } |
| 211 | + .margin({top: `${this.topSafeHeight}px`, bottom: `${this.bottomSafeHeight}px`}) | ||
| 211 | .width(CommonConstants.FULL_WIDTH) | 212 | .width(CommonConstants.FULL_WIDTH) |
| 212 | - .height(CommonConstants.FULL_HEIGHT) | ||
| 213 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) | ||
| 214 | - .padding({ top: 38 }) | 213 | + // .height(CommonConstants.FULL_HEIGHT) |
| 215 | 214 | ||
| 216 | // 发布时间 | 215 | // 发布时间 |
| 217 | Column() { | 216 | Column() { |
| @@ -242,6 +241,7 @@ export struct ImageAndTextPageComponent { | @@ -242,6 +241,7 @@ export struct ImageAndTextPageComponent { | ||
| 242 | .backgroundColor(Color.White) | 241 | .backgroundColor(Color.White) |
| 243 | }.backgroundColor(Color.White) | 242 | }.backgroundColor(Color.White) |
| 244 | } | 243 | } |
| 244 | + .margin({top: `${this.topSafeHeight}px`, bottom: `${this.bottomSafeHeight}px`}) | ||
| 245 | .width(CommonConstants.FULL_WIDTH) | 245 | .width(CommonConstants.FULL_WIDTH) |
| 246 | .height(CommonConstants.FULL_HEIGHT) | 246 | .height(CommonConstants.FULL_HEIGHT) |
| 247 | .backgroundColor(Color.White) | 247 | .backgroundColor(Color.White) |
| @@ -239,7 +239,7 @@ struct createImg { | @@ -239,7 +239,7 @@ struct createImg { | ||
| 239 | }) { | 239 | }) { |
| 240 | Stack({alignContent: Alignment.BottomEnd}) { | 240 | Stack({alignContent: Alignment.BottomEnd}) { |
| 241 | Image(this.loadImg ? item.fullUrl : '') | 241 | Image(this.loadImg ? item.fullUrl : '') |
| 242 | - .backgroundColor(0xf5f5f5) | 242 | + .backgroundColor(index === 2 ? 0xffffff : 0xf5f5f5) |
| 243 | .aspectRatio(1) | 243 | .aspectRatio(1) |
| 244 | .width(113) | 244 | .width(113) |
| 245 | .height(113) | 245 | .height(113) |
| @@ -108,7 +108,7 @@ export struct Card9Component { | @@ -108,7 +108,7 @@ export struct Card9Component { | ||
| 108 | // 时间线--后端返回三个, | 108 | // 时间线--后端返回三个, |
| 109 | Column() { | 109 | Column() { |
| 110 | ForEach(this.contentDTO.slideShows, (item: slideShows, index: number) => { | 110 | ForEach(this.contentDTO.slideShows, (item: slideShows, index: number) => { |
| 111 | - this.timelineItem(item, index) | 111 | + this.timelineItem(item, index, index === this.contentDTO.slideShows.length - 1) |
| 112 | }) | 112 | }) |
| 113 | } | 113 | } |
| 114 | 114 | ||
| @@ -149,25 +149,41 @@ export struct Card9Component { | @@ -149,25 +149,41 @@ export struct Card9Component { | ||
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | @Builder | 151 | @Builder |
| 152 | - timelineItem(item: slideShows, index: number) { | 152 | + timelineItem(item: slideShows, index: number, isLastOne: boolean) { |
| 153 | Column() { | 153 | Column() { |
| 154 | Stack() { | 154 | Stack() { |
| 155 | - if (index < this.contentDTO.slideShows.length - 1) { | 155 | + if (index === 0) { |
| 156 | Divider() | 156 | Divider() |
| 157 | .vertical(true) | 157 | .vertical(true) |
| 158 | .color($r('app.color.color_EDEDED')) | 158 | .color($r('app.color.color_EDEDED')) |
| 159 | .strokeWidth(1) | 159 | .strokeWidth(1) |
| 160 | - .margin({ top: index > 0 ? 0 : 16, left: 4 }) | ||
| 161 | - } | ||
| 162 | - if (index > 0 && index == this.contentDTO.slideShows.length - 1) { | 160 | + .margin({ top: 16, left: 4 }) |
| 161 | + .height(16) | ||
| 162 | + } else { | ||
| 163 | Divider() | 163 | Divider() |
| 164 | .vertical(true) | 164 | .vertical(true) |
| 165 | .color($r('app.color.color_EDEDED')) | 165 | .color($r('app.color.color_EDEDED')) |
| 166 | .strokeWidth(1) | 166 | .strokeWidth(1) |
| 167 | + .margin({ top: 0, left: 4 }) | ||
| 167 | .height(16) | 168 | .height(16) |
| 168 | - .margin({ left: 4 }) | 169 | + if (!isLastOne) |
| 170 | + { | ||
| 171 | + Divider() | ||
| 172 | + .vertical(true) | ||
| 173 | + .color($r('app.color.color_EDEDED')) | ||
| 174 | + .strokeWidth(1) | ||
| 175 | + .margin({ top: 16, left: 4 }) | ||
| 176 | + .height(16) | ||
| 177 | + } | ||
| 169 | } | 178 | } |
| 170 | 179 | ||
| 180 | + // Divider() | ||
| 181 | + // .vertical(true) | ||
| 182 | + // .color($r('app.color.color_EDEDED')) | ||
| 183 | + // .strokeWidth(1) | ||
| 184 | + // .margin({ top: index > 0 ? 0 : 32, left: 4 }) | ||
| 185 | + // .height(16) | ||
| 186 | + | ||
| 171 | Column() { | 187 | Column() { |
| 172 | Row() { | 188 | Row() { |
| 173 | // 标题 | 189 | // 标题 |
| @@ -195,21 +211,14 @@ export struct Card9Component { | @@ -195,21 +211,14 @@ export struct Card9Component { | ||
| 195 | .maxLines(2) | 211 | .maxLines(2) |
| 196 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 212 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 197 | .alignSelf(ItemAlign.Center) | 213 | .alignSelf(ItemAlign.Center) |
| 198 | - .margin({ left: 12 }) | ||
| 199 | - // .padding({bottom: 20}) | ||
| 200 | - // if (item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url) { | ||
| 201 | - // Image(this.loadImg? item.fullColumnImgUrls[0].url : '') | ||
| 202 | - // .backgroundColor(0xf5f5f5) | ||
| 203 | - // .width(90) | ||
| 204 | - // .height(60) | ||
| 205 | - // .borderRadius($r('app.float.image_border_radius')) | ||
| 206 | - // } | 214 | + .margin({ left: 4 }) |
| 215 | + .padding({ bottom: 20, left: 12 }) | ||
| 216 | + .border({ width: { left: isLastOne ? 0 : 1 }, color: 0xededed}) | ||
| 207 | } | 217 | } |
| 208 | } | 218 | } |
| 209 | } | 219 | } |
| 210 | .alignContent(Alignment.TopStart) | 220 | .alignContent(Alignment.TopStart) |
| 211 | } | 221 | } |
| 212 | - .height(item.fullColumnImgUrls[0] && item.fullColumnImgUrls[0].url ? 100 : 50) | ||
| 213 | .alignItems(HorizontalAlign.Start) | 222 | .alignItems(HorizontalAlign.Start) |
| 214 | } | 223 | } |
| 215 | } | 224 | } |
| @@ -109,6 +109,7 @@ struct localCard { | @@ -109,6 +109,7 @@ struct localCard { | ||
| 109 | .width('100%') | 109 | .width('100%') |
| 110 | .margin({ bottom: 6 }) | 110 | .margin({ bottom: 6 }) |
| 111 | .flexShrink(0) | 111 | .flexShrink(0) |
| 112 | + .maxLines(1) | ||
| 112 | 113 | ||
| 113 | Text(this.operDataListItem.newsTitle) | 114 | Text(this.operDataListItem.newsTitle) |
| 114 | .width(CommonConstants.FULL_PARENT) | 115 | .width(CommonConstants.FULL_PARENT) |
| @@ -24,7 +24,7 @@ export struct PeopleShipHomeListComponent { | @@ -24,7 +24,7 @@ export struct PeopleShipHomeListComponent { | ||
| 24 | // 列表 | 24 | // 列表 |
| 25 | else if (this.publishCount == 0) { | 25 | else if (this.publishCount == 0) { |
| 26 | // 无数据展示 | 26 | // 无数据展示 |
| 27 | - EmptyComponent({emptyType: 12}).height('100%') | 27 | + EmptyComponent({emptyType: 12}).height('60%') |
| 28 | } else { | 28 | } else { |
| 29 | Column() { | 29 | Column() { |
| 30 | Stack({ alignContent: Alignment.Top }){ | 30 | Stack({ alignContent: Alignment.Top }){ |
| 1 | import router from '@ohos.router' | 1 | import router from '@ohos.router' |
| 2 | -import { BreakpointSystem, NetworkUtil, StringUtils, ToastUtils } from 'wdKit' | 2 | +import { BreakpointSystem, DateTimeUtils, NetworkUtil, StringUtils, ToastUtils } from 'wdKit' |
| 3 | import { ParamType, TrackConstants, Tracking } from 'wdTracking/Index' | 3 | import { ParamType, TrackConstants, Tracking } from 'wdTracking/Index' |
| 4 | import SearcherAboutDataModel from '../../model/SearcherAboutDataModel' | 4 | import SearcherAboutDataModel from '../../model/SearcherAboutDataModel' |
| 5 | import { SearchHistoryItem } from '../../viewmodel/SearchHistoryItem' | 5 | import { SearchHistoryItem } from '../../viewmodel/SearchHistoryItem' |
| @@ -32,6 +32,7 @@ export struct SearchComponent { | @@ -32,6 +32,7 @@ export struct SearchComponent { | ||
| 32 | @State count:string[] = [] | 32 | @State count:string[] = [] |
| 33 | @State isGetRequest:boolean = false | 33 | @State isGetRequest:boolean = false |
| 34 | @Link fromTabName: string | 34 | @Link fromTabName: string |
| 35 | + @State sameSearch:number = 0 //再次搜索 | ||
| 35 | 36 | ||
| 36 | @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm'; | 37 | @StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm'; |
| 37 | private breakpointSystem = new BreakpointSystem(); | 38 | private breakpointSystem = new BreakpointSystem(); |
| @@ -175,7 +176,7 @@ export struct SearchComponent { | @@ -175,7 +176,7 @@ export struct SearchComponent { | ||
| 175 | this.getSearchHistoryData() | 176 | this.getSearchHistoryData() |
| 176 | this.getSearchInputResData(this.searchText) | 177 | this.getSearchInputResData(this.searchText) |
| 177 | } | 178 | } |
| 178 | - },percent:this.percent}) | 179 | + },percent:this.percent,sameSearch:this.sameSearch}) |
| 179 | } else { | 180 | } else { |
| 180 | //联想搜索 | 181 | //联想搜索 |
| 181 | SearchRelatedComponent({relatedSearchContentData:$relatedSearchContentsData,onGetSearchRes: (item): void => this.getSearchRelatedResData(item),searchText:this.searchText,percent:this.percent}) | 182 | SearchRelatedComponent({relatedSearchContentData:$relatedSearchContentsData,onGetSearchRes: (item): void => this.getSearchRelatedResData(item),searchText:this.searchText,percent:this.percent}) |
| @@ -402,6 +403,7 @@ export struct SearchComponent { | @@ -402,6 +403,7 @@ export struct SearchComponent { | ||
| 402 | } | 403 | } |
| 403 | this.isGetRequest = true | 404 | this.isGetRequest = true |
| 404 | this.resetSearch() | 405 | this.resetSearch() |
| 406 | + this.sameSearch = DateTimeUtils.getTimeStamp() | ||
| 405 | }).catch((err: Error) => { | 407 | }).catch((err: Error) => { |
| 406 | console.log(TAG, JSON.stringify(err)) | 408 | console.log(TAG, JSON.stringify(err)) |
| 407 | this.isGetRequest = true | 409 | this.isGetRequest = true |
| @@ -29,6 +29,8 @@ export struct SearchResultComponent { | @@ -29,6 +29,8 @@ export struct SearchResultComponent { | ||
| 29 | onClickTryAgain?: () => void; | 29 | onClickTryAgain?: () => void; |
| 30 | @State isConnectNetwork : boolean = NetworkUtil.isNetConnected() | 30 | @State isConnectNetwork : boolean = NetworkUtil.isNetConnected() |
| 31 | @Prop percent:number = 1 | 31 | @Prop percent:number = 1 |
| 32 | + @Prop sameSearch:number = 0 | ||
| 33 | + | ||
| 32 | 34 | ||
| 33 | aboutToAppear(): void { | 35 | aboutToAppear(): void { |
| 34 | if (this.count.length === 0 && this.isGetRequest == true) { | 36 | if (this.count.length === 0 && this.isGetRequest == true) { |
| @@ -137,7 +139,7 @@ export struct SearchResultComponent { | @@ -137,7 +139,7 @@ export struct SearchResultComponent { | ||
| 137 | Tabs({ barPosition: BarPosition.Start, controller: this.controller }) { | 139 | Tabs({ barPosition: BarPosition.Start, controller: this.controller }) { |
| 138 | ForEach(this.count, (item: string, index: number) => { | 140 | ForEach(this.count, (item: string, index: number) => { |
| 139 | TabContent() { | 141 | TabContent() { |
| 140 | - SearchResultContentComponent({ keywords: this.searchText, searchType: item }) | 142 | + SearchResultContentComponent({ keywords: this.searchText, searchType: item ,sameSearch:this.sameSearch,isCurrentShow:this.currentIndex === index}) |
| 141 | }.tabBar(this.TabBuilder(index, item)) | 143 | }.tabBar(this.TabBuilder(index, item)) |
| 142 | .layoutWeight(1) | 144 | .layoutWeight(1) |
| 143 | }, (item: string, index: number) => index.toString()) | 145 | }, (item: string, index: number) => index.toString()) |
| @@ -51,7 +51,22 @@ export struct SearchResultContentComponent { | @@ -51,7 +51,22 @@ export struct SearchResultContentComponent { | ||
| 51 | @State moreWidth:number = 20 | 51 | @State moreWidth:number = 20 |
| 52 | @State listLeft: number = 0 | 52 | @State listLeft: number = 0 |
| 53 | @State isEnd: boolean = false | 53 | @State isEnd: boolean = false |
| 54 | + @Watch('updateData') @Prop sameSearch:number = 0 | ||
| 55 | + @Prop isCurrentShow:boolean = false; | ||
| 54 | 56 | ||
| 57 | + updateData(){ | ||
| 58 | + if(this.isCurrentShow){ | ||
| 59 | + this.data_rmh = [] | ||
| 60 | + | ||
| 61 | + this.data.clearAllData() | ||
| 62 | + | ||
| 63 | + this.curPageNum = 1 | ||
| 64 | + this.hasMore = true | ||
| 65 | + this.isLoading = false | ||
| 66 | + this.getNewSearchResultData() | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + } | ||
| 55 | 70 | ||
| 56 | aboutToAppear(): void { | 71 | aboutToAppear(): void { |
| 57 | if (this.searchType == "全部") { | 72 | if (this.searchType == "全部") { |
| @@ -18,6 +18,7 @@ export struct ENewspaperListDialog { | @@ -18,6 +18,7 @@ export struct ENewspaperListDialog { | ||
| 18 | private listScroller: Scroller = new Scroller() | 18 | private listScroller: Scroller = new Scroller() |
| 19 | @State scrollOffset: number = 0 | 19 | @State scrollOffset: number = 0 |
| 20 | @State isCurrentViewOpen: boolean = false | 20 | @State isCurrentViewOpen: boolean = false |
| 21 | + @Consume bottomSafeHeight:number | ||
| 21 | //文字版选择弹框 | 22 | //文字版选择弹框 |
| 22 | pageListDialogController: CustomDialogController = new CustomDialogController({ | 23 | pageListDialogController: CustomDialogController = new CustomDialogController({ |
| 23 | builder: ENewspaperPageDialog({ | 24 | builder: ENewspaperPageDialog({ |
| @@ -266,13 +267,13 @@ export struct ENewspaperListDialog { | @@ -266,13 +267,13 @@ export struct ENewspaperListDialog { | ||
| 266 | left: 15, | 267 | left: 15, |
| 267 | right: 15, | 268 | right: 15, |
| 268 | // top: 16, | 269 | // top: 16, |
| 269 | - bottom: 16 | 270 | + // bottom: 16 |
| 270 | }) | 271 | }) |
| 271 | .margin({ | 272 | .margin({ |
| 272 | bottom: 85 | 273 | bottom: 85 |
| 273 | }) | 274 | }) |
| 274 | .scrollBar(BarState.Off) | 275 | .scrollBar(BarState.Off) |
| 275 | - .edgeEffect(EdgeEffect.None) | 276 | + .edgeEffect(EdgeEffect.Spring) |
| 276 | .onScrollIndex((firstIndex: number, lastIndex: number, centerIndex: number) => { | 277 | .onScrollIndex((firstIndex: number, lastIndex: number, centerIndex: number) => { |
| 277 | console.info('ENewspaperListDialog::first' + firstIndex) | 278 | console.info('ENewspaperListDialog::first' + firstIndex) |
| 278 | console.info('ENewspaperListDialog::last' + lastIndex) | 279 | console.info('ENewspaperListDialog::last' + lastIndex) |
| @@ -288,19 +289,14 @@ export struct ENewspaperListDialog { | @@ -288,19 +289,14 @@ export struct ENewspaperListDialog { | ||
| 288 | // } | 289 | // } |
| 289 | }) | 290 | }) |
| 290 | } | 291 | } |
| 291 | - // .margin({ top: 124 }) | ||
| 292 | .margin({ top: this.topHeight }) | 292 | .margin({ top: this.topHeight }) |
| 293 | - | ||
| 294 | .width('100%') | 293 | .width('100%') |
| 295 | .backgroundColor(Color.White) | 294 | .backgroundColor(Color.White) |
| 296 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | ||
| 297 | - .onClick(() => { | ||
| 298 | 295 | ||
| 299 | - }) | ||
| 300 | }.width('100%') | 296 | }.width('100%') |
| 301 | .height('100%') | 297 | .height('100%') |
| 302 | .backgroundColor('#80000000') | 298 | .backgroundColor('#80000000') |
| 303 | - .margin({bottom:44}) | 299 | + .margin({bottom:50}) |
| 304 | .onClick(() => { | 300 | .onClick(() => { |
| 305 | if (this.closeDialog) { | 301 | if (this.closeDialog) { |
| 306 | this.closeDialog() | 302 | this.closeDialog() |
| @@ -214,12 +214,7 @@ struct MineHomePage { | @@ -214,12 +214,7 @@ struct MineHomePage { | ||
| 214 | .fontWeight('400lpx') | 214 | .fontWeight('400lpx') |
| 215 | .fontColor(this.isHasIntroduction?$r('app.color.color_222222'):$r('app.color.color_999999')) | 215 | .fontColor(this.isHasIntroduction?$r('app.color.color_222222'):$r('app.color.color_999999')) |
| 216 | .textAlign(TextAlign.Start) | 216 | .textAlign(TextAlign.Start) |
| 217 | - .onClick(()=>{ | ||
| 218 | - let params: editModelParams = { | ||
| 219 | - editContent: this.isHasIntroduction?this.desc:'' | ||
| 220 | - } | ||
| 221 | - WDRouterRule.jumpWithPage(WDRouterPage.editUserIntroductionPage,params) | ||
| 222 | - }) | 217 | + |
| 223 | if(!this.isHasIntroduction){ | 218 | if(!this.isHasIntroduction){ |
| 224 | Image($r('app.media.user_info_edit_icon')) | 219 | Image($r('app.media.user_info_edit_icon')) |
| 225 | .width('27lpx') | 220 | .width('27lpx') |
| @@ -227,7 +222,12 @@ struct MineHomePage { | @@ -227,7 +222,12 @@ struct MineHomePage { | ||
| 227 | .interpolation(ImageInterpolation.High) | 222 | .interpolation(ImageInterpolation.High) |
| 228 | .objectFit(ImageFit.Auto) | 223 | .objectFit(ImageFit.Auto) |
| 229 | } | 224 | } |
| 230 | - } | 225 | + }.onClick(()=>{ |
| 226 | + let params: editModelParams = { | ||
| 227 | + editContent: this.isHasIntroduction?this.desc:'' | ||
| 228 | + } | ||
| 229 | + WDRouterRule.jumpWithPage(WDRouterPage.editUserIntroductionPage,params) | ||
| 230 | + }) | ||
| 231 | 231 | ||
| 232 | 232 | ||
| 233 | Text(`来到人民日报${this.registerTimeForDay}天`) | 233 | Text(`来到人民日报${this.registerTimeForDay}天`) |
| @@ -102,6 +102,7 @@ struct VisitorCommentPage { | @@ -102,6 +102,7 @@ struct VisitorCommentPage { | ||
| 102 | .width('100%') | 102 | .width('100%') |
| 103 | }.width("100%") | 103 | }.width("100%") |
| 104 | .height("100%") | 104 | .height("100%") |
| 105 | + .backgroundColor(Color.White) | ||
| 105 | .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) | 106 | .padding({top:px2vp(this.topSafeHeight),bottom:px2vp(this.bottomSafeHeight)}) |
| 106 | 107 | ||
| 107 | } | 108 | } |
| @@ -55,6 +55,7 @@ export struct PlayerProgressView { | @@ -55,6 +55,7 @@ export struct PlayerProgressView { | ||
| 55 | } | 55 | } |
| 56 | .width('100%') | 56 | .width('100%') |
| 57 | .zIndex(2000) | 57 | .zIndex(2000) |
| 58 | + .height(10) | ||
| 58 | .visibility(this.showLoading ? Visibility.Visible: Visibility.Hidden) | 59 | .visibility(this.showLoading ? Visibility.Visible: Visibility.Hidden) |
| 59 | .margin({ bottom: 10 }) | 60 | .margin({ bottom: 10 }) |
| 60 | // .markAnchor({ x: 0, y: '100%' }) | 61 | // .markAnchor({ x: 0, y: '100%' }) |
| @@ -115,7 +115,7 @@ struct LaunchAdvertisingPage { | @@ -115,7 +115,7 @@ struct LaunchAdvertisingPage { | ||
| 115 | if (this.defaultModel.linkUrl.length > 0 || this.defaultModel.objectId.length > 0){ | 115 | if (this.defaultModel.linkUrl.length > 0 || this.defaultModel.objectId.length > 0){ |
| 116 | Button(){ | 116 | Button(){ |
| 117 | Row(){ | 117 | Row(){ |
| 118 | - Text('点击跳转至详情') | 118 | + Text(this.defaultModel.isAd == '1'?'点击跳转至详情或第三方应用':'点击跳转至详情') |
| 119 | .fontSize('31lpx') | 119 | .fontSize('31lpx') |
| 120 | .fontColor(Color.White) | 120 | .fontColor(Color.White) |
| 121 | .margin({ | 121 | .margin({ |
| @@ -3,6 +3,7 @@ import { WDRouterRule } from 'wdRouter'; | @@ -3,6 +3,7 @@ import { WDRouterRule } from 'wdRouter'; | ||
| 3 | import { WDRouterPage } from 'wdRouter'; | 3 | import { WDRouterPage } from 'wdRouter'; |
| 4 | import { SPHelper } from 'wdKit/Index'; | 4 | import { SPHelper } from 'wdKit/Index'; |
| 5 | import { SpConstants } from 'wdConstant/Index'; | 5 | import { SpConstants } from 'wdConstant/Index'; |
| 6 | +import { CustomToast} from 'wdKit' | ||
| 6 | import { ButtonOptions, promptAction, window } from '@kit.ArkUI'; | 7 | import { ButtonOptions, promptAction, window } from '@kit.ArkUI'; |
| 7 | import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index'; | 8 | import { ParamType, TrackConstants, TrackingContent } from 'wdTracking/Index'; |
| 8 | import { ImageKnifeComponent,ScaleType } from '@ohos/imageknife'; | 9 | import { ImageKnifeComponent,ScaleType } from '@ohos/imageknife'; |
| @@ -16,6 +17,16 @@ struct LaunchInterestsHobbiesPage { | @@ -16,6 +17,16 @@ struct LaunchInterestsHobbiesPage { | ||
| 16 | @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | 17 | @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 |
| 17 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | 18 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 |
| 18 | 19 | ||
| 20 | + dialogToast: CustomDialogController = new CustomDialogController({ | ||
| 21 | + builder: CustomToast({ | ||
| 22 | + msg: '请先选择您感兴趣的内容哦', | ||
| 23 | + }), | ||
| 24 | + autoCancel: false, | ||
| 25 | + alignment: DialogAlignment.Center, | ||
| 26 | + customStyle: true, | ||
| 27 | + maskColor:"#00000000" | ||
| 28 | + }) | ||
| 29 | + | ||
| 19 | aboutToAppear(){ | 30 | aboutToAppear(){ |
| 20 | //请求接口,获取兴趣偏好数据 | 31 | //请求接口,获取兴趣偏好数据 |
| 21 | this.requestInterestsData() | 32 | this.requestInterestsData() |
| @@ -153,11 +164,7 @@ struct LaunchInterestsHobbiesPage { | @@ -153,11 +164,7 @@ struct LaunchInterestsHobbiesPage { | ||
| 153 | .borderRadius('10lpx') | 164 | .borderRadius('10lpx') |
| 154 | .onClick(()=>{ | 165 | .onClick(()=>{ |
| 155 | if (this.selectCount == 0) { | 166 | if (this.selectCount == 0) { |
| 156 | - promptAction.showToast({ | ||
| 157 | - message : '请先选择您感兴趣的内容哦', | ||
| 158 | - duration: 2000, | ||
| 159 | - bottom: '50%', | ||
| 160 | - }) | 167 | + this.dialogToast.open() |
| 161 | return | 168 | return |
| 162 | } | 169 | } |
| 163 | this.saveTagIds() | 170 | this.saveTagIds() |
| 1 | -import { BottomNavi, CommonConstants, DisplayDirection } from 'wdConstant'; | ||
| 2 | -import { BottomNavDTO, NavigationBodyDTO, NavigationDetailDTO, TopNavDTO } from 'wdBean'; | ||
| 3 | -import { EmitterEventId, EmitterUtils, Logger, StringUtils } from 'wdKit'; | 1 | +import { BottomNavi, DisplayDirection } from 'wdConstant'; |
| 2 | +import { BottomNavDTO, NavigationBodyDTO, TopNavDTO } from 'wdBean'; | ||
| 3 | +import { EmitterEventId, EmitterUtils, Logger } from 'wdKit'; | ||
| 4 | import { HttpUtils } from 'wdNetwork/Index'; | 4 | import { HttpUtils } from 'wdNetwork/Index'; |
| 5 | import HomeChannelUtils, { AssignChannelParam } from 'wdRouter/Index'; | 5 | import HomeChannelUtils, { AssignChannelParam } from 'wdRouter/Index'; |
| 6 | import { MinePageComponent } from 'wdComponent/src/main/ets/components/page/MinePageComponent'; | 6 | import { MinePageComponent } from 'wdComponent/src/main/ets/components/page/MinePageComponent'; |
| 7 | import { CompUtils, TopNavigationComponentNew } from 'wdComponent/Index'; | 7 | import { CompUtils, TopNavigationComponentNew } from 'wdComponent/Index'; |
| 8 | import { VideoChannelPage } from './VideoChannelPage'; | 8 | import { VideoChannelPage } from './VideoChannelPage'; |
| 9 | import ChannelViewModel from 'wdComponent/src/main/ets/viewmodel/ChannelViewModel'; | 9 | import ChannelViewModel from 'wdComponent/src/main/ets/viewmodel/ChannelViewModel'; |
| 10 | -import { ALL, ImageKnifeComponent, ImageKnifeOption, NONE } from '@ohos/imageknife'; | 10 | +import { ALL, ImageKnifeComponent, ImageKnifeOption } from '@ohos/imageknife'; |
| 11 | import { ParamType, Tracking } from 'wdTracking/Index'; | 11 | import { ParamType, Tracking } from 'wdTracking/Index'; |
| 12 | 12 | ||
| 13 | const TAG = 'BottomNavigationComponent'; | 13 | const TAG = 'BottomNavigationComponent'; |
| @@ -102,7 +102,6 @@ export struct BottomNavigationComponent { | @@ -102,7 +102,6 @@ export struct BottomNavigationComponent { | ||
| 102 | } | 102 | } |
| 103 | .tabBar(this.tabBarBuilder(navItem, index)) | 103 | .tabBar(this.tabBarBuilder(navItem, index)) |
| 104 | 104 | ||
| 105 | - // .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | ||
| 106 | }); | 105 | }); |
| 107 | 106 | ||
| 108 | } | 107 | } |
| @@ -140,6 +139,7 @@ export struct BottomNavigationComponent { | @@ -140,6 +139,7 @@ export struct BottomNavigationComponent { | ||
| 140 | .opacity(this.currentNavIndex === index ? this.FULL_OPACITY : this.SIXTY_OPACITY) | 139 | .opacity(this.currentNavIndex === index ? this.FULL_OPACITY : this.SIXTY_OPACITY) |
| 141 | } | 140 | } |
| 142 | .zIndex(10) | 141 | .zIndex(10) |
| 142 | + .width('100%') | ||
| 143 | .height($r('app.float.bottom_navigation_barHeight')) | 143 | .height($r('app.float.bottom_navigation_barHeight')) |
| 144 | .hoverEffect(HoverEffect.Highlight) | 144 | .hoverEffect(HoverEffect.Highlight) |
| 145 | .visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) | 145 | .visibility(this.displayDirection === DisplayDirection.VERTICAL ? Visibility.Visible : Visibility.None) |
| @@ -125,7 +125,6 @@ export struct VideoChannelPage { | @@ -125,7 +125,6 @@ export struct VideoChannelPage { | ||
| 125 | }, (item: TopNavDTO) => item.channelId + '') | 125 | }, (item: TopNavDTO) => item.channelId + '') |
| 126 | } | 126 | } |
| 127 | .width('100%') | 127 | .width('100%') |
| 128 | - | ||
| 129 | .justifyContent(FlexAlign.Center) | 128 | .justifyContent(FlexAlign.Center) |
| 130 | 129 | ||
| 131 | // 搜索按钮 | 130 | // 搜索按钮 |
| @@ -182,7 +181,7 @@ export struct VideoChannelPage { | @@ -182,7 +181,7 @@ export struct VideoChannelPage { | ||
| 182 | channelId: item.channelId + '', | 181 | channelId: item.channelId + '', |
| 183 | autoRefresh: this.autoRefresh | 182 | autoRefresh: this.autoRefresh |
| 184 | }) | 183 | }) |
| 185 | - .padding({ top: px2vp(this.topSafeHeight) + 55 }) | 184 | + .padding({ top: px2vp(this.topSafeHeight) + 44 }) |
| 186 | .backgroundColor(Color.White) | 185 | .backgroundColor(Color.White) |
| 187 | } | 186 | } |
| 188 | }, (item: TopNavDTO) => item.channelId + '') | 187 | }, (item: TopNavDTO) => item.channelId + '') |
-
Please register or login to post a comment