王士厅
@@ -257,9 +257,9 @@ export struct WdWebLocalComponent { @@ -257,9 +257,9 @@ export struct WdWebLocalComponent {
257 257
258 startProgressTimer() { 258 startProgressTimer() {
259 this.progressTimerNumber = setTimeout(() => { 259 this.progressTimerNumber = setTimeout(() => {
260 - animateTo({duration: 1000}, () => { 260 + // animateTo({duration: 1000}, () => {
261 this.progressOpacity = 0 261 this.progressOpacity = 0
262 - }) 262 + // })
263 }, 3000) 263 }, 3000)
264 } 264 }
265 cancelProgressTimer() { 265 cancelProgressTimer() {
@@ -313,13 +313,13 @@ export struct WdWebLocalComponent { @@ -313,13 +313,13 @@ export struct WdWebLocalComponent {
313 } 313 }
314 }) 314 })
315 .onClick(() => { 315 .onClick(() => {
316 - animateTo({duration: 1000}, () => { 316 + // animateTo({duration: 1000}, () => {
317 if (this.progressOpacity <= 0) { 317 if (this.progressOpacity <= 0) {
318 this.progressOpacity = 1 318 this.progressOpacity = 1
319 } else { 319 } else {
320 this.progressOpacity = 0 320 this.progressOpacity = 0
321 } 321 }
322 - }) 322 + // })
323 }) 323 })
324 324
325 if (this.isEndPlay){ 325 if (this.isEndPlay){
@@ -84,6 +84,8 @@ export struct InteractMComponent { @@ -84,6 +84,8 @@ export struct InteractMComponent {
84 contentDTO.objectId = this.messageModel.InteractMsubM.contentId 84 contentDTO.objectId = this.messageModel.InteractMsubM.contentId
85 contentDTO.relId = this.messageModel.InteractMsubM.contentRelId 85 contentDTO.relId = this.messageModel.InteractMsubM.contentRelId
86 contentDTO.relType = this.messageModel.InteractMsubM.contentRelType 86 contentDTO.relType = this.messageModel.InteractMsubM.contentRelType
  87 + contentDTO.customParamTargetLayout = "comment"
  88 +
87 ProcessUtils.processPage(contentDTO) 89 ProcessUtils.processPage(contentDTO)
88 }) 90 })
89 } 91 }
@@ -56,7 +56,7 @@ export struct PaperTitleComponent { @@ -56,7 +56,7 @@ export struct PaperTitleComponent {
56 }) 56 })
57 57
58 Text(this.title ?? "") 58 Text(this.title ?? "")
59 - .margin({ left: 10 }) 59 + .margin({ left: 10,top:-3 })
60 .fontSize(22) 60 .fontSize(22)
61 .fontColor($r('app.color.white')) 61 .fontColor($r('app.color.white'))
62 .fontFamily('SourceHanSerifSC-Heavy') 62 .fontFamily('SourceHanSerifSC-Heavy')
@@ -132,9 +132,9 @@ export struct PaperTitleComponent { @@ -132,9 +132,9 @@ export struct PaperTitleComponent {
132 Row() 132 Row()
133 .width(DisplayUtils.getDeviceWidth() - 265) 133 .width(DisplayUtils.getDeviceWidth() - 265)
134 .height('18vp') 134 .height('18vp')
135 - // .clip(new Path({  
136 - // commands: `M${vp2px(9)} 0 H${vp2px(91)} V${vp2px(18)} L0 ${vp2px(18)} Z`  
137 - // })) 135 + .clip(new Path({
  136 + commands: `M${vp2px(9)} 0 H${vp2px(300)} V${vp2px(18)} L0 ${vp2px(18)} Z`
  137 + }))
138 .linearGradient({ 138 .linearGradient({
139 direction: GradientDirection.Right, // 渐变方向 139 direction: GradientDirection.Right, // 渐变方向
140 repeating: false, // 渐变颜色是否重复 140 repeating: false, // 渐变颜色是否重复
@@ -100,12 +100,6 @@ export struct CardSourceInfo { @@ -100,12 +100,6 @@ export struct CardSourceInfo {
100 return flag; 100 return flag;
101 } 101 }
102 102
103 - showCommentNum() {  
104 - const curRouter = router.getState().name;  
105 - // return curRouter !== 'PeopleShipHomePage'  
106 - return true  
107 - }  
108 -  
109 /** 103 /**
110 * 全域数字显示规则 104 * 全域数字显示规则
111 * 1、当数量为千位以內时,显示数字,不保留小数点,比如 4585 105 * 1、当数量为千位以內时,显示数字,不保留小数点,比如 4585
@@ -150,25 +144,12 @@ export struct CardSourceInfo { @@ -150,25 +144,12 @@ export struct CardSourceInfo {
150 } 144 }
151 145
152 showDot() { 146 showDot() {
153 - // return (this.showTime() && (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source)) || ((this.contentDTO.rmhPlatform === 1 && this.contentDTO.rmhInfo?.rmhName &&  
154 - // this.contentDTO.rmhInfo?.rmhName != '') || (this.contentDTO.source && this.contentDTO.source != '')) &&  
155 - // (this.getContentDtoBean()?.interactData?.commentNum  
156 - // // || DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)) != ''  
157 - // || (this.contentDTO.isSearch || this.contentDTO.isCollection ||  
158 - // !this.contentDTO.isSearch && DateTimeUtils.getCommentTime  
159 - // (Number  
160 - // .parseFloat(this  
161 - // .contentDTO.publishTime))  
162 - // .indexOf  
163 - // ('-') === -1)  
164 - // )  
165 let flag = false; 147 let flag = false;
166 if (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source) { 148 if (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source) {
167 if (this.showTime() && !this.isEllipsisActive) { 149 if (this.showTime() && !this.isEllipsisActive) {
168 flag = true 150 flag = true
169 } else if (!this.isEllipsisActive) { 151 } else if (!this.isEllipsisActive) {
170 - if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 &&  
171 - this.showCommentNum()) { 152 + if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0) {
172 flag = true; 153 flag = true;
173 } else if (this.contentDTO.objectType !=='2' && this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) { 154 } else if (this.contentDTO.objectType !=='2' && this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) {
174 flag = true; 155 flag = true;
@@ -271,10 +252,8 @@ export struct CardSourceInfo { @@ -271,10 +252,8 @@ export struct CardSourceInfo {
271 } 252 }
272 253
273 // 评论数 254 // 评论数
274 - // if (!this.contentDTO.cornerMark && !this.contentDTO.corner && !this.isEllipsisActive) {  
275 if (!this.isEllipsisActive) { 255 if (!this.isEllipsisActive) {
276 - if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 &&  
277 - this.showCommentNum()) { 256 + if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0) {
278 Text(`${this.handlerNum(this.getContentDtoBean()?.interactData?.commentNum.toString())}评`) 257 Text(`${this.handlerNum(this.getContentDtoBean()?.interactData?.commentNum.toString())}评`)
279 .fontSize(12) 258 .fontSize(12)
280 .fontColor($r("app.color.color_B0B0B0")) 259 .fontColor($r("app.color.color_B0B0B0"))
@@ -328,17 +307,11 @@ export struct CardSourceInfo { @@ -328,17 +307,11 @@ export struct CardSourceInfo {
328 * @returns 307 * @returns
329 */ 308 */
330 private getContentDtoBean(): ContentDTO { 309 private getContentDtoBean(): ContentDTO {
331 - let content = new ContentDTO  
332 - if (this.compDTO == undefined) {  
333 - content = this.contentDTO  
334 - }  
335 - if (this.compDTO.operDataList.length == 0) {  
336 - content = this.contentDTO  
337 - }  
338 - if (!content) {  
339 - content = this.compDTO.operDataList[0] 310 + if (this.compDTO.operDataList.length > 0) {
  311 + return this.compDTO.operDataList[0]
  312 + } else {
  313 + return this.contentDTO
340 } 314 }
341 - return content;  
342 } 315 }
343 316
344 /** 317 /**
@@ -366,8 +339,7 @@ export struct CardSourceInfo { @@ -366,8 +339,7 @@ export struct CardSourceInfo {
366 } 339 }
367 340
368 // 评论数 341 // 评论数
369 - if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0 &&  
370 - this.showCommentNum()) { 342 + if (this.contentDTO.objectType !=='2' && !this.isCompInnerSource && Number(this.getContentDtoBean()?.interactData?.commentNum) > 0) {
371 have = true 343 have = true
372 } else { 344 } else {
373 if (this.contentDTO.objectType !=='2' && this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) { 345 if (this.contentDTO.objectType !=='2' && this.isCompInnerSource && this.contentDTO.interactData && this.contentDTO.interactData?.commentNum > 0) {
@@ -196,7 +196,7 @@ export struct RmhTitle { @@ -196,7 +196,7 @@ export struct RmhTitle {
196 .textAlign(TextAlign.Start) 196 .textAlign(TextAlign.Start)
197 .height(14) 197 .height(14)
198 .lineHeight(14) 198 .lineHeight(14)
199 - .width('calc(100% - 54vp)') 199 + .width('calc(100% - 65vp)')
200 // .constraintSize({maxWidth:(DisplayUtils.getDeviceWidth() - 32 - 36 - 18 - this.getTextWidth(DateTimeUtils.getCommentTime(Number.parseFloat(this.publishTime))))}) 200 // .constraintSize({maxWidth:(DisplayUtils.getDeviceWidth() - 32 - 36 - 18 - this.getTextWidth(DateTimeUtils.getCommentTime(Number.parseFloat(this.publishTime))))})
201 } 201 }
202 202
@@ -300,6 +300,7 @@ function getParams(item: CommentListItem) : ContentDTO{ @@ -300,6 +300,7 @@ function getParams(item: CommentListItem) : ContentDTO{
300 contentDTO.objectType = item.targetType + ""; 300 contentDTO.objectType = item.targetType + "";
301 contentDTO.newsTitle = item.targetTitle 301 contentDTO.newsTitle = item.targetTitle
302 contentDTO.showComment = true 302 contentDTO.showComment = true
  303 + contentDTO.customParamTargetLayout = "comment"
303 304
304 return contentDTO 305 return contentDTO
305 } 306 }
@@ -2,7 +2,8 @@ import router from '@ohos.router' @@ -2,7 +2,8 @@ import router from '@ohos.router'
2 import { PeopleShipUserDetailData } from 'wdBean' 2 import { PeopleShipUserDetailData } from 'wdBean'
3 import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent' 3 import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent'
4 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' 4 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
5 -import { ToastUtils } from 'wdKit'; 5 +import { SPHelper, ToastUtils } from 'wdKit';
  6 +import { SpConstants } from 'wdConstant'
6 7
7 @Component 8 @Component
8 export struct PeopleShipHomePageNavComponent { 9 export struct PeopleShipHomePageNavComponent {
@@ -10,10 +11,16 @@ export struct PeopleShipHomePageNavComponent { @@ -10,10 +11,16 @@ export struct PeopleShipHomePageNavComponent {
10 @Consume isAttention: string 11 @Consume isAttention: string
11 @Consume isLoadingAttention: boolean 12 @Consume isLoadingAttention: boolean
12 @Prop attentionOpacity: boolean 13 @Prop attentionOpacity: boolean
  14 + @State userId:string = ''
13 15
14 // 页面详情数据 16 // 页面详情数据
15 @Prop detailModel: PeopleShipUserDetailData = {} as PeopleShipUserDetailData 17 @Prop detailModel: PeopleShipUserDetailData = {} as PeopleShipUserDetailData
16 18
  19 + aboutToAppear(): void {
  20 + this.userId = SPHelper.default.getSync(SpConstants.USER_ID, "") as string
  21 + }
  22 +
  23 +
17 build() { 24 build() {
18 RelativeContainer() { 25 RelativeContainer() {
19 Row() { 26 Row() {
@@ -67,6 +74,7 @@ export struct PeopleShipHomePageNavComponent { @@ -67,6 +74,7 @@ export struct PeopleShipHomePageNavComponent {
67 }) 74 })
68 .visibility((this.topOpacity > 0.5 ? Visibility.Visible : Visibility.Hidden)) 75 .visibility((this.topOpacity > 0.5 ? Visibility.Visible : Visibility.Hidden))
69 76
  77 + if (this.userId != this.detailModel.userId){
70 if (this.isAttention == '0') { 78 if (this.isAttention == '0') {
71 // 关注 79 // 关注
72 Button({ type: ButtonType.Normal, stateEffect: true }) { 80 Button({ type: ButtonType.Normal, stateEffect: true }) {
@@ -135,6 +143,7 @@ export struct PeopleShipHomePageNavComponent { @@ -135,6 +143,7 @@ export struct PeopleShipHomePageNavComponent {
135 .visibility((this.attentionOpacity ? Visibility.Visible : Visibility.Hidden)) 143 .visibility((this.attentionOpacity ? Visibility.Visible : Visibility.Hidden))
136 } 144 }
137 } 145 }
  146 + }
138 .height('100%') 147 .height('100%')
139 } 148 }
140 .height(44) 149 .height(44)
1 import measure from '@ohos.measure' 1 import measure from '@ohos.measure'
2 -import { DisplayUtils, NumberFormatterUtils } from 'wdKit' 2 +import { DisplayUtils, NumberFormatterUtils, SPHelper } from 'wdKit'
3 import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent' 3 import { PeopleShipHomePageHeadComponent } from './PeopleShipHomePageHeadComponent'
4 import { PeopleShipHomePageAttestationComponent } from './PeopleShipHomePageAttestationComponent' 4 import { PeopleShipHomePageAttestationComponent } from './PeopleShipHomePageAttestationComponent'
5 import { Logger } from 'wdKit' 5 import { Logger } from 'wdKit'
@@ -8,6 +8,7 @@ import { InfluenceData, PeopleShipUserDetailData } from 'wdBean' @@ -8,6 +8,7 @@ import { InfluenceData, PeopleShipUserDetailData } from 'wdBean'
8 import { PeopleShipHomeAttentionComponent } from './PeopleShipHomeAttentionComponent' 8 import { PeopleShipHomeAttentionComponent } from './PeopleShipHomeAttentionComponent'
9 import { HWLocationUtils } from 'wdHwAbility' 9 import { HWLocationUtils } from 'wdHwAbility'
10 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' 10 import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'
  11 +import { SpConstants } from 'wdConstant'
11 12
12 13
13 @Component 14 @Component
@@ -32,6 +33,7 @@ export struct PeopleShipHomePageTopComponent { @@ -32,6 +33,7 @@ export struct PeopleShipHomePageTopComponent {
32 @State lineInNum: number = 1 33 @State lineInNum: number = 1
33 @Link topHeight: number 34 @Link topHeight: number
34 @State provinceName: string = '' 35 @State provinceName: string = ''
  36 + @State userId:string = ''
35 37
36 build() { 38 build() {
37 Column() { 39 Column() {
@@ -242,6 +244,7 @@ export struct PeopleShipHomePageTopComponent { @@ -242,6 +244,7 @@ export struct PeopleShipHomePageTopComponent {
242 top: '16vp' 244 top: '16vp'
243 }) 245 })
244 246
  247 + if (this.userId != this.detailModel.userId) {
245 // 分享-关注 248 // 分享-关注
246 PeopleShipHomeAttentionComponent() 249 PeopleShipHomeAttentionComponent()
247 .width(`calc(100% - ${32 + 'vp'})`) 250 .width(`calc(100% - ${32 + 'vp'})`)
@@ -249,6 +252,7 @@ export struct PeopleShipHomePageTopComponent { @@ -249,6 +252,7 @@ export struct PeopleShipHomePageTopComponent {
249 top: '10vp', 252 top: '10vp',
250 bottom: '16vp' 253 bottom: '16vp'
251 }) 254 })
  255 + }
252 Row() 256 Row()
253 .backgroundColor($r('app.color.color_F5F5F5')) 257 .backgroundColor($r('app.color.color_F5F5F5'))
254 .width('100%') 258 .width('100%')
@@ -277,6 +281,7 @@ export struct PeopleShipHomePageTopComponent { @@ -277,6 +281,7 @@ export struct PeopleShipHomePageTopComponent {
277 this.onIntroductionUpdated() 281 this.onIntroductionUpdated()
278 } 282 }
279 283
  284 + this.userId = SPHelper.default.getSync(SpConstants.USER_ID, "") as string
280 } 285 }
281 286
282 // 不听减去2个字-一直到时3行 287 // 不听减去2个字-一直到时3行
@@ -361,7 +361,7 @@ export struct LikeComponent { @@ -361,7 +361,7 @@ export struct LikeComponent {
361 .height(24) 361 .height(24)
362 if (this.likeCount > 0){ 362 if (this.likeCount > 0){
363 RelativeContainer() { 363 RelativeContainer() {
364 - Image($r('app.media.ic_like_white_Select')) 364 + Image(this.styleType == 1 ? $r('app.media.ic_like_white_Select') : $r('app.media.ic_like_back_Select'))
365 .objectFit(ImageFit.Fill) 365 .objectFit(ImageFit.Fill)
366 .resizable({ 366 .resizable({
367 slice: { 367 slice: {
1 import router from '@ohos.router' 1 import router from '@ohos.router'
2 import { Params } from 'wdBean'; 2 import { Params } from 'wdBean';
3 import { DateTimeUtils, NetworkUtil, NumberFormatterUtils, StringUtils } from 'wdKit'; 3 import { DateTimeUtils, NetworkUtil, NumberFormatterUtils, StringUtils } from 'wdKit';
  4 +import { WDRouterPage, WDRouterRule } from 'wdRouter';
4 import { TrackingPageBrowse, TrackConstants, ParamType, Tracking } from 'wdTracking/Index'; 5 import { TrackingPageBrowse, TrackConstants, ParamType, Tracking } from 'wdTracking/Index';
5 import { OtherHomePageBottomCommentComponent } from '../components/mine/home/OtherHomePageBottomCommentComponent'; 6 import { OtherHomePageBottomCommentComponent } from '../components/mine/home/OtherHomePageBottomCommentComponent';
6 import { OtherHomePageBottomFollowComponent } from '../components/mine/home/OtherHomePageBottomFollowComponent'; 7 import { OtherHomePageBottomFollowComponent } from '../components/mine/home/OtherHomePageBottomFollowComponent';
@@ -102,7 +103,10 @@ struct OtherNormalUserHomePage { @@ -102,7 +103,10 @@ struct OtherNormalUserHomePage {
102 .width('165lpx') 103 .width('165lpx')
103 .height('165lpx') 104 .height('165lpx')
104 .objectFit(ImageFit.Cover) 105 .objectFit(ImageFit.Cover)
105 - } 106 + }.onClick(()=>{
  107 + let params = {'headPhotoUrl': this.headPhotoUrl} as Record<string, string>;
  108 + WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
  109 + })
106 110
107 Column() { 111 Column() {
108 Row() { 112 Row() {
@@ -325,7 +329,8 @@ struct OtherNormalUserHomePage { @@ -325,7 +329,8 @@ struct OtherNormalUserHomePage {
325 }) 329 })
326 .margin({ left: '31lpx' }) 330 .margin({ left: '31lpx' })
327 .onClick(() => { 331 .onClick(() => {
328 - router.back() 332 + let params = {'headPhotoUrl': this.headPhotoUrl} as Record<string, string>;
  333 + WDRouterRule.jumpWithPage(WDRouterPage.showUserHeaderPage,params)
329 }) 334 })
330 335
331 Text(`${this.userName}`) 336 Text(`${this.userName}`)
@@ -126,6 +126,7 @@ export struct DetailPlayVLivePage { @@ -126,6 +126,7 @@ export struct DetailPlayVLivePage {
126 } break 126 } break
127 case LiveMessageOptType.ZH_STOP_LIVE: { 127 case LiveMessageOptType.ZH_STOP_LIVE: {
128 this.liveState = "end" 128 this.liveState = "end"
  129 + this.playUrl = ""
129 this.contentDetailData.liveInfo.liveState = "end" 130 this.contentDetailData.liveInfo.liveState = "end"
130 } break 131 } break
131 case LiveMessageOptType.ZH_CHANGE_PAD: { 132 case LiveMessageOptType.ZH_CHANGE_PAD: {
@@ -28,7 +28,7 @@ export struct PlayerEndView { @@ -28,7 +28,7 @@ export struct PlayerEndView {
28 DateTimeUtils.parseDate(this.contentDetailData.liveInfo.startTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) 28 DateTimeUtils.parseDate(this.contentDetailData.liveInfo.startTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)
29 let en = DateTimeUtils.parseDate(this.contentDetailData.liveInfo.endTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN) 29 let en = DateTimeUtils.parseDate(this.contentDetailData.liveInfo.endTime, DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)
30 if (this.contentDetailData.liveInfo?.endTime == null) { 30 if (this.contentDetailData.liveInfo?.endTime == null) {
31 - en = DateTimeUtils.getTimeStamp() 31 + en = DateTimeUtils.parseDate(DateTimeUtils.getCurTime(DateTimeUtils.PATTERN_DATE_TIME_HYPHEN),DateTimeUtils.PATTERN_DATE_TIME_HYPHEN)
32 } 32 }
33 const sd = DateTimeUtils.getDuration(sn, en) 33 const sd = DateTimeUtils.getDuration(sn, en)
34 this.duration = DateTimeUtils.liveDurationSecondToTime(sd / 1000) 34 this.duration = DateTimeUtils.liveDurationSecondToTime(sd / 1000)