Showing
8 changed files
with
55 additions
and
21 deletions
| @@ -60,12 +60,12 @@ export struct CarderInteraction { | @@ -60,12 +60,12 @@ export struct CarderInteraction { | ||
| 60 | }) | 60 | }) |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | - if(this.contentDetailData.rmhInfo != null){ | ||
| 64 | - if(this.contentDetailData.shareInfo != null && 1 == this.contentDetailData.shareInfo.shareOpen && 1 == this.contentDetailData.rmhInfo.cnShareControl){ | ||
| 65 | - this.shareLayout() | 63 | + if(this.contentDTO.rmhInfo != null){ |
| 64 | + if(this.contentDTO.shareInfo != null && 1 == this.contentDTO.shareInfo.shareOpen && 1 == this.contentDTO.rmhInfo.cnShareControl){ | ||
| 65 | + this.commentLayout() | ||
| 66 | } | 66 | } |
| 67 | }else{ | 67 | }else{ |
| 68 | - this.shareLayout() | 68 | + this.commentLayout() |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | this.builderLike() | 71 | this.builderLike() |
| @@ -81,7 +81,7 @@ export struct CarderInteraction { | @@ -81,7 +81,7 @@ export struct CarderInteraction { | ||
| 81 | } | 81 | } |
| 82 | 82 | ||
| 83 | @Builder | 83 | @Builder |
| 84 | - shareLayout() { | 84 | + commentLayout() { |
| 85 | Row() { | 85 | Row() { |
| 86 | Image($r('app.media.CarderInteraction_comment')) | 86 | Image($r('app.media.CarderInteraction_comment')) |
| 87 | .width(18) | 87 | .width(18) |
| @@ -17,7 +17,7 @@ export struct topicInfoView { | @@ -17,7 +17,7 @@ export struct topicInfoView { | ||
| 17 | // } as FrontLinkObject | 17 | // } as FrontLinkObject |
| 18 | 18 | ||
| 19 | frontLinkObject: FrontLinkObject = {} as FrontLinkObject | 19 | frontLinkObject: FrontLinkObject = {} as FrontLinkObject |
| 20 | - | 20 | + @State isExpansion:boolean = false |
| 21 | aboutToAppear() { | 21 | aboutToAppear() { |
| 22 | } | 22 | } |
| 23 | 23 | ||
| @@ -32,7 +32,7 @@ export struct topicInfoView { | @@ -32,7 +32,7 @@ export struct topicInfoView { | ||
| 32 | }) | 32 | }) |
| 33 | .id('img_cover') | 33 | .id('img_cover') |
| 34 | 34 | ||
| 35 | - if (this.frontLinkObject.linkUrl.length > 0) { | 35 | + if (this.frontLinkObject.linkUrl.length > 0 || this.frontLinkObject?.newsId.length > 0) { |
| 36 | Row() { | 36 | Row() { |
| 37 | Text("查看详情") | 37 | Text("查看详情") |
| 38 | .fontSize(14) | 38 | .fontSize(14) |
| @@ -54,6 +54,8 @@ export struct topicInfoView { | @@ -54,6 +54,8 @@ export struct topicInfoView { | ||
| 54 | contentDTO.objectType = this.frontLinkObject?.newsType.toString() | 54 | contentDTO.objectType = this.frontLinkObject?.newsType.toString() |
| 55 | contentDTO.objectId = this.frontLinkObject?.newsId | 55 | contentDTO.objectId = this.frontLinkObject?.newsId |
| 56 | contentDTO.linkUrl = this.frontLinkObject?.linkUrl | 56 | contentDTO.linkUrl = this.frontLinkObject?.linkUrl |
| 57 | + contentDTO.relId = this.frontLinkObject?.newsRelId.toString() | ||
| 58 | + contentDTO.relType = this.frontLinkObject?.newsType.toString() | ||
| 57 | ProcessUtils.processPage(contentDTO) | 59 | ProcessUtils.processPage(contentDTO) |
| 58 | 60 | ||
| 59 | }) | 61 | }) |
| @@ -65,17 +67,25 @@ export struct topicInfoView { | @@ -65,17 +67,25 @@ export struct topicInfoView { | ||
| 65 | .id('row_detail') | 67 | .id('row_detail') |
| 66 | } | 68 | } |
| 67 | 69 | ||
| 68 | - Text(this.frontLinkObject?.summary ?? "") | ||
| 69 | - .margin({ top: 10 }) | 70 | + |
| 71 | + Row(){ | ||
| 72 | + Text(this.frontLinkObject?.summary ?? "") | ||
| 70 | .fontSize(14) | 73 | .fontSize(14) |
| 71 | - .fontColor($r('app.color.white')) | ||
| 72 | - .maxLines(3) | 74 | + .fontColor('#CCFFFFFF') |
| 75 | + .maxLines(this.isExpansion?999:3) | ||
| 73 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 76 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 77 | + | ||
| 78 | + Text(this.isExpansion?'收起':'展开').onClick(()=>{ | ||
| 79 | + this.isExpansion = !this.isExpansion | ||
| 80 | + }) | ||
| 81 | + .fontSize(14) | ||
| 82 | + .fontColor($r('app.color.white')) | ||
| 83 | + }.alignItems(VerticalAlign.Bottom) | ||
| 74 | .alignRules({ | 84 | .alignRules({ |
| 75 | left: { anchor: "__container__", align: HorizontalAlign.Start }, | 85 | left: { anchor: "__container__", align: HorizontalAlign.Start }, |
| 76 | - bottom: this.frontLinkObject.linkUrl.length > 0?{ anchor: "row_detail", align: VerticalAlign.Top }:{ anchor: "__container__", align: VerticalAlign.Bottom } | 86 | + bottom: this.frontLinkObject.linkUrl.length > 0 || this.frontLinkObject?.newsId.length > 0 ?{ anchor: "row_detail", align: VerticalAlign.Top }:{ anchor: "__container__", align: VerticalAlign.Bottom } |
| 77 | }) | 87 | }) |
| 78 | - .margin({ left: 16, right: 16, bottom: this.frontLinkObject.linkUrl.length > 0?0:16}) | 88 | + .margin({top: 10 , left: 16, right: 16, bottom: this.frontLinkObject.linkUrl.length > 0 || this.frontLinkObject?.newsId.length > 0 ?0:16}) |
| 79 | .id('txt_summary') | 89 | .id('txt_summary') |
| 80 | 90 | ||
| 81 | Text(this.frontLinkObject?.title ?? "") | 91 | Text(this.frontLinkObject?.title ?? "") |
| @@ -112,6 +112,8 @@ interface picProps { | @@ -112,6 +112,8 @@ interface picProps { | ||
| 112 | struct createImg { | 112 | struct createImg { |
| 113 | @Prop fullColumnImgUrls: FullColumnImgUrlDTO[] | 113 | @Prop fullColumnImgUrls: FullColumnImgUrlDTO[] |
| 114 | @State loadImg: boolean = false; | 114 | @State loadImg: boolean = false; |
| 115 | + @State onePicW: number = 0; // 只有一张图时候图片的宽度 | ||
| 116 | + @State onePicH: number = 0; // 只有一张图时候图片的高度 | ||
| 115 | 117 | ||
| 116 | async aboutToAppear(): Promise<void> { | 118 | async aboutToAppear(): Promise<void> { |
| 117 | if (this.fullColumnImgUrls.length === 4) { // 为了使用栅格布局以便于占用三分之二的宽度,加一个占位 | 119 | if (this.fullColumnImgUrls.length === 4) { // 为了使用栅格布局以便于占用三分之二的宽度,加一个占位 |
| @@ -177,7 +179,7 @@ struct createImg { | @@ -177,7 +179,7 @@ struct createImg { | ||
| 177 | Image(this.loadImg ? item.fullUrl || item.url : '') | 179 | Image(this.loadImg ? item.fullUrl || item.url : '') |
| 178 | .backgroundColor(0xf5f5f5) | 180 | .backgroundColor(0xf5f5f5) |
| 179 | .width('100%') | 181 | .width('100%') |
| 180 | - .height(172) | 182 | + .height(198) |
| 181 | .autoResize(true) | 183 | .autoResize(true) |
| 182 | .borderRadius(this.caclImageRadius(index)) | 184 | .borderRadius(this.caclImageRadius(index)) |
| 183 | } else if (this.getPicType(item.weight, item.height) === 2) { | 185 | } else if (this.getPicType(item.weight, item.height) === 2) { |
| @@ -215,14 +217,18 @@ struct createImg { | @@ -215,14 +217,18 @@ struct createImg { | ||
| 215 | } | 217 | } |
| 216 | } else { | 218 | } else { |
| 217 | GridCol({ | 219 | GridCol({ |
| 218 | - span: item.landscape === 1 ? 12 : 8 | 220 | + span: this.onePicW > this.onePicH ? 12 : 8 |
| 219 | }) { | 221 | }) { |
| 220 | Image(this.loadImg ? item.fullUrl : '') | 222 | Image(this.loadImg ? item.fullUrl : '') |
| 221 | .backgroundColor(0xf5f5f5) | 223 | .backgroundColor(0xf5f5f5) |
| 222 | - .aspectRatio(item.landscape === 1 ? 343 / 172 : 228 / 305) | 224 | + .aspectRatio(this.onePicW > this.onePicH ? 343 / 198 : 228 / 305) |
| 223 | .autoResize(true) | 225 | .autoResize(true) |
| 224 | .borderRadius(this.caclImageRadius(index)) | 226 | .borderRadius(this.caclImageRadius(index)) |
| 225 | .opacity(!item.weight && !item.height ? 0 : 1) | 227 | .opacity(!item.weight && !item.height ? 0 : 1) |
| 228 | + .onComplete((event?) => { | ||
| 229 | + this.onePicW = event?.width || 0; | ||
| 230 | + this.onePicH = event?.height || 0; | ||
| 231 | + }) | ||
| 226 | } | 232 | } |
| 227 | } | 233 | } |
| 228 | } else if (this.fullColumnImgUrls.length === 4) { | 234 | } else if (this.fullColumnImgUrls.length === 4) { |
| @@ -88,7 +88,7 @@ export struct Card6Component { | @@ -88,7 +88,7 @@ export struct Card6Component { | ||
| 88 | .fontSize(18) | 88 | .fontSize(18) |
| 89 | .lineHeight(27) | 89 | .lineHeight(27) |
| 90 | .fontWeight(FontWeight.Normal) | 90 | .fontWeight(FontWeight.Normal) |
| 91 | - .maxLines(this.contentDTO.appStyle === '6' ? 4 : 2) | 91 | + .maxLines(this.contentDTO.appStyle === '6' ? 4 : 3) |
| 92 | .alignSelf(ItemAlign.Start) | 92 | .alignSelf(ItemAlign.Start) |
| 93 | .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 | 93 | .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 |
| 94 | .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 && | 94 | .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 && |
| @@ -107,7 +107,7 @@ export struct Card6Component { | @@ -107,7 +107,7 @@ export struct Card6Component { | ||
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | .alignItems(HorizontalAlign.Start) | 109 | .alignItems(HorizontalAlign.Start) |
| 110 | - .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78 : 156) | 110 | + .height(this.contentDTO.appStyle === CompStyle.Card_13 ? '' : 156) |
| 111 | 111 | ||
| 112 | 112 | ||
| 113 | .justifyContent(FlexAlign.SpaceBetween) | 113 | .justifyContent(FlexAlign.SpaceBetween) |
| @@ -138,7 +138,8 @@ export struct Card6Component { | @@ -138,7 +138,8 @@ export struct Card6Component { | ||
| 138 | }) | 138 | }) |
| 139 | 139 | ||
| 140 | .width(CommonConstants.FULL_WIDTH) | 140 | .width(CommonConstants.FULL_WIDTH) |
| 141 | - .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 106 : 184) .justifyContent(FlexAlign.SpaceBetween) | 141 | + .height(this.contentDTO.appStyle === CompStyle.Card_13 ? '' : 184) |
| 142 | + .justifyContent(FlexAlign.SpaceBetween) | ||
| 142 | .alignItems(VerticalAlign.Top) | 143 | .alignItems(VerticalAlign.Top) |
| 143 | } | 144 | } |
| 144 | } | 145 | } |
| @@ -133,6 +133,7 @@ struct MineHomePage { | @@ -133,6 +133,7 @@ struct MineHomePage { | ||
| 133 | .backgroundImageSize(ImageSize.Cover) | 133 | .backgroundImageSize(ImageSize.Cover) |
| 134 | .padding({left:"17lpx",right:"8lpx"}) | 134 | .padding({left:"17lpx",right:"8lpx"}) |
| 135 | .height('35lpx') | 135 | .height('35lpx') |
| 136 | + .borderRadius({topRight:2,bottomRight:2}) | ||
| 136 | } | 137 | } |
| 137 | 138 | ||
| 138 | Blank() | 139 | Blank() |
| @@ -74,7 +74,10 @@ struct ForgetPasswordPage { | @@ -74,7 +74,10 @@ struct ForgetPasswordPage { | ||
| 74 | }) | 74 | }) |
| 75 | }.padding({ left: 25, right: 25 }).width('100%') | 75 | }.padding({ left: 25, right: 25 }).width('100%') |
| 76 | 76 | ||
| 77 | - }.width('100%').height('100%').alignItems(HorizontalAlign.Start) | 77 | + }.width('100%') |
| 78 | + .height('100%') | ||
| 79 | + .alignItems(HorizontalAlign.Start) | ||
| 80 | + .backgroundColor(Color.White) | ||
| 78 | } | 81 | } |
| 79 | 82 | ||
| 80 | aboutToAppear() { | 83 | aboutToAppear() { |
| @@ -241,7 +241,8 @@ struct LoginPage { | @@ -241,7 +241,8 @@ struct LoginPage { | ||
| 241 | .visibility(this.isProtocol ? Visibility.Visible : Visibility.None) | 241 | .visibility(this.isProtocol ? Visibility.Visible : Visibility.None) |
| 242 | 242 | ||
| 243 | }.width('100%') | 243 | }.width('100%') |
| 244 | - .height('100%').backgroundColor(Color.White) | 244 | + .height('100%') |
| 245 | + .backgroundColor(Color.White) | ||
| 245 | } | 246 | } |
| 246 | 247 | ||
| 247 | @Builder | 248 | @Builder |
| @@ -280,6 +281,7 @@ struct LoginPage { | @@ -280,6 +281,7 @@ struct LoginPage { | ||
| 280 | .width('100%') | 281 | .width('100%') |
| 281 | }.padding({ left: 25, right: 25 }).width('100%').margin({ top: 36 }) | 282 | }.padding({ left: 25, right: 25 }).width('100%').margin({ top: 36 }) |
| 282 | .visibility(this.checkCodePage ? Visibility.None : Visibility.Visible) | 283 | .visibility(this.checkCodePage ? Visibility.None : Visibility.Visible) |
| 284 | + .backgroundColor(Color.White) | ||
| 283 | 285 | ||
| 284 | } | 286 | } |
| 285 | 287 |
| @@ -214,6 +214,17 @@ export struct MultiPictureDetailPageComponent { | @@ -214,6 +214,17 @@ export struct MultiPictureDetailPageComponent { | ||
| 214 | left: 16, | 214 | left: 16, |
| 215 | right: 0 | 215 | right: 0 |
| 216 | }) | 216 | }) |
| 217 | + .onClick(() => { | ||
| 218 | + if (this.contentDetailData.rmhInfo?.cnMainControl === 1) { | ||
| 219 | + // 号主页 | ||
| 220 | + const params: Params = { | ||
| 221 | + creatorId: this.contentDetailData.rmhInfo.rmhId, | ||
| 222 | + pageID: '' | ||
| 223 | + } | ||
| 224 | + WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) | ||
| 225 | + } | ||
| 226 | + | ||
| 227 | + }) | ||
| 217 | 228 | ||
| 218 | Row() { | 229 | Row() { |
| 219 | if (this.followStatus == '0') { | 230 | if (this.followStatus == '0') { |
-
Please register or login to post a comment