Showing
18 changed files
with
69 additions
and
60 deletions
| @@ -456,6 +456,7 @@ export class ProcessUtils { | @@ -456,6 +456,7 @@ export class ProcessUtils { | ||
| 456 | pageID: 'FeedBackActivity' | 456 | pageID: 'FeedBackActivity' |
| 457 | } as Params, | 457 | } as Params, |
| 458 | }; | 458 | }; |
| 459 | + | ||
| 459 | WDRouterRule.jumpWithAction(taskAction) | 460 | WDRouterRule.jumpWithAction(taskAction) |
| 460 | } | 461 | } |
| 461 | 462 | ||
| @@ -463,6 +464,7 @@ export class ProcessUtils { | @@ -463,6 +464,7 @@ export class ProcessUtils { | ||
| 463 | * 跳转到登录页 | 464 | * 跳转到登录页 |
| 464 | */ | 465 | */ |
| 465 | public static gotoLoginPage() { | 466 | public static gotoLoginPage() { |
| 467 | + | ||
| 466 | WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | 468 | WDRouterRule.jumpWithPage(WDRouterPage.loginPage) |
| 467 | } | 469 | } |
| 468 | } | 470 | } |
| @@ -84,7 +84,7 @@ export class ContentDTO implements BaseDTO { | @@ -84,7 +84,7 @@ export class ContentDTO implements BaseDTO { | ||
| 84 | openType: string = ''; | 84 | openType: string = ''; |
| 85 | extra: string = '' | 85 | extra: string = '' |
| 86 | 86 | ||
| 87 | - static clone(old:ContentDTO): ContentDTO { | 87 | + static clone(old: ContentDTO): ContentDTO { |
| 88 | let content = new ContentDTO(); | 88 | let content = new ContentDTO(); |
| 89 | content.appStyle = old.appStyle; | 89 | content.appStyle = old.appStyle; |
| 90 | content.cityCode = old.cityCode; | 90 | content.cityCode = old.cityCode; |
| 1 | export interface commentInfo { | 1 | export interface commentInfo { |
| 2 | commentTitle: string, | 2 | commentTitle: string, |
| 3 | newsTitle: string, | 3 | newsTitle: string, |
| 4 | - userName: string, | ||
| 5 | - userHeaderUrl: string, | 4 | + userId?: string, |
| 5 | + userName?: string, | ||
| 6 | + userHeaderUrl?: string, | ||
| 6 | publishTime: number, | 7 | publishTime: number, |
| 7 | commentId: string, | 8 | commentId: string, |
| 8 | newsId: string, | 9 | newsId: string, |
| 9 | relId: string; | 10 | relId: string; |
| 10 | relType: string; | 11 | relType: string; |
| 11 | - userId: string; | ||
| 12 | - newsType?: string | 12 | + newsType?: string, |
| 13 | + objectType?: string, | ||
| 13 | } | 14 | } |
| 1 | -import { CommonConstants, CompStyle } from 'wdConstant'; | ||
| 2 | -import { ContentDTO } from 'wdBean'; | 1 | +import { CompStyle } from 'wdConstant'; |
| 2 | +import { CompDTO, ContentDTO } from 'wdBean'; | ||
| 3 | import { Card2Component } from './cardview/Card2Component'; | 3 | import { Card2Component } from './cardview/Card2Component'; |
| 4 | import { Card3Component } from './cardview/Card3Component'; | 4 | import { Card3Component } from './cardview/Card3Component'; |
| 5 | import { Card4Component } from './cardview/Card4Component'; | 5 | import { Card4Component } from './cardview/Card4Component'; |
| @@ -24,13 +24,14 @@ import { Card21Component } from './cardview/Card21Component'; | @@ -24,13 +24,14 @@ import { Card21Component } from './cardview/Card21Component'; | ||
| 24 | @Component | 24 | @Component |
| 25 | export struct CardParser { | 25 | export struct CardParser { |
| 26 | @State contentDTO: ContentDTO = new ContentDTO(); | 26 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 27 | + @State compDTO: CompDTO = {} as CompDTO | ||
| 27 | 28 | ||
| 28 | build() { | 29 | build() { |
| 29 | - this.contentBuilder(this.contentDTO); | 30 | + this.contentBuilder(this.contentDTO, this.compDTO); |
| 30 | } | 31 | } |
| 31 | 32 | ||
| 32 | @Builder | 33 | @Builder |
| 33 | - contentBuilder(contentDTO: ContentDTO) { | 34 | + contentBuilder(contentDTO: ContentDTO, compDTO: CompDTO) { |
| 34 | if (contentDTO.appStyle === CompStyle.Card_02) { | 35 | if (contentDTO.appStyle === CompStyle.Card_02) { |
| 35 | Card2Component({ contentDTO }) | 36 | Card2Component({ contentDTO }) |
| 36 | } else if (contentDTO.appStyle === CompStyle.Card_03) { | 37 | } else if (contentDTO.appStyle === CompStyle.Card_03) { |
| @@ -38,7 +39,7 @@ export struct CardParser { | @@ -38,7 +39,7 @@ export struct CardParser { | ||
| 38 | } else if (contentDTO.appStyle === CompStyle.Card_04) { | 39 | } else if (contentDTO.appStyle === CompStyle.Card_04) { |
| 39 | Card4Component({ contentDTO }) | 40 | Card4Component({ contentDTO }) |
| 40 | } else if (contentDTO.appStyle === CompStyle.Card_05) { | 41 | } else if (contentDTO.appStyle === CompStyle.Card_05) { |
| 41 | - Card5Component({ contentDTO }) | 42 | + Card5Component({ contentDTO, titleShowPolicy: compDTO.titleShowPolicy }) |
| 42 | } else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle | 43 | } else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle |
| 43 | .Card_13) { | 44 | .Card_13) { |
| 44 | Card6Component({ contentDTO }) | 45 | Card6Component({ contentDTO }) |
| @@ -64,8 +65,7 @@ export struct CardParser { | @@ -64,8 +65,7 @@ export struct CardParser { | ||
| 64 | Card20Component({ contentDTO }) | 65 | Card20Component({ contentDTO }) |
| 65 | } else if (contentDTO.appStyle === CompStyle.Card_21) { | 66 | } else if (contentDTO.appStyle === CompStyle.Card_21) { |
| 66 | Card21Component({ contentDTO }) | 67 | Card21Component({ contentDTO }) |
| 67 | - } | ||
| 68 | - else { | 68 | + } else { |
| 69 | // todo:组件未实现 / Component Not Implemented | 69 | // todo:组件未实现 / Component Not Implemented |
| 70 | // Text(contentDTO.appStyle) | 70 | // Text(contentDTO.appStyle) |
| 71 | // .width(CommonConstants.FULL_PARENT) | 71 | // .width(CommonConstants.FULL_PARENT) |
| @@ -32,12 +32,12 @@ import { LiveHorizontalCardComponent } from './view/LiveHorizontalCardComponent' | @@ -32,12 +32,12 @@ import { LiveHorizontalCardComponent } from './view/LiveHorizontalCardComponent' | ||
| 32 | @Component | 32 | @Component |
| 33 | export struct CompParser { | 33 | export struct CompParser { |
| 34 | @State compDTO: CompDTO = {} as CompDTO | 34 | @State compDTO: CompDTO = {} as CompDTO |
| 35 | - @State private pageModel: PageModel = new PageModel(); | ||
| 36 | @State compIndex: number = 0; | 35 | @State compIndex: number = 0; |
| 36 | + @State private pageModel: PageModel = new PageModel(); | ||
| 37 | 37 | ||
| 38 | build() { | 38 | build() { |
| 39 | Column() { | 39 | Column() { |
| 40 | - if (this.compDTO.name !="月度排行卡") { | 40 | + if (this.compDTO.name != "月度排行卡") { |
| 41 | 41 | ||
| 42 | this.componentBuilder(this.compDTO, this.compIndex); | 42 | this.componentBuilder(this.compDTO, this.compIndex); |
| 43 | } | 43 | } |
| @@ -53,7 +53,8 @@ export struct CompParser { | @@ -53,7 +53,8 @@ export struct CompParser { | ||
| 53 | } else if (compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { | 53 | } else if (compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { |
| 54 | ZhCarouselLayout01({ compDTO: compDTO }) | 54 | ZhCarouselLayout01({ compDTO: compDTO }) |
| 55 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 55 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 56 | - } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_01 && compDTO.imageScale === 2) {// && compDTO.name ==="横划卡" | 56 | + } else if (compDTO.compStyle === CompStyle.Zh_Single_Row_01 && |
| 57 | + compDTO.imageScale === 2) { // && compDTO.name ==="横划卡" | ||
| 57 | 58 | ||
| 58 | LiveHorizontalCardComponent({ compDTO: compDTO }) | 59 | LiveHorizontalCardComponent({ compDTO: compDTO }) |
| 59 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 60 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| @@ -87,7 +88,7 @@ export struct CompParser { | @@ -87,7 +88,7 @@ export struct CompParser { | ||
| 87 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 88 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 88 | } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_02) { | 89 | } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_02) { |
| 89 | //头图卡 和comStyle 2相同, | 90 | //头图卡 和comStyle 2相同, |
| 90 | - Card5Component({ contentDTO: compDTO.operDataList[0] }) | 91 | + Card5Component({ contentDTO: compDTO.operDataList[0], titleShowPolicy: compDTO.titleShowPolicy }) |
| 91 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 92 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 92 | } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_03) { | 93 | } else if (compDTO.compStyle === CompStyle.Zh_Single_Column_03) { |
| 93 | // 大图卡 | 94 | // 大图卡 |
| @@ -107,10 +108,9 @@ export struct CompParser { | @@ -107,10 +108,9 @@ export struct CompParser { | ||
| 107 | //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 16, right: 16 }) | 108 | //Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 16, right: 16 }) |
| 108 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 109 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 109 | } else if (!Number.isNaN(Number(compDTO.compStyle))) { | 110 | } else if (!Number.isNaN(Number(compDTO.compStyle))) { |
| 110 | - CardParser({ contentDTO: compDTO.operDataList[0] }); | 111 | + CardParser({ contentDTO: compDTO.operDataList[0], compDTO }); |
| 111 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 112 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 112 | - } | ||
| 113 | - else { | 113 | + } else { |
| 114 | Text(compDTO.compStyle) | 114 | Text(compDTO.compStyle) |
| 115 | .width(CommonConstants.FULL_PARENT) | 115 | .width(CommonConstants.FULL_PARENT) |
| 116 | .padding(10) | 116 | .padding(10) |
| 1 | import { CompDTO } from 'wdBean/Index'; | 1 | import { CompDTO } from 'wdBean/Index'; |
| 2 | -import { Logger } from 'wdKit/Index'; | 2 | +import { DateTimeUtils, Logger } from 'wdKit/Index'; |
| 3 | import PageModel from '../../viewmodel/PageModel'; | 3 | import PageModel from '../../viewmodel/PageModel'; |
| 4 | 4 | ||
| 5 | /** | 5 | /** |
| @@ -59,9 +59,9 @@ export struct CardAdvBottom { | @@ -59,9 +59,9 @@ export struct CardAdvBottom { | ||
| 59 | break; | 59 | break; |
| 60 | } | 60 | } |
| 61 | } | 61 | } |
| 62 | - Logger.error("ZZZXXXXX","currentIndex====>"+currentIndex); | ||
| 63 | if (currentIndex >= 0) { | 62 | if (currentIndex >= 0) { |
| 64 | this.pageModel.compList.deleteItem(currentIndex) | 63 | this.pageModel.compList.deleteItem(currentIndex) |
| 64 | + this.pageModel.timestamp = DateTimeUtils.getTimeStamp().toString() | ||
| 65 | } | 65 | } |
| 66 | } | 66 | } |
| 67 | } | 67 | } |
| 1 | import { CompDTO } from 'wdBean/Index'; | 1 | import { CompDTO } from 'wdBean/Index'; |
| 2 | -import { Logger } from 'wdKit/Index'; | 2 | +import { DateTimeUtils, Logger } from 'wdKit/Index'; |
| 3 | import PageModel from '../../viewmodel/PageModel'; | 3 | import PageModel from '../../viewmodel/PageModel'; |
| 4 | 4 | ||
| 5 | /** | 5 | /** |
| @@ -71,10 +71,9 @@ export struct CardAdvTop { | @@ -71,10 +71,9 @@ export struct CardAdvTop { | ||
| 71 | break; | 71 | break; |
| 72 | } | 72 | } |
| 73 | } | 73 | } |
| 74 | - | ||
| 75 | - Logger.error("ZZZXXXXX","currentIndex====>"+currentIndex); | ||
| 76 | if (currentIndex >= 0) { | 74 | if (currentIndex >= 0) { |
| 77 | this.pageModel.compList.deleteItem(currentIndex) | 75 | this.pageModel.compList.deleteItem(currentIndex) |
| 76 | + this.pageModel.timestamp = DateTimeUtils.getTimeStamp().toString() | ||
| 78 | } | 77 | } |
| 79 | } | 78 | } |
| 80 | } | 79 | } |
| @@ -48,8 +48,9 @@ export struct Card10Component { | @@ -48,8 +48,9 @@ export struct Card10Component { | ||
| 48 | .onClick((event: ClickEvent) => { | 48 | .onClick((event: ClickEvent) => { |
| 49 | ProcessUtils.processPage(this.contentDTO) | 49 | ProcessUtils.processPage(this.contentDTO) |
| 50 | }) | 50 | }) |
| 51 | - | ||
| 52 | - Notes({ objectType: 5 }).margin({ left: 5, bottom: 5 }) | 51 | + if (this.contentDTO.objectType == '5') { |
| 52 | + Notes({ objectType: 5 }).margin({ left: 5, bottom: 5 }) | ||
| 53 | + } | ||
| 53 | }.alignContent(Alignment.BottomStart) | 54 | }.alignContent(Alignment.BottomStart) |
| 54 | 55 | ||
| 55 | // 专题列表--后端返回三个, | 56 | // 专题列表--后端返回三个, |
| @@ -106,7 +107,7 @@ export struct Card10Component { | @@ -106,7 +107,7 @@ export struct Card10Component { | ||
| 106 | .fontColor($r('app.color.color_222222')) | 107 | .fontColor($r('app.color.color_222222')) |
| 107 | .maxLines(2) | 108 | .maxLines(2) |
| 108 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 109 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 109 | - .textIndent(item.objectType == '5' ? 40 : 0) | 110 | + .textIndent(item.objectType == '5' ? 38 : 0) |
| 110 | }.alignContent(Alignment.TopStart) | 111 | }.alignContent(Alignment.TopStart) |
| 111 | 112 | ||
| 112 | CardSourceInfo( | 113 | CardSourceInfo( |
| @@ -40,7 +40,7 @@ export struct Card2Component { | @@ -40,7 +40,7 @@ export struct Card2Component { | ||
| 40 | .maxLines(2) | 40 | .maxLines(2) |
| 41 | .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 | 41 | .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 |
| 42 | .align(Alignment.Start) | 42 | .align(Alignment.Start) |
| 43 | - .textIndent(this.contentDTO.objectType == '5' ? 40 : 0) | 43 | + .textIndent(this.contentDTO.objectType == '5' ? 35 : 0) |
| 44 | } | 44 | } |
| 45 | .alignContent(Alignment.TopStart) | 45 | .alignContent(Alignment.TopStart) |
| 46 | 46 |
| @@ -12,7 +12,7 @@ const TAG: string = 'Card5Component'; | @@ -12,7 +12,7 @@ const TAG: string = 'Card5Component'; | ||
| 12 | @Component | 12 | @Component |
| 13 | export struct Card5Component { | 13 | export struct Card5Component { |
| 14 | @State contentDTO: ContentDTO = new ContentDTO(); | 14 | @State contentDTO: ContentDTO = new ContentDTO(); |
| 15 | - @State titleShowPolicy: number | string = 1 | 15 | + @Prop titleShowPolicy: number | string |
| 16 | @State loadImg: boolean = false; | 16 | @State loadImg: boolean = false; |
| 17 | @State clicked: boolean = false; | 17 | @State clicked: boolean = false; |
| 18 | 18 | ||
| @@ -22,12 +22,13 @@ export struct Card5Component { | @@ -22,12 +22,13 @@ export struct Card5Component { | ||
| 22 | 22 | ||
| 23 | build() { | 23 | build() { |
| 24 | Stack() { | 24 | Stack() { |
| 25 | + | ||
| 25 | Image(this.loadImg ? this.contentDTO.coverUrl : '') | 26 | Image(this.loadImg ? this.contentDTO.coverUrl : '') |
| 26 | .backgroundColor(0xf5f5f5) | 27 | .backgroundColor(0xf5f5f5) |
| 27 | .width(CommonConstants.FULL_WIDTH) | 28 | .width(CommonConstants.FULL_WIDTH) |
| 28 | .autoResize(true) | 29 | .autoResize(true) |
| 29 | .borderRadius($r('app.float.image_border_radius')) | 30 | .borderRadius($r('app.float.image_border_radius')) |
| 30 | - // if ((this.titleShowPolicy === 1 || this.contentDTO.titleShow === 1) && this.contentDTO.newsTitle) { | 31 | + if (this.titleShowPolicy === 1) { |
| 31 | Row() | 32 | Row() |
| 32 | .width(CommonConstants.FULL_WIDTH) | 33 | .width(CommonConstants.FULL_WIDTH) |
| 33 | .height(59) | 34 | .height(59) |
| @@ -41,20 +42,21 @@ export struct Card5Component { | @@ -41,20 +42,21 @@ export struct Card5Component { | ||
| 41 | if (this.contentDTO.objectType == '5') { | 42 | if (this.contentDTO.objectType == '5') { |
| 42 | Notes({ objectType: this.contentDTO.objectType }) | 43 | Notes({ objectType: this.contentDTO.objectType }) |
| 43 | } | 44 | } |
| 45 | + | ||
| 44 | Text(this.contentDTO.newsTitle) | 46 | Text(this.contentDTO.newsTitle) |
| 45 | - .width(CommonConstants.FULL_WIDTH)// .height(CommonConstants.FULL_HEIGHT) | 47 | + .width(CommonConstants.FULL_WIDTH) |
| 46 | .fontColor(Color.White) | 48 | .fontColor(Color.White) |
| 47 | .fontSize($r('app.float.normal_text_size')) | 49 | .fontSize($r('app.float.normal_text_size')) |
| 48 | .fontWeight(FontWeight.Bold) | 50 | .fontWeight(FontWeight.Bold) |
| 49 | .maxLines(2) | 51 | .maxLines(2) |
| 50 | .align(Alignment.TopStart) | 52 | .align(Alignment.TopStart) |
| 51 | - .textIndent(this.contentDTO.objectType == '5' ? 40 : 0) | 53 | + .textIndent(this.contentDTO.objectType == '5' ? 35 : 0) |
| 52 | }.alignContent(Alignment.TopStart) | 54 | }.alignContent(Alignment.TopStart) |
| 53 | } | 55 | } |
| 54 | .justifyContent(FlexAlign.Start) | 56 | .justifyContent(FlexAlign.Start) |
| 55 | - // .height(40) | ||
| 56 | .margin({ left: 12, bottom: 10, right: 12 }) | 57 | .margin({ left: 12, bottom: 10, right: 12 }) |
| 57 | - // } | 58 | + |
| 59 | + } | ||
| 58 | } | 60 | } |
| 59 | .alignContent(Alignment.Bottom) | 61 | .alignContent(Alignment.Bottom) |
| 60 | .width(CommonConstants.FULL_WIDTH) | 62 | .width(CommonConstants.FULL_WIDTH) |
| @@ -49,7 +49,7 @@ export struct Card6Component { | @@ -49,7 +49,7 @@ export struct Card6Component { | ||
| 49 | .maxLines(3) | 49 | .maxLines(3) |
| 50 | .alignSelf(ItemAlign.Start) | 50 | .alignSelf(ItemAlign.Start) |
| 51 | .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 | 51 | .textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。 |
| 52 | - .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 60 : | 52 | + .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 : |
| 53 | (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) || | 53 | (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) || |
| 54 | this.contentDTO.objectType == '5' ? 30 : 0) | 54 | this.contentDTO.objectType == '5' ? 30 : 0) |
| 55 | }.alignContent(Alignment.TopStart) | 55 | }.alignContent(Alignment.TopStart) |
| @@ -43,8 +43,11 @@ export struct Card9Component { | @@ -43,8 +43,11 @@ export struct Card9Component { | ||
| 43 | topRight: $r('app.float.image_border_radius') | 43 | topRight: $r('app.float.image_border_radius') |
| 44 | }) | 44 | }) |
| 45 | 45 | ||
| 46 | - Notes({ objectType: 5 }) | ||
| 47 | - .margin({ left: 5, bottom: 5 }) | 46 | + if (this.contentDTO.objectType == '5') { |
| 47 | + Notes({ objectType: 5 }) | ||
| 48 | + .margin({ left: 5, bottom: 5 }) | ||
| 49 | + } | ||
| 50 | + | ||
| 48 | }.alignContent(Alignment.BottomStart) | 51 | }.alignContent(Alignment.BottomStart) |
| 49 | 52 | ||
| 50 | // 时间线--后端返回三个, | 53 | // 时间线--后端返回三个, |
| @@ -13,10 +13,10 @@ export struct Notes { | @@ -13,10 +13,10 @@ export struct Notes { | ||
| 13 | build() { | 13 | build() { |
| 14 | if (this.returnTypeTitleFn()) { | 14 | if (this.returnTypeTitleFn()) { |
| 15 | Text(this.returnTypeTitleFn()) | 15 | Text(this.returnTypeTitleFn()) |
| 16 | - .fontSize($r('app.float.font_size_12')) | 16 | + .fontSize($r('app.float.font_size_11')) |
| 17 | .padding({ | 17 | .padding({ |
| 18 | - left: 5, | ||
| 19 | - right: 5, | 18 | + left: 4, |
| 19 | + right: 4, | ||
| 20 | top: 3, | 20 | top: 3, |
| 21 | bottom: 3 | 21 | bottom: 3 |
| 22 | }) | 22 | }) |
| @@ -214,7 +214,7 @@ struct CarouselLayout01CardView { | @@ -214,7 +214,7 @@ struct CarouselLayout01CardView { | ||
| 214 | .align(Alignment.Bottom) | 214 | .align(Alignment.Bottom) |
| 215 | .maxLines(CompUtils.MAX_LINES_2) | 215 | .maxLines(CompUtils.MAX_LINES_2) |
| 216 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 216 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 217 | - .textIndent(this.item.objectType == '5' ? 40 : 0) | 217 | + .textIndent(this.item.objectType == '5' ? 35 : 0) |
| 218 | } | 218 | } |
| 219 | // .height(39) | 219 | // .height(39) |
| 220 | .padding({ | 220 | .padding({ |
| @@ -5,13 +5,10 @@ import { ProcessUtils } from 'wdRouter'; | @@ -5,13 +5,10 @@ import { ProcessUtils } from 'wdRouter'; | ||
| 5 | import { SpConstants } from 'wdConstant/Index' | 5 | import { SpConstants } from 'wdConstant/Index' |
| 6 | import { | 6 | import { |
| 7 | batchLikeAndCollectParams, | 7 | batchLikeAndCollectParams, |
| 8 | - ContentDetailRequest, | ||
| 9 | - contentListParams, | ||
| 10 | - postExecuteCollectRecordParams, | ||
| 11 | - postExecuteLikeParams, | ||
| 12 | - postInteractAccentionOperateParams | ||
| 13 | } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest'; | 8 | } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest'; |
| 14 | import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel'; | 9 | import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel'; |
| 10 | +import commentViewModel from '../../components/comment/viewmodel/CommentViewModel'; | ||
| 11 | +import { commentItemModel } from '../../components/comment/model/CommentModel' | ||
| 15 | 12 | ||
| 16 | /** | 13 | /** |
| 17 | * 精选评论卡 | 14 | * 精选评论卡 |
| @@ -40,13 +37,19 @@ export struct ZhSingleRow06 { | @@ -40,13 +37,19 @@ export struct ZhSingleRow06 { | ||
| 40 | WDRouterRule.jumpWithPage(WDRouterPage.loginPage) | 37 | WDRouterRule.jumpWithPage(WDRouterPage.loginPage) |
| 41 | return | 38 | return |
| 42 | } | 39 | } |
| 43 | - const params: postExecuteLikeParams = { | ||
| 44 | - status: this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1', | ||
| 45 | - contentId: this.compDTO.operDataList[0]?.commentInfo?.newsId + '', | ||
| 46 | - contentType: this.compDTO.operDataList[0]?.commentInfo?.newsType + '', | ||
| 47 | - } | ||
| 48 | - ContentDetailRequest.postExecuteLike(params).then(res => { | ||
| 49 | - this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1' | 40 | + |
| 41 | + const commentInfo = this.compDTO.operDataList[0]?.commentInfo as commentInfo; | ||
| 42 | + // commentLikeChange(this.item) | ||
| 43 | + this.newsStatusOfUser.likeStatus = this.newsStatusOfUser.likeStatus === '1' ? '0' : '1'; | ||
| 44 | + const commentLikeParam = { | ||
| 45 | + targetId: commentInfo.newsId || '', | ||
| 46 | + id: commentInfo.commentId, | ||
| 47 | + targetType: commentInfo?.objectType || '', | ||
| 48 | + api_status: this.newsStatusOfUser?.likeStatus == '1' ? false : true | ||
| 49 | + } as commentItemModel; | ||
| 50 | + commentViewModel.commentLike(commentLikeParam).then(() => { | ||
| 51 | + }).catch(() => { | ||
| 52 | + this.newsStatusOfUser.likeStatus = this.newsStatusOfUser.likeStatus === '1' ? '0' : '1'; | ||
| 50 | }) | 53 | }) |
| 51 | } | 54 | } |
| 52 | 55 | ||
| @@ -67,7 +70,7 @@ export struct ZhSingleRow06 { | @@ -67,7 +70,7 @@ export struct ZhSingleRow06 { | ||
| 67 | ] | 70 | ] |
| 68 | } | 71 | } |
| 69 | let data = await MultiPictureDetailViewModel.getInteractDataStatus(params) | 72 | let data = await MultiPictureDetailViewModel.getInteractDataStatus(params) |
| 70 | - console.error(TAG, 'ZhSingleRow06-data', JSON.stringify(data)) | 73 | + Logger.info(TAG, 'ZhSingleRow06-data', JSON.stringify(data)) |
| 71 | this.newsStatusOfUser = data[0]; | 74 | this.newsStatusOfUser = data[0]; |
| 72 | Logger.info(TAG, `ZhSingleRow06-newsStatusOfUser:${JSON.stringify(this.newsStatusOfUser)}`) | 75 | Logger.info(TAG, `ZhSingleRow06-newsStatusOfUser:${JSON.stringify(this.newsStatusOfUser)}`) |
| 73 | } catch (exception) { | 76 | } catch (exception) { |
| @@ -126,7 +129,7 @@ export struct ZhSingleRow06 { | @@ -126,7 +129,7 @@ export struct ZhSingleRow06 { | ||
| 126 | .fontColor(0x999999) | 129 | .fontColor(0x999999) |
| 127 | 130 | ||
| 128 | Row(){ | 131 | Row(){ |
| 129 | - Image(this.newsStatusOfUser?.likeStatus == '1' ? $r('app.media.icon_like_select') : $r('app.media.icon_like')) | 132 | + Image(Number(this.newsStatusOfUser?.likeStatus) == 1 ? $r('app.media.icon_like_select') : $r('app.media.icon_like')) |
| 130 | .width(16) | 133 | .width(16) |
| 131 | .height(16) | 134 | .height(16) |
| 132 | .margin({right: 3}) | 135 | .margin({right: 3}) |
| 1 | import { BottomNavDTO, CompDTO, TopNavDTO } from 'wdBean'; | 1 | import { BottomNavDTO, CompDTO, TopNavDTO } from 'wdBean'; |
| 2 | import { SpConstants } from 'wdConstant'; | 2 | import { SpConstants } from 'wdConstant'; |
| 3 | -import { DisplayUtils, LazyDataSource, Logger, SPHelper, NetworkUtil, ToastUtils } from 'wdKit'; | 3 | +import { DisplayUtils, LazyDataSource, Logger, NetworkUtil, SPHelper, ToastUtils } from 'wdKit'; |
| 4 | import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter'; | 4 | import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter'; |
| 5 | import { PageComponent } from './PageComponent'; | 5 | import { PageComponent } from './PageComponent'; |
| 6 | import { ChannelSubscriptionLayout } from './ChannelSubscriptionLayout'; | 6 | import { ChannelSubscriptionLayout } from './ChannelSubscriptionLayout'; |
| @@ -49,9 +49,6 @@ export class LiveModel { | @@ -49,9 +49,6 @@ export class LiveModel { | ||
| 49 | params['relationId'] = relationId | 49 | params['relationId'] = relationId |
| 50 | params['liveId'] = liveId | 50 | params['liveId'] = liveId |
| 51 | params['isSubscribe'] = `${isSubscribe}` | 51 | params['isSubscribe'] = `${isSubscribe}` |
| 52 | - Logger.info('relationId', relationId) | ||
| 53 | - Logger.info('liveId', liveId) | ||
| 54 | - Logger.info('isSubscribe', typeof isSubscribe) | ||
| 55 | return new Promise<ResponseDTO<string>>((success, fail) => { | 52 | return new Promise<ResponseDTO<string>>((success, fail) => { |
| 56 | HttpRequest.post<ResponseDTO<string>>( | 53 | HttpRequest.post<ResponseDTO<string>>( |
| 57 | HttpUrlUtils.getLiveAppointmentUrl(), | 54 | HttpUrlUtils.getLiveAppointmentUrl(), |
-
Please register or login to post a comment