Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
24 changed files
with
133 additions
and
37 deletions
| @@ -34,6 +34,7 @@ export struct CardParser { | @@ -34,6 +34,7 @@ export struct CardParser { | ||
| 34 | @ObjectLink compDTO: CompDTO | 34 | @ObjectLink compDTO: CompDTO |
| 35 | pageShowTime: number = 0; | 35 | pageShowTime: number = 0; |
| 36 | pageHideTime: number = 0; | 36 | pageHideTime: number = 0; |
| 37 | + isPeopleShipHome: boolean = false; | ||
| 37 | 38 | ||
| 38 | aboutToAppear(): void { | 39 | aboutToAppear(): void { |
| 39 | console.log('CardParser-', JSON.stringify(this.contentDTO)) | 40 | console.log('CardParser-', JSON.stringify(this.contentDTO)) |
| @@ -164,7 +165,8 @@ export struct CardParser { | @@ -164,7 +165,8 @@ export struct CardParser { | ||
| 164 | contentDTO, | 165 | contentDTO, |
| 165 | compDTO: this.compDTO, | 166 | compDTO: this.compDTO, |
| 166 | pageId: this.pageId, | 167 | pageId: this.pageId, |
| 167 | - pageName: this.pageName | 168 | + pageName: this.pageName, |
| 169 | + isPeopleShipHome:this.isPeopleShipHome | ||
| 168 | }) | 170 | }) |
| 169 | } else if (contentDTO.appStyle === CompStyle.Card_21) { | 171 | } else if (contentDTO.appStyle === CompStyle.Card_21) { |
| 170 | Card21Component({ | 172 | Card21Component({ |
| @@ -6,6 +6,8 @@ import { | @@ -6,6 +6,8 @@ import { | ||
| 6 | NumberFormatterUtils, | 6 | NumberFormatterUtils, |
| 7 | DisplayUtils, | 7 | DisplayUtils, |
| 8 | NetworkUtil, | 8 | NetworkUtil, |
| 9 | + EmitterUtils, | ||
| 10 | + EmitterEventId, | ||
| 9 | FastClickUtil | 11 | FastClickUtil |
| 10 | } from 'wdKit'; | 12 | } from 'wdKit'; |
| 11 | import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; | 13 | import { MultiPictureDetailViewModel } from '../viewmodel/MultiPictureDetailViewModel'; |
| @@ -45,6 +47,7 @@ import { detailedSkeleton } from './skeleton/detailSkeleton'; | @@ -45,6 +47,7 @@ import { detailedSkeleton } from './skeleton/detailSkeleton'; | ||
| 45 | import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare' | 47 | import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare' |
| 46 | import { common } from '@kit.AbilityKit'; | 48 | import { common } from '@kit.AbilityKit'; |
| 47 | import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index'; | 49 | import { ParamType, TrackConstants, TrackingButton, TrackingContent } from 'wdTracking/Index'; |
| 50 | +import { componentUtils, window } from '@kit.ArkUI'; | ||
| 48 | const TAG = 'DynamicDetailComponent' | 51 | const TAG = 'DynamicDetailComponent' |
| 49 | const PATTERN_DATE_CN_RN: string = 'yyyy年MM月dd日 HH:mm'; | 52 | const PATTERN_DATE_CN_RN: string = 'yyyy年MM月dd日 HH:mm'; |
| 50 | 53 | ||
| @@ -79,6 +82,8 @@ export struct DynamicDetailComponent { | @@ -79,6 +82,8 @@ export struct DynamicDetailComponent { | ||
| 79 | @State operationButtonList: string[] = [] | 82 | @State operationButtonList: string[] = [] |
| 80 | @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 | 83 | @State likesStyle: number | string = 1 // 赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 |
| 81 | @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 | 84 | @State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以 |
| 85 | + @State offsetY: number = 0 | ||
| 86 | + @State isScrollTop: boolean = true | ||
| 82 | 87 | ||
| 83 | pageParam: ParamType = {} | 88 | pageParam: ParamType = {} |
| 84 | commentListAreaInfo?: Area | 89 | commentListAreaInfo?: Area |
| @@ -91,6 +96,27 @@ export struct DynamicDetailComponent { | @@ -91,6 +96,27 @@ export struct DynamicDetailComponent { | ||
| 91 | // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 | 96 | // 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空 |
| 92 | this.likesStyle = this.contentDetailData.likesStyle | 97 | this.likesStyle = this.contentDetailData.likesStyle |
| 93 | this.openLikes = this.contentDetailData.openLikes == 1 ? true : false | 98 | this.openLikes = this.contentDetailData.openLikes == 1 ? true : false |
| 99 | + | ||
| 100 | + //注册通知,来自别的组件的评论成功通知 | ||
| 101 | + EmitterUtils.receiveEvent(EmitterEventId.COMMENT_PUBLISH, (targetId?: string) => { | ||
| 102 | + if (targetId) { | ||
| 103 | + if (targetId == this.publishCommentModel.targetId) { | ||
| 104 | + // 滚动到评论列表 | ||
| 105 | + if (this.commentListAreaInfo) { | ||
| 106 | + // let height = DisplayUtils.getDeviceHeight() / 2 | ||
| 107 | + let offSetY = this.commentListAreaInfo?.globalPosition.y as number | ||
| 108 | + Logger.debug(TAG, "滚动至yOffset: " + (offSetY - 100)) | ||
| 109 | + //头部距离48 | ||
| 110 | + this.scroller.scrollTo({ | ||
| 111 | + yOffset: offSetY - 100, | ||
| 112 | + xOffset: 0, | ||
| 113 | + animation: { duration: 1000, curve: Curve.Ease } | ||
| 114 | + }) | ||
| 115 | + } | ||
| 116 | + } | ||
| 117 | + } | ||
| 118 | + }) | ||
| 119 | + | ||
| 94 | } | 120 | } |
| 95 | 121 | ||
| 96 | onPageHide() { | 122 | onPageHide() { |
| @@ -577,8 +603,28 @@ export struct DynamicDetailComponent { | @@ -577,8 +603,28 @@ export struct DynamicDetailComponent { | ||
| 577 | publishCommentModel: this.publishCommentModel, | 603 | publishCommentModel: this.publishCommentModel, |
| 578 | operationButtonList: this.operationButtonList, | 604 | operationButtonList: this.operationButtonList, |
| 579 | styleType: 1, | 605 | styleType: 1, |
| 606 | + onCommentIconClick:()=>{ | ||
| 607 | + const info = componentUtils.getRectangleById('comment'); | ||
| 608 | + console.log(JSON.stringify(info)) | ||
| 609 | + | ||
| 610 | + if (!this.offsetY) { | ||
| 611 | + this.offsetY = componentUtils.getRectangleById('comment').windowOffset.y | ||
| 612 | + } | ||
| 613 | + // 定位到评论区域 | ||
| 614 | + if (this.isScrollTop) { | ||
| 615 | + this.scroller.scrollTo({ | ||
| 616 | + xOffset: 0, | ||
| 617 | + yOffset: this.offsetY, | ||
| 618 | + animation: true | ||
| 619 | + }) | ||
| 620 | + } else { | ||
| 621 | + this.scroller.scrollEdge(Edge.Top) | ||
| 622 | + } | ||
| 623 | + this.isScrollTop = !this.isScrollTop | ||
| 624 | + } | ||
| 580 | }) | 625 | }) |
| 581 | .height(100) | 626 | .height(100) |
| 627 | + | ||
| 582 | } | 628 | } |
| 583 | .margin({bottom: 65}) | 629 | .margin({bottom: 65}) |
| 584 | } | 630 | } |
| @@ -40,6 +40,7 @@ export struct LiveFollowComponent { | @@ -40,6 +40,7 @@ export struct LiveFollowComponent { | ||
| 40 | bottomLeft: 90 | 40 | bottomLeft: 90 |
| 41 | }) | 41 | }) |
| 42 | Row() { | 42 | Row() { |
| 43 | + Stack({alignContent: Alignment.Bottom}){ | ||
| 43 | //号主头像 | 44 | //号主头像 |
| 44 | Image(this.rmhInfo.rmhHeadUrl) | 45 | Image(this.rmhInfo.rmhHeadUrl) |
| 45 | .alt($r('app.media.icon_default_head_mater')) | 46 | .alt($r('app.media.icon_default_head_mater')) |
| @@ -56,6 +57,17 @@ export struct LiveFollowComponent { | @@ -56,6 +57,17 @@ export struct LiveFollowComponent { | ||
| 56 | WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) | 57 | WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) |
| 57 | } | 58 | } |
| 58 | }) | 59 | }) |
| 60 | + if(this.contentDetailData.rmhInfo?.authIcon){ | ||
| 61 | + Row(){ | ||
| 62 | + Image(this.contentDetailData.rmhInfo?.authIcon) | ||
| 63 | + .width(10) | ||
| 64 | + .height(10) | ||
| 65 | + .objectFit(ImageFit.Cover) | ||
| 66 | + }.width(24) | ||
| 67 | + .justifyContent(FlexAlign.End) | ||
| 68 | + } | ||
| 69 | + }.width(24).height(24) | ||
| 70 | + | ||
| 59 | //号主名称 | 71 | //号主名称 |
| 60 | Text(this.rmhInfo.rmhName) | 72 | Text(this.rmhInfo.rmhName) |
| 61 | .fontColor(Color.White) | 73 | .fontColor(Color.White) |
| @@ -25,6 +25,7 @@ export struct RmhTitle { | @@ -25,6 +25,7 @@ export struct RmhTitle { | ||
| 25 | @Prop rmhInfo: RmhInfoDTO | 25 | @Prop rmhInfo: RmhInfoDTO |
| 26 | @Prop publishTime: string | undefined | 26 | @Prop publishTime: string | undefined |
| 27 | @State loadImg: boolean = false; | 27 | @State loadImg: boolean = false; |
| 28 | + isPeopleShipHome: boolean = false; | ||
| 28 | /** | 29 | /** |
| 29 | * 是否需要隐藏发布时间超过2天的时间展示,默认不隐藏 | 30 | * 是否需要隐藏发布时间超过2天的时间展示,默认不隐藏 |
| 30 | */ | 31 | */ |
| @@ -194,6 +195,8 @@ export struct RmhTitle { | @@ -194,6 +195,8 @@ export struct RmhTitle { | ||
| 194 | .width(CommonConstants.FULL_WIDTH) | 195 | .width(CommonConstants.FULL_WIDTH) |
| 195 | .margin({ bottom: 10 }) | 196 | .margin({ bottom: 10 }) |
| 196 | .onClick(()=>{ | 197 | .onClick(()=>{ |
| 198 | + ///个人主页 动态头像不能跳转 | ||
| 199 | + if (this.isPeopleShipHome) return | ||
| 197 | 200 | ||
| 198 | // 跳转号主 | 201 | // 跳转号主 |
| 199 | ProcessUtils.gotoPeopleShipHomePage( this.rmhInfo?.rmhId,this.rmhInfo?.banControl,this.rmhInfo?.cnMainControl,this.rmhInfo?.userId,this.rmhInfo?.userType) | 202 | ProcessUtils.gotoPeopleShipHomePage( this.rmhInfo?.rmhId,this.rmhInfo?.banControl,this.rmhInfo?.cnMainControl,this.rmhInfo?.userId,this.rmhInfo?.userType) |
| @@ -9,6 +9,7 @@ import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; | @@ -9,6 +9,7 @@ import { persistentStorage, hasClicked } from '../../utils/persistentStorage'; | ||
| 9 | import { InfomationCardClick } from '../../utils/infomationCardClick' | 9 | import { InfomationCardClick } from '../../utils/infomationCardClick' |
| 10 | import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed'; | 10 | import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed'; |
| 11 | import router from '@ohos.router' | 11 | import router from '@ohos.router' |
| 12 | +import { Notes } from './notes'; | ||
| 12 | 13 | ||
| 13 | const TAG = 'Card20Component'; | 14 | const TAG = 'Card20Component'; |
| 14 | 15 | ||
| @@ -24,6 +25,7 @@ export struct Card20Component { | @@ -24,6 +25,7 @@ export struct Card20Component { | ||
| 24 | @State clicked: boolean = false; | 25 | @State clicked: boolean = false; |
| 25 | @State titleMarked: boolean = false; | 26 | @State titleMarked: boolean = false; |
| 26 | @State textArr: textItem[] = [] | 27 | @State textArr: textItem[] = [] |
| 28 | + isPeopleShipHome: boolean = false; | ||
| 27 | 29 | ||
| 28 | aboutToAppear(): void { | 30 | aboutToAppear(): void { |
| 29 | this.titleInit(); | 31 | this.titleInit(); |
| @@ -47,12 +49,27 @@ export struct Card20Component { | @@ -47,12 +49,27 @@ export struct Card20Component { | ||
| 47 | contentDTO: this.contentDTO, | 49 | contentDTO: this.contentDTO, |
| 48 | compDTO: this.compDTO, | 50 | compDTO: this.compDTO, |
| 49 | pageId: this.pageId, | 51 | pageId: this.pageId, |
| 50 | - pageName: this.pageName | 52 | + pageName: this.pageName, |
| 53 | + isPeopleShipHome:this.isPeopleShipHome | ||
| 51 | } | 54 | } |
| 52 | ) // 标题 | 55 | ) // 标题 |
| 53 | if (this.contentDTO.newsTitle) { | 56 | if (this.contentDTO.newsTitle) { |
| 54 | - Text() { | 57 | + Stack() { |
| 58 | + if(this.contentDTO.objectType == '5'){ | ||
| 59 | + Notes({ objectType: this.contentDTO.objectType }).height(29).align(Alignment.Center) | ||
| 60 | + } else { | ||
| 61 | + if (this.contentDTO.seoTags) { | ||
| 62 | + Notes({ newTags: this.contentDTO.seoTags }).height(29).align(Alignment.Center) | ||
| 63 | + } | ||
| 64 | + if (this.contentDTO.newTags) { | ||
| 65 | + Notes({ newTags: this.contentDTO.newTags }).height(29).align(Alignment.Center) | ||
| 66 | + } | ||
| 67 | + if (this.contentDTO.top === 1) { | ||
| 68 | + Notes({ newTags: '置顶' }).height(29).align(Alignment.Center) | ||
| 69 | + } | ||
| 70 | + } | ||
| 55 | 71 | ||
| 72 | + Text() { | ||
| 56 | if (this.titleMarked) { | 73 | if (this.titleMarked) { |
| 57 | ForEach(this.textArr, (textItem: textItem) => { | 74 | ForEach(this.textArr, (textItem: textItem) => { |
| 58 | if (textItem.isRed) { | 75 | if (textItem.isRed) { |
| @@ -68,10 +85,16 @@ export struct Card20Component { | @@ -68,10 +85,16 @@ export struct Card20Component { | ||
| 68 | } | 85 | } |
| 69 | .fontSize($r('app.float.font_size_18')) | 86 | .fontSize($r('app.float.font_size_18')) |
| 70 | .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222')) | 87 | .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222')) |
| 71 | - .width(CommonConstants.FULL_WIDTH) | ||
| 72 | - .textOverflowStyle(3) | ||
| 73 | - .margin({ bottom: 8 }) | ||
| 74 | - .lineHeight(22) | 88 | + .maxLines(3) |
| 89 | + .lineHeight(27) | ||
| 90 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 | ||
| 91 | + .align(Alignment.Start) | ||
| 92 | + .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 && | ||
| 93 | + (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 : | ||
| 94 | + ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5' || this.contentDTO.top === 1) ? 35 : | ||
| 95 | + 0 ) | ||
| 96 | + .width('100%') | ||
| 97 | + }.alignContent(Alignment.TopStart) | ||
| 75 | } | 98 | } |
| 76 | if (this.contentDTO.fullColumnImgUrls[0]) { | 99 | if (this.contentDTO.fullColumnImgUrls[0]) { |
| 77 | createImg({ contentDTO: this.contentDTO }) | 100 | createImg({ contentDTO: this.contentDTO }) |
| @@ -123,7 +123,7 @@ export struct CommentComponent { | @@ -123,7 +123,7 @@ export struct CommentComponent { | ||
| 123 | .height(16) | 123 | .height(16) |
| 124 | .width(3) | 124 | .width(3) |
| 125 | Text('全部评论') | 125 | Text('全部评论') |
| 126 | - .fontSize(18)// .fontColor('#222222') | 126 | + .fontSize(16)// .fontColor('#222222') |
| 127 | .fontColor($r('app.color.color_222222')) | 127 | .fontColor($r('app.color.color_222222')) |
| 128 | .fontWeight(FontWeight.Medium) | 128 | .fontWeight(FontWeight.Medium) |
| 129 | .margin({ left: 5 }) | 129 | .margin({ left: 5 }) |
| @@ -131,7 +131,7 @@ export struct CommentComponent { | @@ -131,7 +131,7 @@ export struct CommentComponent { | ||
| 131 | .margin({ left: 16 }) | 131 | .margin({ left: 16 }) |
| 132 | 132 | ||
| 133 | 133 | ||
| 134 | - Image($r('app.media.close_button')) | 134 | + Image($r('app.media.comment_close')) |
| 135 | .height(16) | 135 | .height(16) |
| 136 | .width(16) | 136 | .width(16) |
| 137 | .margin({ right: 16 }) | 137 | .margin({ right: 16 }) |
| @@ -146,14 +146,14 @@ struct CommentListDialog { | @@ -146,14 +146,14 @@ struct CommentListDialog { | ||
| 146 | .height(16) | 146 | .height(16) |
| 147 | .width(3) | 147 | .width(3) |
| 148 | Text('全部评论') | 148 | Text('全部评论') |
| 149 | - .fontSize(18)// .fontColor('#222222') | 149 | + .fontSize(16)// .fontColor('#222222') |
| 150 | .fontColor($r('app.color.color_222222')) | 150 | .fontColor($r('app.color.color_222222')) |
| 151 | .fontWeight(FontWeight.Medium) | 151 | .fontWeight(FontWeight.Medium) |
| 152 | .margin({ left: 5 }) | 152 | .margin({ left: 5 }) |
| 153 | } | 153 | } |
| 154 | .margin({ left: 16 }) | 154 | .margin({ left: 16 }) |
| 155 | 155 | ||
| 156 | - Image($r('app.media.close_button')) | 156 | + Image($r('app.media.comment_close')) |
| 157 | .height(16) | 157 | .height(16) |
| 158 | .width(16) | 158 | .width(16) |
| 159 | .margin({ right: 16 })// .visibility(this.showCloseIcon ? Visibility.Visible : Visibility.Hidden) | 159 | .margin({ right: 16 })// .visibility(this.showCloseIcon ? Visibility.Visible : Visibility.Hidden) |
| @@ -496,7 +496,7 @@ class CommentViewModel { | @@ -496,7 +496,7 @@ class CommentViewModel { | ||
| 496 | } | 496 | } |
| 497 | HttpBizUtil.post<ResponseDTO<MasterDetailRes>>(url, item).then((result) => { | 497 | HttpBizUtil.post<ResponseDTO<MasterDetailRes>>(url, item).then((result) => { |
| 498 | if (!result.data || result.data.mainControl != 1) { | 498 | if (!result.data || result.data.mainControl != 1) { |
| 499 | - ToastUtils.longToast("暂时无法查看该创作者主页") | 499 | + // ToastUtils.longToast("暂时无法查看该创作者主页") |
| 500 | return | 500 | return |
| 501 | } | 501 | } |
| 502 | 502 |
| @@ -25,7 +25,11 @@ export default struct MinePageUserSimpleInfoUI { | @@ -25,7 +25,11 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 25 | ///已登录状态,先获取本地数据 | 25 | ///已登录状态,先获取本地数据 |
| 26 | this.userName = SPHelper.default.getSync(SpConstants.USER_NAME,"") as string | 26 | this.userName = SPHelper.default.getSync(SpConstants.USER_NAME,"") as string |
| 27 | this.headPhotoUrl = SPHelper.default.getSync(SpConstants.USER_HEAD_PHOTO_URL,"") as string | 27 | this.headPhotoUrl = SPHelper.default.getSync(SpConstants.USER_HEAD_PHOTO_URL,"") as string |
| 28 | - this.userType = SPHelper.default.getSync(SpConstants.USER_Type,"") as string | 28 | + |
| 29 | + let userType = SPHelper.default.getSync(SpConstants.USER_Type,"") as string | ||
| 30 | + if (userType && userType.length > 0) { | ||
| 31 | + this.userType = userType | ||
| 32 | + } | ||
| 29 | this.getUserInfo() | 33 | this.getUserInfo() |
| 30 | }else{ | 34 | }else{ |
| 31 | this.headPhotoUrl = "" | 35 | this.headPhotoUrl = "" |
| @@ -202,6 +206,8 @@ export default struct MinePageUserSimpleInfoUI { | @@ -202,6 +206,8 @@ export default struct MinePageUserSimpleInfoUI { | ||
| 202 | 206 | ||
| 203 | if(StringUtils.isNotEmpty(this.levelHead)){ | 207 | if(StringUtils.isNotEmpty(this.levelHead)){ |
| 204 | UserDataLocal.setUserLevelHeaderUrl(this.levelHead + "") | 208 | UserDataLocal.setUserLevelHeaderUrl(this.levelHead + "") |
| 209 | + }else { | ||
| 210 | + UserDataLocal.setUserLevelHeaderUrl("") | ||
| 205 | } | 211 | } |
| 206 | } | 212 | } |
| 207 | }).catch((err:Error)=>{ | 213 | }).catch((err:Error)=>{ |
| @@ -21,7 +21,7 @@ export struct ChildCommentComponent { | @@ -21,7 +21,7 @@ export struct ChildCommentComponent { | ||
| 21 | Column() { | 21 | Column() { |
| 22 | Row() { | 22 | Row() { |
| 23 | Stack({ alignContent: Alignment.Center }) { | 23 | Stack({ alignContent: Alignment.Center }) { |
| 24 | - Image(this.data.fromUserHeader) | 24 | + Image(this.data.fromUserHeader&&this.data.fromUserHeader.length>0?this.data.fromUserHeader:(this.data.fromUserType === 1?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon'))) |
| 25 | .alt($r('app.media.default_head')) | 25 | .alt($r('app.media.default_head')) |
| 26 | .objectFit(ImageFit.Auto) | 26 | .objectFit(ImageFit.Auto) |
| 27 | .width('69lpx') | 27 | .width('69lpx') |
| @@ -167,7 +167,7 @@ export struct HomePageBottomCommentComponent { | @@ -167,7 +167,7 @@ export struct HomePageBottomCommentComponent { | ||
| 167 | if (item.parentCommentVo != null) { | 167 | if (item.parentCommentVo != null) { |
| 168 | parentCommentUserName = item.parentCommentVo.fromUserName | 168 | parentCommentUserName = item.parentCommentVo.fromUserName |
| 169 | } | 169 | } |
| 170 | - data.push(new CommentListItem(item.fromUserHeader, item.fromUserName, item.targetTitle, item.createTime, | 170 | + data.push(new CommentListItem(item.fromUserHeader, item.fromUserName,item.fromUserType, item.targetTitle, item.createTime, |
| 171 | commentContent, item.likeNum, 0, item.id, item.targetId, item.targetType, item.targetRelId, | 171 | commentContent, item.likeNum, 0, item.id, item.targetId, item.targetType, item.targetRelId, |
| 172 | item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, parentCommentContent, | 172 | item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, parentCommentContent, |
| 173 | parentCommentUserName)) | 173 | parentCommentUserName)) |
| @@ -177,7 +177,7 @@ export struct HomePageBottomCommentComponent { | @@ -177,7 +177,7 @@ export struct HomePageBottomCommentComponent { | ||
| 177 | data.forEach((item) => { | 177 | data.forEach((item) => { |
| 178 | let publishTime = | 178 | let publishTime = |
| 179 | DateTimeUtils.getCommentTime(DateTimeUtils.parseDate(item.createTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)) | 179 | DateTimeUtils.getCommentTime(DateTimeUtils.parseDate(item.createTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)) |
| 180 | - this.data_comment.push(new CommentListItem(item.fromUserHeader, item.fromUserName, item.targetTitle, | 180 | + this.data_comment.push(new CommentListItem(item.fromUserHeader, item.fromUserName,item.fromUserType, item.targetTitle, |
| 181 | publishTime, item.commentContent, item.likeNum, item.like_status, item.id, item.targetId, item.targetType, | 181 | publishTime, item.commentContent, item.likeNum, item.like_status, item.id, item.targetId, item.targetType, |
| 182 | item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, | 182 | item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, |
| 183 | item.parentCommentContent, item.parentCommentUserName)) | 183 | item.parentCommentContent, item.parentCommentUserName)) |
| @@ -210,7 +210,7 @@ export struct HomePageBottomCommentComponent { | @@ -210,7 +210,7 @@ export struct HomePageBottomCommentComponent { | ||
| 210 | data.forEach((item) => { | 210 | data.forEach((item) => { |
| 211 | let publishTime = | 211 | let publishTime = |
| 212 | DateTimeUtils.getCommentTime(DateTimeUtils.parseDate(item.createTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)) | 212 | DateTimeUtils.getCommentTime(DateTimeUtils.parseDate(item.createTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)) |
| 213 | - this.data_comment.push(new CommentListItem(item.fromUserHeader, item.fromUserName, item.targetTitle, | 213 | + this.data_comment.push(new CommentListItem(item.fromUserHeader, item.fromUserName,item.fromUserType, item.targetTitle, |
| 214 | publishTime, item.commentContent, item.likeNum, item.like_status, item.id, item.targetId, item.targetType, | 214 | publishTime, item.commentContent, item.likeNum, item.like_status, item.id, item.targetId, item.targetType, |
| 215 | item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, | 215 | item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, |
| 216 | item.parentCommentContent, item.parentCommentUserName)) | 216 | item.parentCommentContent, item.parentCommentUserName)) |
| @@ -172,12 +172,12 @@ export struct OtherHomePageBottomCommentComponent { | @@ -172,12 +172,12 @@ export struct OtherHomePageBottomCommentComponent { | ||
| 172 | if (item.parentCommentVo != null) { | 172 | if (item.parentCommentVo != null) { |
| 173 | parentCommentUserName = item.parentCommentVo.fromUserName | 173 | parentCommentUserName = item.parentCommentVo.fromUserName |
| 174 | } | 174 | } |
| 175 | - data.push(new CommentListItem(item.fromUserHeader, item.fromUserName, item.targetTitle, item.createTime, commentContent, item.likeNum, 0, item.id, item.targetId, item.targetType, item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, parentCommentContent, parentCommentUserName)) | 175 | + data.push(new CommentListItem(item.fromUserHeader, item.fromUserName,item.fromUserType, item.targetTitle, item.createTime, commentContent, item.likeNum, 0, item.id, item.targetId, item.targetType, item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, parentCommentContent, parentCommentUserName)) |
| 176 | }) | 176 | }) |
| 177 | 177 | ||
| 178 | if(status.commentIdList.length === 0){ | 178 | if(status.commentIdList.length === 0){ |
| 179 | data.forEach((item) => { | 179 | data.forEach((item) => { |
| 180 | - this.data_comment.push(new CommentListItem(item.fromUserHeader, item.fromUserName, item.targetTitle, item.createTime, item.commentContent, item.likeNum, item.like_status, item.id, item.targetId, item.targetType, item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, item.parentCommentContent, item.parentCommentUserName)) | 180 | + this.data_comment.push(new CommentListItem(item.fromUserHeader, item.fromUserName,item.fromUserType, item.targetTitle, item.createTime, item.commentContent, item.likeNum, item.like_status, item.id, item.targetId, item.targetType, item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, item.parentCommentContent, item.parentCommentUserName)) |
| 181 | }) | 181 | }) |
| 182 | 182 | ||
| 183 | this.data_comment.notifyDataReload() | 183 | this.data_comment.notifyDataReload() |
| @@ -206,7 +206,7 @@ export struct OtherHomePageBottomCommentComponent { | @@ -206,7 +206,7 @@ export struct OtherHomePageBottomCommentComponent { | ||
| 206 | }) | 206 | }) |
| 207 | 207 | ||
| 208 | data.forEach((item) => { | 208 | data.forEach((item) => { |
| 209 | - this.data_comment.push(new CommentListItem(item.fromUserHeader, item.fromUserName, item.targetTitle, item.createTime, item.commentContent, item.likeNum, item.like_status, item.id, item.targetId, item.targetType, item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, item.parentCommentContent, item.parentCommentUserName)) | 209 | + this.data_comment.push(new CommentListItem(item.fromUserHeader, item.fromUserName,item.fromUserType, item.targetTitle, item.createTime, item.commentContent, item.likeNum, item.like_status, item.id, item.targetId, item.targetType, item.targetRelId, item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, item.parentCommentContent, item.parentCommentUserName)) |
| 210 | }) | 210 | }) |
| 211 | 211 | ||
| 212 | this.data_comment.notifyDataReload() | 212 | this.data_comment.notifyDataReload() |
| @@ -535,7 +535,7 @@ export struct PaperSingleColumn999CardView { | @@ -535,7 +535,7 @@ export struct PaperSingleColumn999CardView { | ||
| 535 | } | 535 | } |
| 536 | if (this.item?.newsSummary) { | 536 | if (this.item?.newsSummary) { |
| 537 | Text(this.item?.newsSummary) | 537 | Text(this.item?.newsSummary) |
| 538 | - .fontColor(this.isRead ? 0x848484 : '#222222') | 538 | + .fontColor(this.isRead ? '#808080' : '#222222') |
| 539 | .fontSize(14) | 539 | .fontSize(14) |
| 540 | .padding({ top: 10 }) | 540 | .padding({ top: 10 }) |
| 541 | .alignSelf(ItemAlign.Start) | 541 | .alignSelf(ItemAlign.Start) |
| @@ -88,7 +88,7 @@ export struct PeopleShipHomeArticleListComponent { | @@ -88,7 +88,7 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 88 | ForEach(this.arr, (item: ContentDTO, index: number) => { | 88 | ForEach(this.arr, (item: ContentDTO, index: number) => { |
| 89 | ListItem() { | 89 | ListItem() { |
| 90 | Column() { | 90 | Column() { |
| 91 | - CardParser({compDTO:new CompDTO, contentDTO: item }) | 91 | + CardParser({compDTO:new CompDTO, contentDTO: item , isPeopleShipHome:true}) |
| 92 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | 92 | Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 93 | } | 93 | } |
| 94 | }.width("100%") | 94 | }.width("100%") |
| @@ -78,25 +78,28 @@ export struct LiveLikeComponent { | @@ -78,25 +78,28 @@ export struct LiveLikeComponent { | ||
| 78 | transLikeStyle(): ILikeStyleResp { | 78 | transLikeStyle(): ILikeStyleResp { |
| 79 | if (this.likesStyle === 'love' || this.likesStyle === 'thumb') { | 79 | if (this.likesStyle === 'love' || this.likesStyle === 'thumb') { |
| 80 | return { | 80 | return { |
| 81 | - url: this.likeStatus ? $r(`app.media.ic_like_check`) : | ||
| 82 | - this.styleType == 1 ? $r('app.media.icon_like_default') : $r(`app.media.ic_like_uncheck`), | 81 | + url: this.likeStatus ? $r('app.media.ic_like_check') : |
| 82 | + this.styleType == 1 ? $r('app.media.icon_like_default') : $r('app.media.ic_like_uncheck'), | ||
| 83 | name: '赞' | 83 | name: '赞' |
| 84 | } | 84 | } |
| 85 | } else if (this.likesStyle === 'pray') { | 85 | } else if (this.likesStyle === 'pray') { |
| 86 | return { | 86 | return { |
| 87 | - url: this.likeStatus ? $r(`app.media.ic_thub_check`) : $r(`app.media.ic_thub_uncheck`), | 87 | + url: this.likeStatus ? $r('app.media.ic_thub_check') : |
| 88 | + this.styleType == 1 ? $r('app.media.icon_like_unselect_light_pray') : | ||
| 89 | + $r('app.media.icon_like_unselect_night_pray'), | ||
| 88 | name: '祈祷' | 90 | name: '祈祷' |
| 89 | } | 91 | } |
| 90 | } else if (this.likesStyle === 'mourning') { | 92 | } else if (this.likesStyle === 'mourning') { |
| 91 | return { | 93 | return { |
| 92 | - url: this.likeStatus ? $r(`app.media.ic_candle_check`) : | ||
| 93 | - $r(`app.media.ic_candle_uncheck`), | 94 | + url: this.likeStatus ? $r('app.media.ic_candle_check') : |
| 95 | + this.styleType == 1 ? $r('app.media.icon_like_unselect_light_candle') : | ||
| 96 | + $r('app.media.icon_like_unselect_night_candle'), | ||
| 94 | name: '默哀' | 97 | name: '默哀' |
| 95 | } | 98 | } |
| 96 | } | 99 | } |
| 97 | return { | 100 | return { |
| 98 | - url: this.likeStatus ? $r(`app.media.ic_like_check`) : | ||
| 99 | - this.styleType == 1 ? $r('app.media.icon_like_default') : $r(`app.media.ic_like_uncheck`), | 101 | + url: this.likeStatus ? $r('app.media.ic_like_check') : |
| 102 | + this.styleType == 1 ? $r('app.media.icon_like_default') : $r('app.media.ic_like_uncheck'), | ||
| 100 | name: '点赞' | 103 | name: '点赞' |
| 101 | } | 104 | } |
| 102 | } | 105 | } |
| @@ -106,8 +109,8 @@ export struct LiveLikeComponent { | @@ -106,8 +109,8 @@ export struct LiveLikeComponent { | ||
| 106 | Stack({ alignContent: Alignment.TopEnd }) { | 109 | Stack({ alignContent: Alignment.TopEnd }) { |
| 107 | Column() { | 110 | Column() { |
| 108 | Image(this.transLikeStyle().url) | 111 | Image(this.transLikeStyle().url) |
| 109 | - .width(24) | ||
| 110 | - .height(24) | 112 | + .width(((this.likesStyle === 'mourning'||this.likesStyle === 'pray')&& !this.likeStatus) ?36:24) |
| 113 | + .height(((this.likesStyle === 'mourning'||this.likesStyle === 'pray')&& !this.likeStatus)?36:24) | ||
| 111 | } | 114 | } |
| 112 | .justifyContent(FlexAlign.Center) | 115 | .justifyContent(FlexAlign.Center) |
| 113 | .width(36) | 116 | .width(36) |
| @@ -252,7 +252,7 @@ export struct LiveOperRowListView { | @@ -252,7 +252,7 @@ export struct LiveOperRowListView { | ||
| 252 | }) | 252 | }) |
| 253 | } | 253 | } |
| 254 | .width(48) | 254 | .width(48) |
| 255 | - .margin({left:this.isLlive?0:10}) | 255 | + .margin({left:this.isLlive?0:5}) |
| 256 | .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible) | 256 | .visibility(this.likesStyle == 4 || this.likesStyle == 'empty' || !this.openLikes ? Visibility.None : Visibility.Visible) |
| 257 | } | 257 | } |
| 258 | 258 |
| @@ -24,7 +24,7 @@ struct MineHomePage { | @@ -24,7 +24,7 @@ struct MineHomePage { | ||
| 24 | @State userName:string = "" | 24 | @State userName:string = "" |
| 25 | @State headPhotoUrl:string = "" | 25 | @State headPhotoUrl:string = "" |
| 26 | @State levelHead:string = "" | 26 | @State levelHead:string = "" |
| 27 | - userType:string = "1" | 27 | + @State userType:string = "1" |
| 28 | @State levelId:number = 0 | 28 | @State levelId:number = 0 |
| 29 | @State desc:string = "点击添加简介,让大家认识你" //text 搞两个样式,如果三行,就显示 另外一个text 没有显示高度的 | 29 | @State desc:string = "点击添加简介,让大家认识你" //text 搞两个样式,如果三行,就显示 另外一个text 没有显示高度的 |
| 30 | @State isHasIntroduction: boolean = false | 30 | @State isHasIntroduction: boolean = false |
| @@ -101,7 +101,7 @@ struct MineHomePage { | @@ -101,7 +101,7 @@ struct MineHomePage { | ||
| 101 | //用户信息区域 | 101 | //用户信息区域 |
| 102 | Row() { | 102 | Row() { |
| 103 | Stack(){ | 103 | Stack(){ |
| 104 | - Image(this.headPhotoUrl) | 104 | + Image(this.headPhotoUrl&&this.headPhotoUrl.length>0?this.headPhotoUrl:(this.userType === "1"?$r('app.media.default_head_userPage'):$r('app.media.AccountOwner_DefaultIcon'))) |
| 105 | .alt($r('app.media.default_head')) | 105 | .alt($r('app.media.default_head')) |
| 106 | .width('115lpx') | 106 | .width('115lpx') |
| 107 | .height('115lpx') | 107 | .height('115lpx') |
| @@ -159,7 +159,7 @@ struct VisitorCommentPage { | @@ -159,7 +159,7 @@ struct VisitorCommentPage { | ||
| 159 | let publishTime = | 159 | let publishTime = |
| 160 | DateTimeUtils.getCommentTime(DateTimeUtils.parseDate(item.createTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)) | 160 | DateTimeUtils.getCommentTime(DateTimeUtils.parseDate(item.createTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)) |
| 161 | 161 | ||
| 162 | - this.data.push(new CommentListItem(item.fromUserHeader, item.fromUserName, item.targetTitle, publishTime, | 162 | + this.data.push(new CommentListItem(item.fromUserHeader, item.fromUserName,item.fromUserType, item.targetTitle, publishTime, |
| 163 | commentContent, item.likeNum, 0, item.id, item.targetId, item.targetType, item.targetRelId, | 163 | commentContent, item.likeNum, 0, item.id, item.targetId, item.targetType, item.targetRelId, |
| 164 | item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, parentCommentContent, | 164 | item.targetRelObjectId, item.targetRelType, item.targetStatus, item.checkStatus, parentCommentContent, |
| 165 | parentCommentUserName)) | 165 | parentCommentUserName)) |
| @@ -44,9 +44,10 @@ export class CommentListItem{ | @@ -44,9 +44,10 @@ export class CommentListItem{ | ||
| 44 | isShowAll:boolean = false | 44 | isShowAll:boolean = false |
| 45 | 45 | ||
| 46 | 46 | ||
| 47 | - constructor(fromUserHeader:string,fromUserName:string,targetTitle:string,createTime:string,commentContent:string,likeNum:number,like_status:number,id:number,targetId:string,targetType:number,targetRelId: string,targetRelObjectId: string,targetRelType: number,targetStatus: number,checkStatus:number,parentCommentContent:string,parentCommentUserName:string) { | 47 | + constructor(fromUserHeader:string,fromUserName:string,fromUserType: number,targetTitle:string,createTime:string,commentContent:string,likeNum:number,like_status:number,id:number,targetId:string,targetType:number,targetRelId: string,targetRelObjectId: string,targetRelType: number,targetStatus: number,checkStatus:number,parentCommentContent:string,parentCommentUserName:string) { |
| 48 | this.fromUserHeader = fromUserHeader | 48 | this.fromUserHeader = fromUserHeader |
| 49 | this.fromUserName = fromUserName | 49 | this.fromUserName = fromUserName |
| 50 | + this.fromUserType = fromUserType | ||
| 50 | this.commentContent = commentContent | 51 | this.commentContent = commentContent |
| 51 | this.targetTitle = targetTitle | 52 | this.targetTitle = targetTitle |
| 52 | this.createTime = createTime | 53 | this.createTime = createTime |
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_like_unselect_light_candle.png
0 → 100644
1.14 KB
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_like_unselect_light_pray.png
0 → 100644
1.41 KB
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_like_unselect_night_candle.png
0 → 100644
1.25 KB
sight_harmony/features/wdComponent/src/main/resources/base/media/icon_like_unselect_night_pray.png
0 → 100644
1.53 KB
| @@ -148,7 +148,7 @@ export class LoginModel { | @@ -148,7 +148,7 @@ export class LoginModel { | ||
| 148 | HttpRequest.post<ResponseDTO<CheckVerifyBean>>(HttpUrlUtils.getCheckVerifyCodeUrl(), bean).then((data: ResponseDTO<CheckVerifyBean>) => { | 148 | HttpRequest.post<ResponseDTO<CheckVerifyBean>>(HttpUrlUtils.getCheckVerifyCodeUrl(), bean).then((data: ResponseDTO<CheckVerifyBean>) => { |
| 149 | Logger.debug("LoginViewModel:success2 ", data.message) | 149 | Logger.debug("LoginViewModel:success2 ", data.message) |
| 150 | if (!data || !data.data) { | 150 | if (!data || !data.data) { |
| 151 | - fail("数据为空") | 151 | + fail(data.message?data.message:"数据为空") |
| 152 | return | 152 | return |
| 153 | } | 153 | } |
| 154 | if (data.code != 0) { | 154 | if (data.code != 0) { |
-
Please register or login to post a comment