陈剑华

Merge remote-tracking branch 'origin/main'

@@ -124,4 +124,6 @@ export class WDRouterPage { @@ -124,4 +124,6 @@ export class WDRouterPage {
124 static themeListPage = new WDRouterPage("wdComponent", "ets/components/page/ThemeListPage"); 124 static themeListPage = new WDRouterPage("wdComponent", "ets/components/page/ThemeListPage");
125 // 栏目页面、频道详情 125 // 栏目页面、频道详情
126 static columnPage = new WDRouterPage("phone", "ets/pages/column/ColumnPage"); 126 static columnPage = new WDRouterPage("phone", "ets/pages/column/ColumnPage");
  127 + //展示头像
  128 + static showUserHeaderPage = new WDRouterPage("wdComponent", "ets/pages/ShowUserHeaderPage");
127 } 129 }
@@ -44,9 +44,9 @@ export struct DynamicDetailComponent { @@ -44,9 +44,9 @@ export struct DynamicDetailComponent {
44 /** 44 /**
45 * 关注状态:默认未关注 点击去关注 45 * 关注状态:默认未关注 点击去关注
46 */ 46 */
47 - @State followStatus: String = '0'; 47 + @State followStatus: String = '';
48 48
49 - @State newsStatusOfUser: batchLikeAndCollectResult | undefined = undefined// 点赞、收藏状态 49 + @State newsStatusOfUser: batchLikeAndCollectResult = {} as batchLikeAndCollectResult// 点赞、收藏状态
50 //跳转 50 //跳转
51 private mJumpInfo: ContentDTO = {} as ContentDTO; 51 private mJumpInfo: ContentDTO = {} as ContentDTO;
52 52
@@ -121,31 +121,33 @@ export struct DynamicDetailComponent { @@ -121,31 +121,33 @@ export struct DynamicDetailComponent {
121 } 121 }
122 .width('63%') 122 .width('63%')
123 .margin({right: $r('app.float.margin_6')}) 123 .margin({right: $r('app.float.margin_6')})
124 - if (this.followStatus == '0') {  
125 - Text('关注')  
126 - .width($r('app.float.margin_54'))  
127 - .height($r('app.float.margin_24'))  
128 - .textAlign(TextAlign.Center)  
129 - .fontSize($r('app.float.font_size_12'))  
130 - .borderRadius($r('app.float.vp_3'))  
131 - .backgroundColor($r('app.color.color_ED2800'))  
132 - .fontColor($r('app.color.color_fff'))  
133 - .onClick(() => {  
134 - this.handleAccention()  
135 - })  
136 - } else {  
137 - Text('已关注')  
138 - .width($r('app.float.margin_54'))  
139 - .height($r('app.float.margin_24'))  
140 - .borderWidth(1)  
141 - .textAlign(TextAlign.Center)  
142 - .fontSize($r('app.float.font_size_12'))  
143 - .borderRadius($r('app.float.vp_3'))  
144 - .borderColor($r('app.color.color_CCCCCC'))  
145 - .fontColor($r('app.color.color_CCCCCC'))  
146 - .onClick(() => {  
147 - this.handleAccention()  
148 - }) 124 + if(!StringUtils.isEmpty(this.followStatus)){
  125 + if (this.followStatus == '0') {
  126 + Text('关注')
  127 + .width($r('app.float.margin_54'))
  128 + .height($r('app.float.margin_24'))
  129 + .textAlign(TextAlign.Center)
  130 + .fontSize($r('app.float.font_size_12'))
  131 + .borderRadius($r('app.float.vp_3'))
  132 + .backgroundColor($r('app.color.color_ED2800'))
  133 + .fontColor($r('app.color.color_fff'))
  134 + .onClick(() => {
  135 + this.handleAccention()
  136 + })
  137 + } else {
  138 + Text('已关注')
  139 + .width($r('app.float.margin_54'))
  140 + .height($r('app.float.margin_24'))
  141 + .borderWidth(1)
  142 + .textAlign(TextAlign.Center)
  143 + .fontSize($r('app.float.font_size_12'))
  144 + .borderRadius($r('app.float.vp_3'))
  145 + .borderColor($r('app.color.color_CCCCCC'))
  146 + .fontColor($r('app.color.color_CCCCCC'))
  147 + .onClick(() => {
  148 + this.handleAccention()
  149 + })
  150 + }
149 } 151 }
150 } 152 }
151 .width('100%') 153 .width('100%')
@@ -330,8 +332,8 @@ export struct DynamicDetailComponent { @@ -330,8 +332,8 @@ export struct DynamicDetailComponent {
330 Image(this.newsStatusOfUser?.likeStatus == '1'? 332 Image(this.newsStatusOfUser?.likeStatus == '1'?
331 $r('app.media.icon_like_selected_redheart') 333 $r('app.media.icon_like_selected_redheart')
332 :$r('app.media.icon_like_unselect_grey_redheart')) 334 :$r('app.media.icon_like_unselect_grey_redheart'))
333 - .width($r('app.float.margin_24'))  
334 - .height($r('app.float.margin_24')) 335 + .width($r('app.float.margin_36'))
  336 + .height($r('app.float.margin_36'))
335 .objectFit(ImageFit.Cover) 337 .objectFit(ImageFit.Cover)
336 if(this.interactDataDTO?.likeNum != 0){ 338 if(this.interactDataDTO?.likeNum != 0){
337 Text(NumberFormatterUtils.formatNumberWithWan(this.interactDataDTO?.likeNum)) 339 Text(NumberFormatterUtils.formatNumberWithWan(this.interactDataDTO?.likeNum))
@@ -430,12 +432,18 @@ export struct DynamicDetailComponent { @@ -430,12 +432,18 @@ export struct DynamicDetailComponent {
430 432
431 // 已登录->查询用户对作品点赞、收藏状态 433 // 已登录->查询用户对作品点赞、收藏状态
432 private async getInteractDataStatus() { 434 private async getInteractDataStatus() {
  435 + // 未登录,跳转登录
  436 + const user_id = await SPHelper.default.get(SpConstants.USER_ID, '')
  437 + if (!user_id) {
  438 + WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
  439 + return
  440 + }
433 try { 441 try {
434 const params: batchLikeAndCollectParams = { 442 const params: batchLikeAndCollectParams = {
435 contentList: [ 443 contentList: [
436 { 444 {
437 - contentId: this.contentDetailData[0]?.newsId + '',  
438 - contentType: this.contentDetailData[0]?.newsType + '', 445 + contentId: this.contentDetailData?.newsId + '',
  446 + contentType: this.contentDetailData?.newsType + '',
439 } 447 }
440 ] 448 ]
441 } 449 }
@@ -453,16 +461,23 @@ export struct DynamicDetailComponent { @@ -453,16 +461,23 @@ export struct DynamicDetailComponent {
453 * 查询当前登录用户是否关注作品号主 461 * 查询当前登录用户是否关注作品号主
454 * */ 462 * */
455 private async getBatchAttentionStatus() { 463 private async getBatchAttentionStatus() {
  464 + // 未登录,跳转登录
  465 + const user_id = await SPHelper.default.get(SpConstants.USER_ID, '')
  466 + if (!user_id) {
  467 + WDRouterRule.jumpWithPage(WDRouterPage.loginPage)
  468 + this.followStatus = '0';
  469 + return
  470 + }
456 try { 471 try {
457 - const params: postBatchAttentionStatusParams = {  
458 - creatorIds: [{ creatorId: this.contentDetailData?.rmhInfo?.rmhId ?? '' }] 472 + const params: postBatchAttentionStatusParams = {
  473 + creatorIds: [{ creatorId: this.contentDetailData?.rmhInfo?.rmhId ?? '' }]
  474 + }
  475 + let data = await MultiPictureDetailViewModel.getBatchAttentionStatus(params)
  476 + this.followStatus = data[0]?.status;
  477 + Logger.info(TAG, `followStatus:${JSON.stringify(this.followStatus)}`)
  478 + } catch (exception) {
  479 + this.followStatus = '0';
459 } 480 }
460 - let data = await MultiPictureDetailViewModel.getBatchAttentionStatus(params)  
461 - this.followStatus = data[0]?.status;  
462 - Logger.info(TAG, `followStatus:${JSON.stringify(this.followStatus)}`)  
463 - } catch (exception) {  
464 -  
465 - }  
466 } 481 }
467 482
468 //创建跳转信息 483 //创建跳转信息
@@ -558,18 +573,13 @@ export struct DynamicDetailComponent { @@ -558,18 +573,13 @@ export struct DynamicDetailComponent {
558 contentType: this.contentDetailData?.newsType + '', 573 contentType: this.contentDetailData?.newsType + '',
559 } 574 }
560 ContentDetailRequest.postExecuteLike(params).then(res => { 575 ContentDetailRequest.postExecuteLike(params).then(res => {
561 -  
562 - if (this.newsStatusOfUser) {  
563 - this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1'  
564 - if (this.newsStatusOfUser.likeStatus === '1') {  
565 - this.interactDataDTO.likeNum = Number(this.interactDataDTO.likeNum) + 1  
566 - } else {  
567 - this.interactDataDTO.likeNum = Number(this.interactDataDTO.likeNum) - 1  
568 - }  
569 - console.log('点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactDataDTO?.likeNum)  
570 - // this.queryContentInteractCount() 576 + this.newsStatusOfUser.likeStatus = this.newsStatusOfUser?.likeStatus === '1' ? '0' : '1'
  577 + if (this.newsStatusOfUser.likeStatus === '1') {
  578 + this.interactDataDTO.likeNum = Number(this.interactDataDTO.likeNum) + 1
  579 + } else {
  580 + this.interactDataDTO.likeNum = Number(this.interactDataDTO.likeNum) - 1
571 } 581 }
572 - 582 + console.log('点赞、取消点赞==', this.newsStatusOfUser?.likeStatus, this.interactDataDTO?.likeNum)
573 }) 583 })
574 } 584 }
575 } 585 }
1 -import { NetworkUtil, Logger, NetworkType, SPHelper, } from 'wdKit'; 1 +import { NetworkUtil, Logger, NetworkType, SPHelper, WindowModel} from 'wdKit';
2 import { ResponseDTO } from 'wdNetwork'; 2 import { ResponseDTO } from 'wdNetwork';
3 import { 3 import {
4 ContentDetailDTO, 4 ContentDetailDTO,
@@ -78,230 +78,236 @@ export struct MultiPictureDetailPageComponent { @@ -78,230 +78,236 @@ export struct MultiPictureDetailPageComponent {
78 78
79 build() { 79 build() {
80 RelativeContainer() { 80 RelativeContainer() {
81 - if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length > 0) {  
82 - Swiper(this.swiperController) {  
83 - ForEach(this.contentDetailData.photoList, (item: PhotoListBean) => {  
84 - Swiper(this.swiperControllerItem) {  
85 - MultiPictureDetailItemComponent({ MultiPictureDetailItem: item }) 81 + this.init()
  82 + }
  83 + .width('100%')
  84 + .height('100%')
  85 + .backgroundColor(Color.Black)
  86 + .id('e_picture_container')
  87 + // 设置顶部绘制延伸到状态栏
  88 + // 设置底部绘制延伸到导航条
  89 + .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
  90 + }
  91 +
  92 + @Builder
  93 + init() {
  94 + if (this.contentDetailData.rmhPlatform == 1) {
  95 + Row() {
  96 + Row({ space: 8 }) {
  97 + Row() {
  98 + Image(this.contentDetailData?.rmhInfo?.rmhHeadUrl)
  99 + .borderRadius(24)
  100 + .aspectRatio(1)
  101 + .border({ width: 1, color: Color.White, style: BorderStyle.Solid })
  102 + .alt($r('app.media.picture_loading'))
  103 + .width(36)
  104 + .height(36)
  105 + .objectFit(ImageFit.Fill)
  106 + .interpolation(ImageInterpolation.High)
  107 + }
  108 + .width('13%')
  109 + .height('100%')
  110 +
  111 + Row() {
  112 + Flex({
  113 + direction: FlexDirection.Column,
  114 + justifyContent: FlexAlign.SpaceAround,
  115 + alignItems: ItemAlign.Start
  116 + }) {
  117 + Text(`${this.contentDetailData?.rmhInfo?.rmhName}`)
  118 + .fontColor(Color.White)
  119 + .fontSize(14)
  120 + .fontFamily('PingFang PingFang SC-Medium')
  121 + .fontWeight(500)
  122 + .lineHeight(17)
  123 + .margin(0)
  124 + .height(17)
  125 + Text(`${this.contentDetailData?.rmhInfo?.rmhDesc}`)
  126 + .fontColor('#676767')
  127 + .fontSize(12)
  128 + .fontFamily('PingFang SC-Regular')
  129 + .fontWeight(400)
  130 + .lineHeight(14)
  131 + .height(14)
  132 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  133 + .margin(0)
  134 + .maxLines(1)
86 } 135 }
87 - .width('100%')  
88 - .height('100%')  
89 - .vertical(true)  
90 - .autoPlay(false)  
91 - .cachedCount(1)  
92 - .indicator(false)  
93 - .displayCount(1)  
94 - .onAnimationEnd(event => {  
95 - router.back()  
96 - })  
97 - }) 136 + }
  137 + .width('81%')
  138 + .height('100%')
98 } 139 }
99 - .index(this.swiperIndex)  
100 - .width('100%')  
101 - .height(px2vp(this.picHeight) + 32)  
102 - .vertical(false)  
103 - .autoPlay(false)  
104 - .cachedCount(3)  
105 - .indicator(false)  
106 - .displayCount(1)  
107 - .loop(false)  
108 - .id('e_swiper_content')  
109 - .alignRules({  
110 - center: { anchor: "__container__", align: VerticalAlign.Center },  
111 - middle: { anchor: "__container__", align: HorizontalAlign.Center }  
112 - })  
113 - .onChange((index: number) => {  
114 - this.swiperIndex = index 140 + .width('74.4%')
  141 + .height('100%')
  142 + .margin({
  143 + top: 0,
  144 + bottom: 0,
  145 + left: 16,
  146 + right: 0
115 }) 147 })
116 148
117 - if (this.contentDetailData.rmhPlatform == 1) { 149 + if (this.followStatus == '0') {
118 Row() { 150 Row() {
119 - Row({ space: 8 }) { 151 + Button({ type: ButtonType.Normal, stateEffect: true }) {
120 Row() { 152 Row() {
121 - Image(this.contentDetailData?.rmhInfo?.rmhHeadUrl)  
122 - .borderRadius(24)  
123 - .aspectRatio(1)  
124 - .border({ width: 1, color: Color.White, style: BorderStyle.Solid })  
125 - .alt($r('app.media.picture_loading'))  
126 - .width(36)  
127 - .height(36)  
128 - .objectFit(ImageFit.Fill)  
129 - .interpolation(ImageInterpolation.High)  
130 - }  
131 - .width('13%')  
132 - .height('100%')  
133 -  
134 - Row() {  
135 - Flex({  
136 - direction: FlexDirection.Column,  
137 - justifyContent: FlexAlign.SpaceAround,  
138 - alignItems: ItemAlign.Start  
139 - }) {  
140 - Text(`${this.contentDetailData?.rmhInfo?.rmhName}`)  
141 - .fontColor(Color.White)  
142 - .fontSize(14)  
143 - .fontFamily('PingFang PingFang SC-Medium')  
144 - .fontWeight(500)  
145 - .lineHeight(17)  
146 - .margin(0)  
147 - .height(17)  
148 - Text(`${this.contentDetailData?.rmhInfo?.rmhDesc}`)  
149 - .fontColor('#676767')  
150 - .fontSize(12)  
151 - .fontFamily('PingFang SC-Regular')  
152 - .fontWeight(400)  
153 - .lineHeight(14)  
154 - .height(14)  
155 - .textOverflow({ overflow: TextOverflow.Ellipsis })  
156 - .margin(0)  
157 - }  
158 - }  
159 - .width('81%')  
160 - .height('100%') 153 + Text('+关注').fontSize(12).fontColor(0xffffff)
  154 + }.alignItems(VerticalAlign.Center)
161 } 155 }
162 - .width('74.4%')  
163 - .height('100%')  
164 - .margin({  
165 - top: 0,  
166 - bottom: 0,  
167 - left: 16,  
168 - right: 0 156 + .borderRadius(4)
  157 + .backgroundColor('#ED2800')
  158 + .width(48)
  159 + .height(24)
  160 + .onClick(() => {
  161 + this.handleAccention()
169 }) 162 })
170 -  
171 - if (this.followStatus == '0') {  
172 - Row() {  
173 - Button({ type: ButtonType.Normal, stateEffect: true }) {  
174 - Row() {  
175 - Text('+关注').fontSize(12).fontColor(0xffffff)  
176 - }.alignItems(VerticalAlign.Center)  
177 - }  
178 - .borderRadius(4)  
179 - .backgroundColor('#ED2800')  
180 - .width(48)  
181 - .height(24)  
182 - .onClick(() => {  
183 - this.handleAccention()  
184 - })  
185 - }  
186 - .justifyContent(FlexAlign.Center)  
187 - .alignItems(VerticalAlign.Center)  
188 - .width('21.6%')  
189 - .height('100%')  
190 - } 163 + }
  164 + .justifyContent(FlexAlign.Center)
  165 + .alignItems(VerticalAlign.Center)
  166 + .width('21.6%')
  167 + .height('100%')
  168 + }
  169 + }
  170 + .width('100%')
  171 + .height(44)
  172 + .alignRules({
  173 + top: { anchor: "__container__", align: VerticalAlign.Top },
  174 + middle: { anchor: "__container__", align: HorizontalAlign.Center }
  175 + })
  176 + .id('e_attention')
  177 + }
  178 + if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length > 0) {
  179 + Swiper(this.swiperController) {
  180 + ForEach(this.contentDetailData.photoList, (item: PhotoListBean) => {
  181 + Swiper(this.swiperControllerItem) {
  182 + MultiPictureDetailItemComponent({ MultiPictureDetailItem: item })
191 } 183 }
192 .width('100%') 184 .width('100%')
193 - .height(44)  
194 - .alignRules({  
195 - top: { anchor: "e_swiper_content", align: VerticalAlign.Top },  
196 - middle: { anchor: "e_swiper_content", align: HorizontalAlign.Center } 185 + .height('100%')
  186 + .vertical(true)
  187 + .autoPlay(false)
  188 + .cachedCount(1)
  189 + .indicator(false)
  190 + .displayCount(1)
  191 + .onAnimationEnd(event => {
  192 + router.back()
197 }) 193 })
198 - .id('e_attention')  
199 - }  
200 - Row() {  
201 - Scroll(this.scroller) {  
202 - Row() {  
203 - Flex({  
204 - direction: FlexDirection.Column,  
205 - justifyContent: FlexAlign.Start  
206 - }) {  
207 - Text() {  
208 - Span(`${this.swiperIndex + 1}`)  
209 - .fontSize(24)  
210 - .fontFamily('PingFang SC-Medium')  
211 - .fontWeight(500)  
212 - .lineHeight(28)  
213 - Span(`/${this.contentDetailData.photoList.length}`)  
214 - .fontSize(14)  
215 - .fontFamily('PingFang SC-Medium')  
216 - .fontWeight(500)  
217 - .lineHeight(19)  
218 - }.fontColor(Color.White).margin(4) 194 + })
  195 + }
  196 + .index(this.swiperIndex)
  197 + .width('100%')
  198 + .height(px2vp(this.picHeight) + 32)
  199 + .vertical(false)
  200 + .autoPlay(false)
  201 + .cachedCount(3)
  202 + .indicator(false)
  203 + .displayCount(1)
  204 + .loop(false)
  205 + .id('e_swiper_content')
  206 + .alignRules({
  207 + center: { anchor: "__container__", align: VerticalAlign.Center },
  208 + middle: { anchor: "__container__", align: HorizontalAlign.Center }
  209 + })
  210 + .onChange((index: number) => {
  211 + this.swiperIndex = index
  212 + })
219 213
220 - Text(`${this.contentDetailData.newsTitle}`)  
221 - .fontColor(Color.White)  
222 - .fontSize(16)  
223 - .fontFamily('PingFang SC-Semibold')  
224 - .fontWeight(600)  
225 - .lineHeight(24)  
226 - .margin({  
227 - top: 4,  
228 - left: 0,  
229 - bottom: 4,  
230 - right: 0  
231 - })  
232 - Text(`${this.contentDetailData.photoList?.[this.swiperIndex].picDesc}`)  
233 - .fontColor(Color.White) 214 + Row() {
  215 + Scroll(this.scroller) {
  216 + Row() {
  217 + Flex({
  218 + direction: FlexDirection.Column,
  219 + justifyContent: FlexAlign.Start
  220 + }) {
  221 + Text() {
  222 + Span(`${this.swiperIndex + 1}`)
  223 + .fontSize(24)
  224 + .fontFamily('PingFang SC-Medium')
  225 + .fontWeight(500)
  226 + .lineHeight(28)
  227 + Span(`/${this.contentDetailData.photoList.length}`)
234 .fontSize(14) 228 .fontSize(14)
235 - .fontFamily('PingFang SC-Regular')  
236 - .fontWeight(400)  
237 - .lineHeight(22)  
238 - .textOverflow({ overflow: TextOverflow.Ellipsis })  
239 - .margin({  
240 - top: 4,  
241 - left: 0,  
242 - bottom: 4,  
243 - right: 18  
244 - })  
245 - .maxLines(16)  
246 - }  
247 - }  
248 - .width('100%')  
249 - .margin({  
250 - top: 8,  
251 - left: 18,  
252 - bottom: 24,  
253 - right: 18  
254 - })  
255 - }  
256 - .scrollable(ScrollDirection.Vertical)  
257 - .scrollBarWidth(0)  
258 - .height(px2vp(this.titleHeight))  
259 - }  
260 - .id('e_swiper_titles')  
261 - .alignRules({  
262 - bottom: { anchor: "__container__", align: VerticalAlign.Bottom },  
263 - middle: { anchor: "__container__", align: HorizontalAlign.Center }  
264 - })  
265 - .height(px2vp(this.titleHeight) + 64) 229 + .fontFamily('PingFang SC-Medium')
  230 + .fontWeight(500)
  231 + .lineHeight(19)
  232 + }.fontColor(Color.White).margin(4)
266 233
267 - }  
268 - if (this.netStatus !== undefined) {  
269 - EmptyComponent({  
270 - emptyType: this.netStatus, emptyButton: true, retry: () => {  
271 - this.getContentDetailData() 234 + Text(`${this.contentDetailData.newsTitle}`)
  235 + .fontColor(Color.White)
  236 + .fontSize(16)
  237 + .fontFamily('PingFang SC-Semibold')
  238 + .fontWeight(600)
  239 + .lineHeight(24)
  240 + .margin({
  241 + top: 4,
  242 + left: 0,
  243 + bottom: 4,
  244 + right: 0
  245 + })
  246 + Text(`${this.contentDetailData.photoList?.[this.swiperIndex].picDesc}`)
  247 + .fontColor(Color.White)
  248 + .fontSize(14)
  249 + .fontFamily('PingFang SC-Regular')
  250 + .fontWeight(400)
  251 + .lineHeight(22)
  252 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  253 + .margin({
  254 + top: 4,
  255 + left: 0,
  256 + bottom: 4,
  257 + right: 18
  258 + })
  259 + .maxLines(16)
  260 + }
272 } 261 }
273 - })  
274 - .id('e_empty_content')  
275 - .alignRules({  
276 - center: { anchor: "__container__", align: VerticalAlign.Center },  
277 - middle: { anchor: "__container__", align: HorizontalAlign.Center } 262 + .width('100%')
  263 + .margin({
  264 + top: 8,
  265 + left: 18,
  266 + bottom: 24,
  267 + right: 18
278 }) 268 })
  269 + }
  270 + .scrollable(ScrollDirection.Vertical)
  271 + .scrollBarWidth(0)
  272 + .height(px2vp(this.titleHeight))
279 } 273 }
280 - OperRowListView({  
281 - contentDetailData: this.contentDetailData, 274 + .id('e_swiper_titles')
  275 + .alignRules({
  276 + bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
  277 + middle: { anchor: "__container__", align: HorizontalAlign.Center }
282 }) 278 })
  279 + .height(px2vp(this.titleHeight) + 64)
  280 +
  281 + }
  282 + if (this.netStatus !== undefined) {
  283 + EmptyComponent({
  284 + emptyType: this.netStatus, emptyButton: true, retry: () => {
  285 + this.getContentDetailData()
  286 + }
  287 + })
  288 + .id('e_empty_content')
283 .alignRules({ 289 .alignRules({
284 - bottom: { anchor: "__container__", align: VerticalAlign.Bottom }, 290 + center: { anchor: "__container__", align: VerticalAlign.Center },
285 middle: { anchor: "__container__", align: HorizontalAlign.Center } 291 middle: { anchor: "__container__", align: HorizontalAlign.Center }
286 }) 292 })
287 - .width('100%')  
288 - .height(56)  
289 - .margin({  
290 - top: 16,  
291 - left: 16,  
292 - right: 16,  
293 - bottom: 0  
294 - })  
295 - .border({ width: { top: 0.5 }, color: '#FFFFFF' })  
296 - .id('e_oper_row')  
297 } 293 }
298 - .width('100%')  
299 - .height('100%')  
300 - .backgroundColor(Color.Black)  
301 - .id('e_picture_container')  
302 - // 设置顶部绘制延伸到状态栏  
303 - // 设置底部绘制延伸到导航条  
304 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) 294 + OperRowListView({
  295 + contentDetailData: this.contentDetailData,
  296 + })
  297 + .alignRules({
  298 + bottom: { anchor: "__container__", align: VerticalAlign.Bottom },
  299 + middle: { anchor: "__container__", align: HorizontalAlign.Center }
  300 + })
  301 + .width('100%')
  302 + .height(56)
  303 + .margin({
  304 + top: 16,
  305 + left: 16,
  306 + right: 16,
  307 + bottom: 0
  308 + })
  309 + .border({ width: { top: 0.5 }, color: '#FFFFFF' })
  310 + .id('e_oper_row')
305 } 311 }
306 312
307 getContentDetailData() { 313 getContentDetailData() {
@@ -318,6 +324,11 @@ export struct MultiPictureDetailPageComponent { @@ -318,6 +324,11 @@ export struct MultiPictureDetailPageComponent {
318 } 324 }
319 this.netStatus = undefined 325 this.netStatus = undefined
320 this.contentDetailData = resDTO.data?.[0]; 326 this.contentDetailData = resDTO.data?.[0];
  327 + if (this.contentDetailData.rmhPlatform == 1) {
  328 + WindowModel.shared.setWindowSystemBarProperties({
  329 + statusBarContentColor: '#ffffff',
  330 + })
  331 + }
321 // this.contentDetailData.photoList = [] 332 // this.contentDetailData.photoList = []
322 if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length === 0) { 333 if (this.contentDetailData?.photoList && this.contentDetailData?.photoList?.length === 0) {
323 // 暂无内容 334 // 暂无内容
@@ -29,13 +29,11 @@ struct MineHomePage { @@ -29,13 +29,11 @@ struct MineHomePage {
29 registTime:number = 0//账号注册时间 29 registTime:number = 0//账号注册时间
30 @State registerTimeForDay:number = 0 30 @State registerTimeForDay:number = 0
31 31
32 - aboutToAppear(){ 32 + onPageShow(): void {
33 this.getUserInfo() 33 this.getUserInfo()
34 this.getUserLevel() 34 this.getUserLevel()
35 } 35 }
36 36
37 -  
38 -  
39 build() { 37 build() {
40 Stack({ alignContent: Alignment.Top }){ 38 Stack({ alignContent: Alignment.Top }){
41 Image($r('app.media.title_bg')) 39 Image($r('app.media.title_bg'))
@@ -65,9 +63,8 @@ struct MineHomePage { @@ -65,9 +63,8 @@ struct MineHomePage {
65 .height('130lpx') 63 .height('130lpx')
66 .objectFit(ImageFit.Cover) 64 .objectFit(ImageFit.Cover)
67 }.onClick(()=>{ 65 }.onClick(()=>{
68 - //TODO 显示头像  
69 - let params = {'userId': "531267787833221"} as Record<string, string>;  
70 - WDRouterRule.jumpWithPage(WDRouterPage.otherNormalUserHomePagePage,params) 66 + let params = {'headPhotoUrl': this.headPhotoUrl} as Record<string, string>;
  67 + WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
71 }).width('135lpx') 68 }).width('135lpx')
72 .height('135lpx') 69 .height('135lpx')
73 70
@@ -370,6 +367,9 @@ struct MineHomePage { @@ -370,6 +367,9 @@ struct MineHomePage {
370 if(StringUtils.isNotEmpty(value.introduction)){ 367 if(StringUtils.isNotEmpty(value.introduction)){
371 this.desc = value.introduction 368 this.desc = value.introduction
372 this.isHasIntroduction = true 369 this.isHasIntroduction = true
  370 + }else{
  371 + this.desc = "点击添加简介,让大家认识你"
  372 + this.isHasIntroduction = false
373 } 373 }
374 this.browseNum = value.browseNum 374 this.browseNum = value.browseNum
375 this.commentNum = value.commentNum 375 this.commentNum = value.commentNum
  1 +import { router } from '@kit.ArkUI';
  2 +
  3 +@Entry
  4 +@Component
  5 +struct ShowUserHeaderPage {
  6 + @State headPhotoUrl: string = '';
  7 + @State params:Record<string, string> = router.getParams() as Record<string, string>;
  8 +
  9 + onPageShow() {
  10 + this.headPhotoUrl = this.params?.['headPhotoUrl'];
  11 + }
  12 +
  13 + build() {
  14 + Row() {
  15 + Image(this.headPhotoUrl)
  16 + .alt($r('app.media.default_head'))
  17 + .width('720lpx')
  18 + .height('720lpx')
  19 + .objectFit(ImageFit.Auto)
  20 + .clip(new Circle({ width: '720lpx', height: '720lpx' }))
  21 + }
  22 + .width('100%')
  23 + .height('100%')
  24 + .alignItems(VerticalAlign.Center)
  25 + .backgroundColor($r('app.color.color_000000'))
  26 + .onClick(()=>{
  27 + router.back()
  28 + })
  29 + }
  30 +}
@@ -21,6 +21,7 @@ @@ -21,6 +21,7 @@
21 "components/page/LiveMorePage", 21 "components/page/LiveMorePage",
22 "components/page/ReserveMorePage", 22 "components/page/ReserveMorePage",
23 "pages/VideoPlayPage", 23 "pages/VideoPlayPage",
24 - "components/page/ThemeListPage" 24 + "components/page/ThemeListPage",
  25 + "pages/ShowUserHeaderPage"
25 ] 26 ]
26 } 27 }
@@ -11,7 +11,7 @@ export struct ChartItemCompereComponent { @@ -11,7 +11,7 @@ export struct ChartItemCompereComponent {
11 ListItem() { 11 ListItem() {
12 Column() { 12 Column() {
13 Row() { 13 Row() {
14 - Image($r('app.media.icon_live_status_running')) 14 + Image($r('app.media.default_head'))
15 .borderRadius(10) 15 .borderRadius(10)
16 .width(20) 16 .width(20)
17 .height(20) 17 .height(20)
@@ -24,13 +24,15 @@ export struct ChartItemCompereComponent { @@ -24,13 +24,15 @@ export struct ChartItemCompereComponent {
24 24
25 Text(' 主持人 ') 25 Text(' 主持人 ')
26 .fontSize(11) 26 .fontSize(11)
27 - .backgroundColor('808562') 27 + .backgroundColor('#FFFFC63F')
28 .fontColor('#FFFFFFFF') 28 .fontColor('#FFFFFFFF')
29 .padding({ top: 2, bottom: 2, left: 4, right: 4 }) 29 .padding({ top: 2, bottom: 2, left: 4, right: 4 })
30 .borderRadius(4) 30 .borderRadius(4)
31 - }.margin({ bottom: 8 }) 31 + }
  32 + .margin({ bottom: 8 })
  33 + .justifyContent(FlexAlign.Start)
32 34
33 - Text(this.liveDetailsBean.newIntroduction).lineHeight(22) 35 + Text(this.liveDetailsBean.newIntroduction).lineHeight(22).fontColor('#FFFFFFFF').fontSize(14)
34 } 36 }
35 .backgroundColor('#4D000000') 37 .backgroundColor('#4D000000')
36 .borderRadius(3) 38 .borderRadius(3)
@@ -41,6 +43,7 @@ export struct ChartItemCompereComponent { @@ -41,6 +43,7 @@ export struct ChartItemCompereComponent {
41 right: 8 43 right: 8
42 }) 44 })
43 .margin({ left: 16, bottom: 4 }) 45 .margin({ left: 16, bottom: 4 })
  46 + .alignItems(HorizontalAlign.Start)
44 } 47 }
45 48
46 } 49 }