Showing
8 changed files
with
68 additions
and
42 deletions
| @@ -38,6 +38,7 @@ export struct CompParser { | @@ -38,6 +38,7 @@ export struct CompParser { | ||
| 38 | @State pageId: string = ''; | 38 | @State pageId: string = ''; |
| 39 | @State pageName: string = ''; | 39 | @State pageName: string = ''; |
| 40 | @ObjectLink compDTO: CompDTO | 40 | @ObjectLink compDTO: CompDTO |
| 41 | + @State nextCompDTO: CompDTO = new CompDTO | ||
| 41 | @State compIndex: number = 0; | 42 | @State compIndex: number = 0; |
| 42 | @State private pageModel: PageModel = new PageModel(); | 43 | @State private pageModel: PageModel = new PageModel(); |
| 43 | @State audioItems: ContentDTO[] = []; | 44 | @State audioItems: ContentDTO[] = []; |
| @@ -83,17 +84,14 @@ export struct CompParser { | @@ -83,17 +84,14 @@ export struct CompParser { | ||
| 83 | this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口 | 84 | this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口 |
| 84 | if (this.compDTO.compStyle === CompStyle.Label_03) { | 85 | if (this.compDTO.compStyle === CompStyle.Label_03) { |
| 85 | LabelComponent({ compDTO: this.compDTO }) | 86 | LabelComponent({ compDTO: this.compDTO }) |
| 86 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 87 | } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { | 87 | } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { |
| 88 | if (this.compDTO.operDataList.length > this.audioItems.length) { | 88 | if (this.compDTO.operDataList.length > this.audioItems.length) { |
| 89 | ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 89 | ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 90 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 91 | } | 90 | } |
| 92 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && | 91 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && |
| 93 | this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡" | 92 | this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡" |
| 94 | 93 | ||
| 95 | LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 94 | LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 96 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 97 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) { | 95 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) { |
| 98 | if (this.compDTO.operDataList.length > 1) { | 96 | if (this.compDTO.operDataList.length > 1) { |
| 99 | HorizontalStrokeCardThreeTwoRadioForMoreComponent({ | 97 | HorizontalStrokeCardThreeTwoRadioForMoreComponent({ |
| @@ -108,17 +106,13 @@ export struct CompParser { | @@ -108,17 +106,13 @@ export struct CompParser { | ||
| 108 | pageName: this.pageName | 106 | pageName: this.pageName |
| 109 | }) | 107 | }) |
| 110 | } | 108 | } |
| 111 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 112 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) { | 109 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) { |
| 113 | ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 110 | ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 114 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 115 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_03) { | 111 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_03) { |
| 116 | ZhSingleRow03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 112 | ZhSingleRow03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 117 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 118 | } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 ->标题 | 113 | } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 ->标题 |
| 119 | //ZhGridLayout02({ compDTO: this.compDTO }) | 114 | //ZhGridLayout02({ compDTO: this.compDTO }) |
| 120 | CompNormalTitle({ compDTO: this.compDTO }) | 115 | CompNormalTitle({ compDTO: this.compDTO }) |
| 121 | - // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | ||
| 122 | } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 | 116 | } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 |
| 123 | 117 | ||
| 124 | ZhGridLayout02NewsContent({ | 118 | ZhGridLayout02NewsContent({ |
| @@ -130,16 +124,12 @@ export struct CompParser { | @@ -130,16 +124,12 @@ export struct CompParser { | ||
| 130 | 124 | ||
| 131 | } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) { | 125 | } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) { |
| 132 | ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 126 | ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 133 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 134 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) { | 127 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) { |
| 135 | ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 128 | ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 136 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 137 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) { | 129 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) { |
| 138 | // ZhSingleRow05({ compDTO }) | 130 | // ZhSingleRow05({ compDTO }) |
| 139 | - // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | ||
| 140 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) { | 131 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) { |
| 141 | ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 132 | ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 142 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 143 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) { | 133 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) { |
| 144 | //头图卡 和comStyle 2相同, | 134 | //头图卡 和comStyle 2相同, |
| 145 | Card5Component({ | 135 | Card5Component({ |
| @@ -149,7 +139,6 @@ export struct CompParser { | @@ -149,7 +139,6 @@ export struct CompParser { | ||
| 149 | pageId: this.pageId, | 139 | pageId: this.pageId, |
| 150 | pageName: this.pageName | 140 | pageName: this.pageName |
| 151 | }) | 141 | }) |
| 152 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 153 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) { | 142 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) { |
| 154 | // 大图卡 | 143 | // 大图卡 |
| 155 | Card2Component({ | 144 | Card2Component({ |
| @@ -158,7 +147,6 @@ export struct CompParser { | @@ -158,7 +147,6 @@ export struct CompParser { | ||
| 158 | pageId: this.pageId, | 147 | pageId: this.pageId, |
| 159 | pageName: this.pageName | 148 | pageName: this.pageName |
| 160 | }) | 149 | }) |
| 161 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 162 | } else if (this.compDTO.compStyle === CompStyle.Card_09) { | 150 | } else if (this.compDTO.compStyle === CompStyle.Card_09) { |
| 163 | //时间链卡 | 151 | //时间链卡 |
| 164 | Card9Component({ | 152 | Card9Component({ |
| @@ -167,7 +155,6 @@ export struct CompParser { | @@ -167,7 +155,6 @@ export struct CompParser { | ||
| 167 | pageId: this.pageId, | 155 | pageId: this.pageId, |
| 168 | pageName: this.pageName | 156 | pageName: this.pageName |
| 169 | }) | 157 | }) |
| 170 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 171 | } else if (this.compDTO.compStyle === CompStyle.Card_13) { | 158 | } else if (this.compDTO.compStyle === CompStyle.Card_13) { |
| 172 | Card6Component({ | 159 | Card6Component({ |
| 173 | compDTO: this.compDTO, | 160 | compDTO: this.compDTO, |
| @@ -175,7 +162,6 @@ export struct CompParser { | @@ -175,7 +162,6 @@ export struct CompParser { | ||
| 175 | pageId: this.pageId, | 162 | pageId: this.pageId, |
| 176 | pageName: this.pageName | 163 | pageName: this.pageName |
| 177 | }) | 164 | }) |
| 178 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 179 | } else if (this.compDTO.compStyle === CompStyle.Card_03) { | 165 | } else if (this.compDTO.compStyle === CompStyle.Card_03) { |
| 180 | Card3Component({ | 166 | Card3Component({ |
| 181 | compDTO: this.compDTO, | 167 | compDTO: this.compDTO, |
| @@ -183,20 +169,15 @@ export struct CompParser { | @@ -183,20 +169,15 @@ export struct CompParser { | ||
| 183 | pageId: this.pageId, | 169 | pageId: this.pageId, |
| 184 | pageName: this.pageName | 170 | pageName: this.pageName |
| 185 | }) | 171 | }) |
| 186 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 187 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) { | 172 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) { |
| 188 | ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 173 | ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 189 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 190 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { | 174 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) { |
| 191 | // ZhSingleColumn05({ compDTO: compDTO }) | 175 | // ZhSingleColumn05({ compDTO: compDTO }) |
| 192 | - // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | ||
| 193 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) { | 176 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) { |
| 194 | ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 177 | ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 195 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 196 | } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 | 178 | } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 |
| 197 | AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO }) | 179 | AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO }) |
| 198 | //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 }) | 180 | //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 }) |
| 199 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 200 | } else if (!Number.isNaN(Number(this.compDTO.compStyle)) || this.compDTO.compType === 'appStyle') { | 181 | } else if (!Number.isNaN(Number(this.compDTO.compStyle)) || this.compDTO.compType === 'appStyle') { |
| 201 | CardParser({ | 182 | CardParser({ |
| 202 | contentDTO: this.compDTO.operDataList[0], | 183 | contentDTO: this.compDTO.operDataList[0], |
| @@ -205,7 +186,6 @@ export struct CompParser { | @@ -205,7 +186,6 @@ export struct CompParser { | ||
| 205 | pageName: this.pageName, | 186 | pageName: this.pageName, |
| 206 | compIndex: this.compIndex | 187 | compIndex: this.compIndex |
| 207 | }); | 188 | }); |
| 208 | - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 209 | } else { | 189 | } else { |
| 210 | // Text(this.compDTO.compStyle) | 190 | // Text(this.compDTO.compStyle) |
| 211 | // .width(CommonConstants.FULL_PARENT) | 191 | // .width(CommonConstants.FULL_PARENT) |
| @@ -215,9 +195,43 @@ export struct CompParser { | @@ -215,9 +195,43 @@ export struct CompParser { | ||
| 215 | // WDRouterRule.jumpWithPage(WDRouterPage.QualityCommentsPage) | 195 | // WDRouterRule.jumpWithPage(WDRouterPage.QualityCommentsPage) |
| 216 | // } | 196 | // } |
| 217 | // }) | 197 | // }) |
| 218 | - // Divider().strokeWidth(8).color('#f5f5f5').padding({ left: 0, right: 0 }) | 198 | + } |
| 199 | + | ||
| 200 | + if ( | ||
| 201 | + this.compDTO.compStyle === CompStyle.Card_09 || | ||
| 202 | + this.compDTO.compStyle === CompStyle.Zh_Single_Column_09 || | ||
| 203 | + this.compDTO.compStyle === CompStyle.Zh_Single_Row_04 || | ||
| 204 | + this.compDTO.compStyle === CompStyle.Zh_Single_Row_06 | ||
| 205 | + ) { | ||
| 206 | + if (this.compDTO.compStyle === this.nextCompDTO.compStyle) { | ||
| 207 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 208 | + } else { | ||
| 209 | + Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 210 | + } | ||
| 211 | + } else if (this.compDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) { | ||
| 212 | + // 大专题 | ||
| 213 | + if (this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10) { | ||
| 214 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 215 | + } else { | ||
| 216 | + Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 217 | + } | ||
| 218 | + } else if (this.compDTO.compType === 'appStyle') { | ||
| 219 | + if ( | ||
| 220 | + this.nextCompDTO.compStyle === CompStyle.Card_09 || | ||
| 221 | + this.nextCompDTO?.operDataList?.[0]?.appStyle === CompStyle.Card_10 || | ||
| 222 | + this.nextCompDTO.compStyle === CompStyle.Zh_Single_Column_09 || | ||
| 223 | + this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_04 || | ||
| 224 | + this.nextCompDTO.compStyle === CompStyle.Zh_Single_Row_06 | ||
| 225 | + ) { | ||
| 226 | + Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 227 | + } else { | ||
| 228 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 229 | + } | ||
| 230 | + } else { | ||
| 231 | + // Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 219 | } | 232 | } |
| 220 | } | 233 | } |
| 221 | 234 | ||
| 235 | + | ||
| 222 | } | 236 | } |
| 223 | } | 237 | } |
| @@ -4,7 +4,7 @@ import { | @@ -4,7 +4,7 @@ import { | ||
| 4 | PageInfoBean, | 4 | PageInfoBean, |
| 5 | ContentDTO, | 5 | ContentDTO, |
| 6 | contentListParams, | 6 | contentListParams, |
| 7 | - InteractDataDTO | 7 | + InteractDataDTO, TopicInfo |
| 8 | } from 'wdBean'; | 8 | } from 'wdBean'; |
| 9 | import { DateTimeUtils, Logger, SPHelper, WindowModel } from 'wdKit/Index'; | 9 | import { DateTimeUtils, Logger, SPHelper, WindowModel } from 'wdKit/Index'; |
| 10 | import { PaperReaderSimpleDialog } from '../../dialog/PaperReaderDialog'; | 10 | import { PaperReaderSimpleDialog } from '../../dialog/PaperReaderDialog'; |
| @@ -61,6 +61,7 @@ export struct MorningEveningPaperComponent { | @@ -61,6 +61,7 @@ export struct MorningEveningPaperComponent { | ||
| 61 | @Provide title: string = '' | 61 | @Provide title: string = '' |
| 62 | @Provide subTitle: string = '' | 62 | @Provide subTitle: string = '' |
| 63 | @Provide audioTitle: string = '' | 63 | @Provide audioTitle: string = '' |
| 64 | + @Provide topicInfo: TopicInfo = {} as TopicInfo | ||
| 64 | @Provide isAudioPlaying: boolean = false | 65 | @Provide isAudioPlaying: boolean = false |
| 65 | @Provide status: number = PlayerConstants.STATUS_START; | 66 | @Provide status: number = PlayerConstants.STATUS_START; |
| 66 | @Provide currentTime: string = "00:00"; | 67 | @Provide currentTime: string = "00:00"; |
| @@ -142,6 +143,7 @@ export struct MorningEveningPaperComponent { | @@ -142,6 +143,7 @@ export struct MorningEveningPaperComponent { | ||
| 142 | viewColumInsightIntentShare(context,String(dailyPaperTopicPageId), this.pageInfoBean) | 143 | viewColumInsightIntentShare(context,String(dailyPaperTopicPageId), this.pageInfoBean) |
| 143 | 144 | ||
| 144 | this.title = this.pageInfoBean?.topicInfo?.title | 145 | this.title = this.pageInfoBean?.topicInfo?.title |
| 146 | + this.topicInfo = this.pageInfoBean?.topicInfo | ||
| 145 | let dateTime = DateTimeUtils.parseDate(this.pageInfoBean?.topicInfo?.topicDate ?? '', DateTimeUtils.PATTERN_DATE_HYPHEN) | 147 | let dateTime = DateTimeUtils.parseDate(this.pageInfoBean?.topicInfo?.topicDate ?? '', DateTimeUtils.PATTERN_DATE_HYPHEN) |
| 146 | const dateShow = new Date(dateTime) | 148 | const dateShow = new Date(dateTime) |
| 147 | this.subTitle = `${dateShow.getFullYear()}年\n${(dateShow.getMonth() + 1)}月${dateShow.getDate()}日` | 149 | this.subTitle = `${dateShow.getFullYear()}年\n${(dateShow.getMonth() + 1)}月${dateShow.getDate()}日` |
| @@ -314,7 +316,7 @@ export struct MorningEveningPaperComponent { | @@ -314,7 +316,7 @@ export struct MorningEveningPaperComponent { | ||
| 314 | @Builder | 316 | @Builder |
| 315 | topPaperTitle(){ | 317 | topPaperTitle(){ |
| 316 | Column(){ | 318 | Column(){ |
| 317 | - PaperTitleComponent({topicInfo:this.pageInfoBean?.topicInfo}) | 319 | + PaperTitleComponent() |
| 318 | .margin({top:this.topSafeHeight}) | 320 | .margin({top:this.topSafeHeight}) |
| 319 | } | 321 | } |
| 320 | .height(44+this.topSafeHeight) | 322 | .height(44+this.topSafeHeight) |
| @@ -12,7 +12,7 @@ import { TrackConstants } from 'wdTracking/Index'; | @@ -12,7 +12,7 @@ import { TrackConstants } from 'wdTracking/Index'; | ||
| 12 | export struct PaperTitleComponent { | 12 | export struct PaperTitleComponent { |
| 13 | @Consume title?: string | 13 | @Consume title?: string |
| 14 | @Consume subTitle?: string | 14 | @Consume subTitle?: string |
| 15 | - topicInfo: TopicInfo = {} as TopicInfo | 15 | + @Consume topicInfo: TopicInfo |
| 16 | aboutToAppear() { | 16 | aboutToAppear() { |
| 17 | } | 17 | } |
| 18 | 18 | ||
| @@ -98,18 +98,18 @@ export struct PaperTitleComponent { | @@ -98,18 +98,18 @@ export struct PaperTitleComponent { | ||
| 98 | }) | 98 | }) |
| 99 | .margin({ right: 16 }) | 99 | .margin({ right: 16 }) |
| 100 | 100 | ||
| 101 | - // Image($r('app.media.icon_share')) | ||
| 102 | - // .height($r('app.float.top_arrow_size')) | ||
| 103 | - // .width($r('app.float.top_arrow_size')) | ||
| 104 | - // .alignRules({ | ||
| 105 | - // right: { anchor: "img_close", align: HorizontalAlign.Start }, | ||
| 106 | - // center: { anchor: "__container__", align: VerticalAlign.Center } | ||
| 107 | - // }) | ||
| 108 | - // .id('img_share') | ||
| 109 | - // .margin({ right: 16 }) | ||
| 110 | - // .onClick(() => { | ||
| 111 | - // this.share() | ||
| 112 | - // }) | 101 | + Image($r('app.media.icon_share')) |
| 102 | + .height($r('app.float.top_arrow_size')) | ||
| 103 | + .width($r('app.float.top_arrow_size')) | ||
| 104 | + .alignRules({ | ||
| 105 | + right: { anchor: "img_close", align: HorizontalAlign.Start }, | ||
| 106 | + center: { anchor: "__container__", align: VerticalAlign.Center } | ||
| 107 | + }) | ||
| 108 | + .id('img_share') | ||
| 109 | + .margin({ right: 16 }) | ||
| 110 | + .onClick(() => { | ||
| 111 | + this.share() | ||
| 112 | + }) | ||
| 113 | } | 113 | } |
| 114 | // .margin({ left: 14, right: 14 }) | 114 | // .margin({ left: 14, right: 14 }) |
| 115 | .height($r('app.float.top_bar_height')) | 115 | .height($r('app.float.top_bar_height')) |
| @@ -54,7 +54,8 @@ export struct Card5Component { | @@ -54,7 +54,8 @@ export struct Card5Component { | ||
| 54 | bottomRight: $r('app.float.image_border_radius') | 54 | bottomRight: $r('app.float.image_border_radius') |
| 55 | } | 55 | } |
| 56 | ) | 56 | ) |
| 57 | - .aspectRatio(343 / 225) | 57 | + // .aspectRatio(343 / 225) |
| 58 | + .autoResize(true) | ||
| 58 | if (!!this.titleShowPolicy || this.titleShowPolicy === null ) { | 59 | if (!!this.titleShowPolicy || this.titleShowPolicy === null ) { |
| 59 | Row() | 60 | Row() |
| 60 | .borderRadius( | 61 | .borderRadius( |
| @@ -94,7 +94,7 @@ export struct Card6Component { | @@ -94,7 +94,7 @@ export struct Card6Component { | ||
| 94 | .alignSelf(ItemAlign.Start) | 94 | .alignSelf(ItemAlign.Start) |
| 95 | .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 | 95 | .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 |
| 96 | .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 && | 96 | .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 && |
| 97 | - (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 : | 97 | + (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? (12 + (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) * 11) : |
| 98 | ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 : | 98 | ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 : |
| 99 | 0 ) | 99 | 0 ) |
| 100 | }.alignContent(Alignment.TopStart) | 100 | }.alignContent(Alignment.TopStart) |
| @@ -138,8 +138,8 @@ export struct ZhSingleColumn09 { | @@ -138,8 +138,8 @@ export struct ZhSingleColumn09 { | ||
| 138 | .textAlign(TextAlign.Center) | 138 | .textAlign(TextAlign.Center) |
| 139 | .fontColor(0xffffff) | 139 | .fontColor(0xffffff) |
| 140 | Image($r('app.media.icon_selected')) | 140 | Image($r('app.media.icon_selected')) |
| 141 | - .width(19) | ||
| 142 | - .height(19) | 141 | + .width(14) |
| 142 | + .height(14) | ||
| 143 | .opacity(this.activeIndexs.includes(index) ? 1 : 0) | 143 | .opacity(this.activeIndexs.includes(index) ? 1 : 0) |
| 144 | .objectFit(ImageFit.Contain) | 144 | .objectFit(ImageFit.Contain) |
| 145 | } | 145 | } |
| @@ -95,7 +95,15 @@ export struct PageComponent { | @@ -95,7 +95,15 @@ export struct PageComponent { | ||
| 95 | LazyForEach(this.pageModel.compList, (compDTO: CompDTO, compIndex: number) => { | 95 | LazyForEach(this.pageModel.compList, (compDTO: CompDTO, compIndex: number) => { |
| 96 | ListItem() { | 96 | ListItem() { |
| 97 | Column() { | 97 | Column() { |
| 98 | - CompParser({ pageModel: this.pageModel, compDTO: compDTO, compIndex: compIndex, pageId: this.pageId }); | 98 | + CompParser( |
| 99 | + { | ||
| 100 | + pageModel: this.pageModel, | ||
| 101 | + nextCompDTO: compIndex === this.pageModel.compList.getDataArray().length - 1 ? new CompDTO() : this.pageModel.compList.get(compIndex + 1) as CompDTO, | ||
| 102 | + compDTO: compDTO, | ||
| 103 | + compIndex: compIndex, | ||
| 104 | + pageId: this.pageId | ||
| 105 | + } | ||
| 106 | + ); | ||
| 99 | } | 107 | } |
| 100 | } | 108 | } |
| 101 | }, | 109 | }, |
| @@ -125,6 +125,7 @@ export default struct TemplatePageComponent { | @@ -125,6 +125,7 @@ export default struct TemplatePageComponent { | ||
| 125 | 125 | ||
| 126 | CompParser({ | 126 | CompParser({ |
| 127 | compDTO: compDTO, | 127 | compDTO: compDTO, |
| 128 | + nextCompDTO: index === this.templatePage.compList.getDataArray().length - 1 ? new CompDTO() : this.templatePage.compList.get(index + 1) as CompDTO, | ||
| 128 | compIndex: index, | 129 | compIndex: index, |
| 129 | pageId: this.pageId, | 130 | pageId: this.pageId, |
| 130 | pageName: this.pageName | 131 | pageName: this.pageName |
-
Please register or login to post a comment