Showing
9 changed files
with
62 additions
and
27 deletions
| @@ -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 ?? "") |
| @@ -146,7 +146,7 @@ export struct RmhTitle { | @@ -146,7 +146,7 @@ export struct RmhTitle { | ||
| 146 | .height(16) | 146 | .height(16) |
| 147 | } | 147 | } |
| 148 | } | 148 | } |
| 149 | - Text(this.rmhInfo?.rmhDesc) | 149 | + Text(this.rmhInfo?.rmhDesc.replaceAll('\n', '')) |
| 150 | .fontSize($r("app.float.font_size_12")) | 150 | .fontSize($r("app.float.font_size_12")) |
| 151 | .fontColor($r("app.color.color_B0B0B0")) | 151 | .fontColor($r("app.color.color_B0B0B0")) |
| 152 | .maxLines(1) | 152 | .maxLines(1) |
| @@ -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) { |
| @@ -40,7 +40,7 @@ struct ChannelSubscriptionLayout { | @@ -40,7 +40,7 @@ struct ChannelSubscriptionLayout { | ||
| 40 | 40 | ||
| 41 | aboutToAppear() { | 41 | aboutToAppear() { |
| 42 | this.currentTopNavSelectedItem = this.myChannelList[this.currentTopNavSelectedIndex] | 42 | this.currentTopNavSelectedItem = this.myChannelList[this.currentTopNavSelectedIndex] |
| 43 | - this.myChannelList.forEach(item=>{ | 43 | + this.myChannelList.forEach(item => { |
| 44 | this.channelIds.push(item.channelId) | 44 | this.channelIds.push(item.channelId) |
| 45 | }) | 45 | }) |
| 46 | } | 46 | } |
| @@ -53,8 +53,9 @@ struct ChannelSubscriptionLayout { | @@ -53,8 +53,9 @@ struct ChannelSubscriptionLayout { | ||
| 53 | this.channelIds.splice(index2, 0, channelIdTmp[0]) | 53 | this.channelIds.splice(index2, 0, channelIdTmp[0]) |
| 54 | AppStorage.setOrCreate('channelIds', this.channelIds.join(',')) | 54 | AppStorage.setOrCreate('channelIds', this.channelIds.join(',')) |
| 55 | } | 55 | } |
| 56 | + | ||
| 56 | //删除频道 | 57 | //删除频道 |
| 57 | - delChannelItem(index: number){ | 58 | + delChannelItem(index: number) { |
| 58 | let item = this.myChannelList.splice(index, 1)[0] | 59 | let item = this.myChannelList.splice(index, 1)[0] |
| 59 | this.channelIds.splice(index, 1) | 60 | this.channelIds.splice(index, 1) |
| 60 | AppStorage.setOrCreate('channelIds', JSON.stringify(this.channelIds)) | 61 | AppStorage.setOrCreate('channelIds', JSON.stringify(this.channelIds)) |
| @@ -65,8 +66,9 @@ struct ChannelSubscriptionLayout { | @@ -65,8 +66,9 @@ struct ChannelSubscriptionLayout { | ||
| 65 | this.localChannelList.unshift(item) | 66 | this.localChannelList.unshift(item) |
| 66 | } | 67 | } |
| 67 | } | 68 | } |
| 69 | + | ||
| 68 | // 添加频道 | 70 | // 添加频道 |
| 69 | - addChannelItem(item: TopNavDTO){ | 71 | + addChannelItem(item: TopNavDTO) { |
| 70 | this.channelIds.push(item.channelId) | 72 | this.channelIds.push(item.channelId) |
| 71 | this.myChannelList.push(item) | 73 | this.myChannelList.push(item) |
| 72 | AppStorage.setOrCreate('channelIds', this.channelIds.join(',')) | 74 | AppStorage.setOrCreate('channelIds', this.channelIds.join(',')) |
| @@ -323,9 +325,10 @@ struct ChannelSubscriptionLayout { | @@ -323,9 +325,10 @@ struct ChannelSubscriptionLayout { | ||
| 323 | } | 325 | } |
| 324 | .width('23%') | 326 | .width('23%') |
| 325 | .height(40) | 327 | .height(40) |
| 328 | + .borderRadius(3) | ||
| 326 | .border({ | 329 | .border({ |
| 327 | - width: item.headlinesOn === 1 || item.movePermitted === 0 ? 0 : 1, | ||
| 328 | - color: '#EDEDED', | 330 | + width: 0.7, |
| 331 | + color: item.headlinesOn === 1 || item.movePermitted === 0 ? '#F5F5F5' : '#EDEDED', | ||
| 329 | radius: 3 | 332 | radius: 3 |
| 330 | }) | 333 | }) |
| 331 | .zIndex(this.dragItem == item.num ? 1 : 0) | 334 | .zIndex(this.dragItem == item.num ? 1 : 0) |
| @@ -427,8 +430,9 @@ struct ChannelSubscriptionLayout { | @@ -427,8 +430,9 @@ struct ChannelSubscriptionLayout { | ||
| 427 | .width(80) | 430 | .width(80) |
| 428 | .height(40) | 431 | .height(40) |
| 429 | .border({ | 432 | .border({ |
| 430 | - width: 1, | ||
| 431 | - color: '#EDEDED' | 433 | + width: 0.7, |
| 434 | + color: '#EDEDED', | ||
| 435 | + radius: 3 | ||
| 432 | }) | 436 | }) |
| 433 | }, (item: TopNavDTO) => JSON.stringify(item)) | 437 | }, (item: TopNavDTO) => JSON.stringify(item)) |
| 434 | } | 438 | } |
| @@ -471,8 +475,9 @@ struct ChannelSubscriptionLayout { | @@ -471,8 +475,9 @@ struct ChannelSubscriptionLayout { | ||
| 471 | .width(80) | 475 | .width(80) |
| 472 | .height(40) | 476 | .height(40) |
| 473 | .border({ | 477 | .border({ |
| 474 | - width: 1, | ||
| 475 | - color: '#EDEDED' | 478 | + width: 0.7, |
| 479 | + color: '#EDEDED', | ||
| 480 | + radius: 3 | ||
| 476 | }) | 481 | }) |
| 477 | }, (item: TopNavDTO) => JSON.stringify(item)) | 482 | }, (item: TopNavDTO) => JSON.stringify(item)) |
| 478 | } | 483 | } |
| @@ -203,7 +203,6 @@ export struct TopNavigationComponentNew { | @@ -203,7 +203,6 @@ export struct TopNavigationComponentNew { | ||
| 203 | moreChannelList: $moreChannelList, | 203 | moreChannelList: $moreChannelList, |
| 204 | localChannelList: $localChannelList, | 204 | localChannelList: $localChannelList, |
| 205 | changeTab: (index) => { | 205 | changeTab: (index) => { |
| 206 | - | ||
| 207 | this.changePage(index) | 206 | this.changePage(index) |
| 208 | } | 207 | } |
| 209 | }) | 208 | }) |
| @@ -125,7 +125,6 @@ export struct TopPlayComponent { | @@ -125,7 +125,6 @@ export struct TopPlayComponent { | ||
| 125 | } else { | 125 | } else { |
| 126 | Logger.debug(TAG, `---0------>${playUrl}`) | 126 | Logger.debug(TAG, `---0------>${playUrl}`) |
| 127 | if (StringUtils.isNotEmpty(playUrl)) { | 127 | if (StringUtils.isNotEmpty(playUrl)) { |
| 128 | - Logger.debug(TAG, `---isNotEmpty------>`) | ||
| 129 | this.playUrl = playUrl | 128 | this.playUrl = playUrl |
| 130 | this.tryToPlay() | 129 | this.tryToPlay() |
| 131 | } | 130 | } |
| @@ -152,8 +151,8 @@ export struct TopPlayComponent { | @@ -152,8 +151,8 @@ export struct TopPlayComponent { | ||
| 152 | this.previewUrl = '' | 151 | this.previewUrl = '' |
| 153 | } | 152 | } |
| 154 | } | 153 | } |
| 155 | - Logger.debug(TAG, | ||
| 156 | - `---0------>` + this.isWait + ' ->' + this.isHideLoading + ' ->' + this.isEnd + ' -->' + this.isVideoSource) | 154 | + // Logger.debug(TAG, |
| 155 | + // `---0------>` + this.isWait + ' ->' + this.isHideLoading + ' ->' + this.isEnd + ' -->' + this.isVideoSource) | ||
| 157 | } | 156 | } |
| 158 | 157 | ||
| 159 | tryToPlay() { | 158 | tryToPlay() { |
| @@ -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