Showing
1 changed file
with
18 additions
and
12 deletions
| @@ -39,7 +39,7 @@ export struct ImageAndTextPageComponent { | @@ -39,7 +39,7 @@ export struct ImageAndTextPageComponent { | ||
| 39 | @State isPageEnd: boolean = false | 39 | @State isPageEnd: boolean = false |
| 40 | @State publishTime: string = '' | 40 | @State publishTime: string = '' |
| 41 | @State publishCommentModel: publishCommentModel = new publishCommentModel() | 41 | @State publishCommentModel: publishCommentModel = new publishCommentModel() |
| 42 | - @State operationButtonList: string[] = ['comment', 'collect', 'share'] | 42 | + @State operationButtonList: string[] = ['comment', 'collect', 'share'] |
| 43 | 43 | ||
| 44 | build() { | 44 | build() { |
| 45 | Column() { | 45 | Column() { |
| @@ -84,12 +84,16 @@ export struct ImageAndTextPageComponent { | @@ -84,12 +84,16 @@ export struct ImageAndTextPageComponent { | ||
| 84 | Row() { | 84 | Row() { |
| 85 | Row() { | 85 | Row() { |
| 86 | if (this.newsStatusOfUser?.likeStatus === '1') { | 86 | if (this.newsStatusOfUser?.likeStatus === '1') { |
| 87 | - Image(this.contentDetailData[0]?.likesStyle === 1 ? $r('app.media.ic_like_check') : (this.contentDetailData[0]?.likesStyle === 2 ? $r('app.media.icon_prayer_active') : $r('app.media.icon_candle_active'))) | 87 | + Image(this.contentDetailData[0]?.likesStyle === 1 ? $r('app.media.ic_like_check') : |
| 88 | + (this.contentDetailData[0]?.likesStyle === 2 ? $r('app.media.icon_prayer_active') : | ||
| 89 | + $r('app.media.icon_candle_active'))) | ||
| 88 | .width(24) | 90 | .width(24) |
| 89 | .height(24) | 91 | .height(24) |
| 90 | .margin({ right: 5 }) | 92 | .margin({ right: 5 }) |
| 91 | } else { | 93 | } else { |
| 92 | - Image(this.contentDetailData[0]?.likesStyle === 1 ? $r('app.media.icon_like') : (this.contentDetailData[0]?.likesStyle === 2 ? $r('app.media.icon_prayer') : $r('app.media.icon_candle'))) | 94 | + Image(this.contentDetailData[0]?.likesStyle === 1 ? $r('app.media.icon_like') : |
| 95 | + (this.contentDetailData[0]?.likesStyle === 2 ? $r('app.media.icon_prayer') : | ||
| 96 | + $r('app.media.icon_candle'))) | ||
| 93 | .width(24) | 97 | .width(24) |
| 94 | .height(24) | 98 | .height(24) |
| 95 | .margin({ right: 5 }) | 99 | .margin({ right: 5 }) |
| @@ -137,6 +141,7 @@ export struct ImageAndTextPageComponent { | @@ -137,6 +141,7 @@ export struct ImageAndTextPageComponent { | ||
| 137 | .height(CommonConstants.FULL_HEIGHT) | 141 | .height(CommonConstants.FULL_HEIGHT) |
| 138 | .padding({ bottom: 76 }) | 142 | .padding({ bottom: 76 }) |
| 139 | .scrollBar(BarState.Off) | 143 | .scrollBar(BarState.Off) |
| 144 | + .align(Alignment.Top) | ||
| 140 | 145 | ||
| 141 | if (!this.isPageEnd) { | 146 | if (!this.isPageEnd) { |
| 142 | detailedSkeleton() | 147 | detailedSkeleton() |
| @@ -177,7 +182,8 @@ export struct ImageAndTextPageComponent { | @@ -177,7 +182,8 @@ export struct ImageAndTextPageComponent { | ||
| 177 | let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType) | 182 | let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType) |
| 178 | if (detailBeans && detailBeans.length > 0) { | 183 | if (detailBeans && detailBeans.length > 0) { |
| 179 | this.contentDetailData = detailBeans; | 184 | this.contentDetailData = detailBeans; |
| 180 | - let dateTime = DateTimeUtils.parseDate(this.contentDetailData[0]?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN); | 185 | + let dateTime = |
| 186 | + DateTimeUtils.parseDate(this.contentDetailData[0]?.publishTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN); | ||
| 181 | this.publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN) | 187 | this.publishTime = DateTimeUtils.formatDate(dateTime, PATTERN_DATE_CN_RN) |
| 182 | if (this.contentDetailData[0]?.recommendShow === 1) { | 188 | if (this.contentDetailData[0]?.recommendShow === 1) { |
| 183 | this.getRecommend() | 189 | this.getRecommend() |
| @@ -187,16 +193,16 @@ export struct ImageAndTextPageComponent { | @@ -187,16 +193,16 @@ export struct ImageAndTextPageComponent { | ||
| 187 | this.queryContentInteractCount() | 193 | this.queryContentInteractCount() |
| 188 | } | 194 | } |
| 189 | if (this.contentDetailData[0]?.openComment) { | 195 | if (this.contentDetailData[0]?.openComment) { |
| 190 | - this.publishCommentModel.targetId = String(this.contentDetailData[0]?.newsId || '') | ||
| 191 | - this.publishCommentModel.targetRelId = String(this.contentDetailData[0]?.reLInfo?.relId) | ||
| 192 | - this.publishCommentModel.targetTitle = this.contentDetailData[0]?.newsTitle | ||
| 193 | - this.publishCommentModel.targetRelType = String(this.contentDetailData[0]?.reLInfo?.relType) | ||
| 194 | - this.publishCommentModel.targetRelObjectId = String(this.contentDetailData[0]?.reLInfo?.relObjectId) | ||
| 195 | - this.publishCommentModel.keyArticle = String(this.contentDetailData[0]?.keyArticle) | ||
| 196 | - this.publishCommentModel.targetType = String(this.contentDetailData[0]?.newsType) | 196 | + this.publishCommentModel.targetId = String(this.contentDetailData[0]?.newsId || '') |
| 197 | + this.publishCommentModel.targetRelId = String(this.contentDetailData[0]?.reLInfo?.relId) | ||
| 198 | + this.publishCommentModel.targetTitle = this.contentDetailData[0]?.newsTitle | ||
| 199 | + this.publishCommentModel.targetRelType = String(this.contentDetailData[0]?.reLInfo?.relType) | ||
| 200 | + this.publishCommentModel.targetRelObjectId = String(this.contentDetailData[0]?.reLInfo?.relObjectId) | ||
| 201 | + this.publishCommentModel.keyArticle = String(this.contentDetailData[0]?.keyArticle) | ||
| 202 | + this.publishCommentModel.targetType = String(this.contentDetailData[0]?.newsType) | ||
| 197 | } | 203 | } |
| 198 | if (this.contentDetailData[0]?.audioList?.length && this.contentDetailData[0]?.audioList[0].audioUrl) { | 204 | if (this.contentDetailData[0]?.audioList?.length && this.contentDetailData[0]?.audioList[0].audioUrl) { |
| 199 | - this.operationButtonList = ['comment', 'collect', 'listen', 'share'] | 205 | + this.operationButtonList = ['comment', 'collect', 'listen', 'share'] |
| 200 | } | 206 | } |
| 201 | } | 207 | } |
| 202 | } | 208 | } |
-
Please register or login to post a comment