Showing
13 changed files
with
73 additions
and
16 deletions
| @@ -93,10 +93,8 @@ export class HttpBizUtil { | @@ -93,10 +93,8 @@ export class HttpBizUtil { | ||
| 93 | */ | 93 | */ |
| 94 | static refreshToken(): Promise<string> { | 94 | static refreshToken(): Promise<string> { |
| 95 | let url = HttpUrlUtils.getRefreshTokenUrl(); | 95 | let url = HttpUrlUtils.getRefreshTokenUrl(); |
| 96 | - let params: HashMap<string, string> = new HashMap<string, string>() | ||
| 97 | - params.set('refreshToken', HttpUtils.getRefreshToken()) | ||
| 98 | - params.set('deviceId', HttpUtils.getDeviceId()) | ||
| 99 | - // Logger.debug(TAG, 'refreshToken getRefreshToken: ' + HttpUrlUtils.getRefreshToken()) | 96 | + let params: RefreshTokenParam = |
| 97 | + new RefreshTokenParam(HttpUtils.getRefreshToken(), HttpUtils.getDeviceId()) | ||
| 100 | // 请求刷新token接口 | 98 | // 请求刷新token接口 |
| 101 | return new Promise<string>((success, error) => { | 99 | return new Promise<string>((success, error) => { |
| 102 | WDHttp.post<ResponseDTO<RefreshTokenRes>>(url, params).then((resDTO: ResponseDTO<RefreshTokenRes>) => { | 100 | WDHttp.post<ResponseDTO<RefreshTokenRes>>(url, params).then((resDTO: ResponseDTO<RefreshTokenRes>) => { |
| @@ -124,3 +122,13 @@ export class HttpBizUtil { | @@ -124,3 +122,13 @@ export class HttpBizUtil { | ||
| 124 | }) | 122 | }) |
| 125 | } | 123 | } |
| 126 | } | 124 | } |
| 125 | + | ||
| 126 | +export class RefreshTokenParam { | ||
| 127 | + refreshToken: string = '' | ||
| 128 | + deviceId: string = '' | ||
| 129 | + | ||
| 130 | + constructor(refreshToken: string, deviceId: string) { | ||
| 131 | + this.refreshToken = refreshToken | ||
| 132 | + this.deviceId = deviceId | ||
| 133 | + } | ||
| 134 | +} |
| @@ -5,6 +5,7 @@ import { BaseDTO } from './BaseDTO'; | @@ -5,6 +5,7 @@ import { BaseDTO } from './BaseDTO'; | ||
| 5 | 5 | ||
| 6 | @Observed | 6 | @Observed |
| 7 | export class CompDTO implements BaseDTO { | 7 | export class CompDTO implements BaseDTO { |
| 8 | + contentText?: string = ''; | ||
| 8 | backgroundColor: string = ''; | 9 | backgroundColor: string = ''; |
| 9 | backgroundImgUrl: string = ''; | 10 | backgroundImgUrl: string = ''; |
| 10 | cityCode: string = ''; | 11 | cityCode: string = ''; |
| @@ -90,6 +90,9 @@ export struct SpacialTopicPageComponent { | @@ -90,6 +90,9 @@ export struct SpacialTopicPageComponent { | ||
| 90 | this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '') | 90 | this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '') |
| 91 | this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '') | 91 | this.publishCommentModel.visitorComment = String(this.contentDetailData?.visitorComment || '') |
| 92 | // } | 92 | // } |
| 93 | + if (this.contentDetailData[0]?.openComment) { | ||
| 94 | + this.operationButtonList = ['collect', 'share'] | ||
| 95 | + } | ||
| 93 | this.trySendData2H5() | 96 | this.trySendData2H5() |
| 94 | } | 97 | } |
| 95 | } | 98 | } |
| @@ -9,6 +9,8 @@ import { ContentDetailDTO } from 'wdBean/Index' | @@ -9,6 +9,8 @@ import { ContentDetailDTO } from 'wdBean/Index' | ||
| 9 | export struct CommentTabComponent { | 9 | export struct CommentTabComponent { |
| 10 | private onCommentFocus: () => void = () => { | 10 | private onCommentFocus: () => void = () => { |
| 11 | } | 11 | } |
| 12 | + private onLoad: (dialogController: CustomDialogController) => void = () => { | ||
| 13 | + } | ||
| 12 | @ObjectLink publishCommentModel: publishCommentModel | 14 | @ObjectLink publishCommentModel: publishCommentModel |
| 13 | @Prop contentDetail: ContentDetailDTO | 15 | @Prop contentDetail: ContentDetailDTO |
| 14 | @Prop pageComponentType: number = -1 //1:视频详情页 2:竖屏直播页 | 16 | @Prop pageComponentType: number = -1 //1:视频详情页 2:竖屏直播页 |
| @@ -41,6 +43,8 @@ export struct CommentTabComponent { | @@ -41,6 +43,8 @@ export struct CommentTabComponent { | ||
| 41 | backgroundColor: "#50000000", | 43 | backgroundColor: "#50000000", |
| 42 | }) | 44 | }) |
| 43 | 45 | ||
| 46 | + this.onLoad(this.dialogController) | ||
| 47 | + | ||
| 44 | } | 48 | } |
| 45 | 49 | ||
| 46 | getCommentInputBackImg() { | 50 | getCommentInputBackImg() { |
| @@ -119,7 +123,6 @@ export struct CommentTabComponent { | @@ -119,7 +123,6 @@ export struct CommentTabComponent { | ||
| 119 | if (this.contentDetail.bestNoticer === 1) { | 123 | if (this.contentDetail.bestNoticer === 1) { |
| 120 | this.publishCommentModel.placeHolderText = "优质评论会获得最佳评论人的称号" | 124 | this.publishCommentModel.placeHolderText = "优质评论会获得最佳评论人的称号" |
| 121 | } | 125 | } |
| 122 | - | ||
| 123 | this.dialogController?.open(); | 126 | this.dialogController?.open(); |
| 124 | }) | 127 | }) |
| 125 | } | 128 | } |
| @@ -156,7 +159,7 @@ export struct CommentIconComponent { | @@ -156,7 +159,7 @@ export struct CommentIconComponent { | ||
| 156 | // Stack({alignContent:Alignment.Start}) { | 159 | // Stack({alignContent:Alignment.Start}) { |
| 157 | if (Number.parseInt(this.publishCommentModel.totalCommentNumer) != 0) { | 160 | if (Number.parseInt(this.publishCommentModel.totalCommentNumer) != 0) { |
| 158 | RelativeContainer() { | 161 | RelativeContainer() { |
| 159 | - Image(this.styleType == 1 ? $r('app.media.comment_icon_number_bg'):$r('app.media.ic_like_back_Select')) | 162 | + Image(this.styleType == 1 ? $r('app.media.comment_icon_number_bg') : $r('app.media.ic_like_back_Select')) |
| 160 | .objectFit(ImageFit.Fill) | 163 | .objectFit(ImageFit.Fill) |
| 161 | .resizable({ | 164 | .resizable({ |
| 162 | slice: { | 165 | slice: { |
| @@ -78,9 +78,12 @@ export struct PeopleShipHomeArticleListComponent { | @@ -78,9 +78,12 @@ export struct PeopleShipHomeArticleListComponent { | ||
| 78 | 78 | ||
| 79 | List({scroller: this.scroller}) { | 79 | List({scroller: this.scroller}) { |
| 80 | // 下拉刷新 | 80 | // 下拉刷新 |
| 81 | - ForEach(this.arr, (item: ContentDTO) => { | 81 | + ForEach(this.arr, (item: ContentDTO, index: number) => { |
| 82 | ListItem() { | 82 | ListItem() { |
| 83 | + Column() { | ||
| 83 | CardParser({compDTO:new CompDTO, contentDTO: item }) | 84 | CardParser({compDTO:new CompDTO, contentDTO: item }) |
| 85 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) | ||
| 86 | + } | ||
| 84 | }.width("100%") | 87 | }.width("100%") |
| 85 | .backgroundColor(Color.Transparent) | 88 | .backgroundColor(Color.Transparent) |
| 86 | }, (item: ContentDTO, index: number) => item.objectId + index.toString()) | 89 | }, (item: ContentDTO, index: number) => item.objectId + index.toString()) |
| @@ -64,7 +64,7 @@ export struct SearchResultContentComponent { | @@ -64,7 +64,7 @@ export struct SearchResultContentComponent { | ||
| 64 | if (this.hasMore) { | 64 | if (this.hasMore) { |
| 65 | SearcherAboutDataModel.getSearchResultListData("15", `${this.curPageNum}`, this.searchType, this.keywords, | 65 | SearcherAboutDataModel.getSearchResultListData("15", `${this.curPageNum}`, this.searchType, this.keywords, |
| 66 | getContext(this)).then((value) => { | 66 | getContext(this)).then((value) => { |
| 67 | - | 67 | + console.log('SearcherAboutDataModel', JSON.stringify(value)) |
| 68 | if (!this.data || value.list.length == 0) { | 68 | if (!this.data || value.list.length == 0) { |
| 69 | this.hasMore = false | 69 | this.hasMore = false |
| 70 | this.isLoading = false | 70 | this.isLoading = false |
| @@ -474,6 +474,7 @@ export struct SearchResultContentComponent { | @@ -474,6 +474,7 @@ export struct SearchResultContentComponent { | ||
| 474 | contentDTO.titleShow = value.data.type == "5" ? 1 : 0; | 474 | contentDTO.titleShow = value.data.type == "5" ? 1 : 0; |
| 475 | contentDTO.rmhInfo = rmhInfo | 475 | contentDTO.rmhInfo = rmhInfo |
| 476 | contentDTO.shareFlag = value.data.shareFlag | 476 | contentDTO.shareFlag = value.data.shareFlag |
| 477 | + contentDTO.contentText = value.data.contentText | ||
| 477 | return contentDTO; | 478 | return contentDTO; |
| 478 | 479 | ||
| 479 | 480 |
| @@ -229,7 +229,7 @@ export struct EmptyComponent { | @@ -229,7 +229,7 @@ export struct EmptyComponent { | ||
| 229 | this.emptyType === WDViewDefaultType.WDViewDefaultType_NoHistory) { | 229 | this.emptyType === WDViewDefaultType.WDViewDefaultType_NoHistory) { |
| 230 | imageString = $r('app.media.icon_no_collection') | 230 | imageString = $r('app.media.icon_no_collection') |
| 231 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoMessage) { | 231 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoMessage) { |
| 232 | - imageString = $r('app.media.icon_no_message') | 232 | + imageString = $r('app.media.icon_no_message1') |
| 233 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoComment || | 233 | } else if (this.emptyType === WDViewDefaultType.WDViewDefaultType_NoComment || |
| 234 | this.emptyType === WDViewDefaultType.WDViewDefaultType_NoComment1) { | 234 | this.emptyType === WDViewDefaultType.WDViewDefaultType_NoComment1) { |
| 235 | imageString = $r('app.media.icon_no_comment1') | 235 | imageString = $r('app.media.icon_no_comment1') |
| @@ -83,6 +83,7 @@ export struct OperRowListView { | @@ -83,6 +83,7 @@ export struct OperRowListView { | ||
| 83 | private AudioSuspension = new AudioSuspensionModel() | 83 | private AudioSuspension = new AudioSuspensionModel() |
| 84 | @State currentStatus: number | string | undefined = 0; | 84 | @State currentStatus: number | string | undefined = 0; |
| 85 | @State name: string = 'audio_recommend_status_wait' | 85 | @State name: string = 'audio_recommend_status_wait' |
| 86 | + @State dialogController: CustomDialogController | null = null; | ||
| 86 | 87 | ||
| 87 | async aboutToAppear() { | 88 | async aboutToAppear() { |
| 88 | console.info(TAG, '22222----', this.styleType) | 89 | console.info(TAG, '22222----', this.styleType) |
| @@ -207,6 +208,9 @@ export struct OperRowListView { | @@ -207,6 +208,9 @@ export struct OperRowListView { | ||
| 207 | contentDetail: this.contentDetailData, | 208 | contentDetail: this.contentDetailData, |
| 208 | onCommentFocus: this.onCommentFocus, | 209 | onCommentFocus: this.onCommentFocus, |
| 209 | pageComponentType: this.pageComponentType, | 210 | pageComponentType: this.pageComponentType, |
| 211 | + onLoad: (dialogController: CustomDialogController) => { | ||
| 212 | + this.dialogController = dialogController | ||
| 213 | + } | ||
| 210 | }) | 214 | }) |
| 211 | } | 215 | } |
| 212 | } | 216 | } |
| @@ -222,6 +226,11 @@ export struct OperRowListView { | @@ -222,6 +226,11 @@ export struct OperRowListView { | ||
| 222 | CommentIconComponent({ publishCommentModel: this.publishCommentModel, styleType: this.styleType }) | 226 | CommentIconComponent({ publishCommentModel: this.publishCommentModel, styleType: this.styleType }) |
| 223 | .onClick(() => { | 227 | .onClick(() => { |
| 224 | this.onCommentIconClick() | 228 | this.onCommentIconClick() |
| 229 | + | ||
| 230 | + console.log(JSON.stringify(this.dialogController?.open)) | ||
| 231 | + | ||
| 232 | + // 评论弹框内部嵌入 | ||
| 233 | + !this.showBackIcon && this.dialogController?.open() | ||
| 225 | }) | 234 | }) |
| 226 | } | 235 | } |
| 227 | } | 236 | } |
| @@ -290,7 +299,8 @@ export struct OperRowListView { | @@ -290,7 +299,8 @@ export struct OperRowListView { | ||
| 290 | @Builder | 299 | @Builder |
| 291 | builderListen() { | 300 | builderListen() { |
| 292 | Column() { | 301 | Column() { |
| 293 | - Image(this.currentStatus === PlayerConstants.STATUS_START ? $r("app.media.icon_listen") : $r("app.media.icon_listen")) | 302 | + Image(this.currentStatus === PlayerConstants.STATUS_START ? $r("app.media.icon_voice_playing") : |
| 303 | + $r("app.media.icon_listen")) | ||
| 294 | .width(24) | 304 | .width(24) |
| 295 | .height(24) | 305 | .height(24) |
| 296 | .aspectRatio(1) | 306 | .aspectRatio(1) |
| @@ -107,6 +107,18 @@ export struct DetailVideoListPage { | @@ -107,6 +107,18 @@ export struct DetailVideoListPage { | ||
| 107 | } | 107 | } |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | + pageTransition() { | ||
| 111 | + // 为目标页面时,进入:从右边侧滑入,退出:是右侧划出;跳转别的页面:左侧划出,返回:左侧划入。 | ||
| 112 | + PageTransitionEnter({ type: RouteType.Push, duration: 300 }) | ||
| 113 | + .slide(SlideEffect.Right) | ||
| 114 | + PageTransitionEnter({ type: RouteType.Pop, duration: 300 }) | ||
| 115 | + .slide(SlideEffect.Left) | ||
| 116 | + PageTransitionExit({ type: RouteType.Push, duration: 300 }) | ||
| 117 | + .slide(SlideEffect.Left) | ||
| 118 | + PageTransitionExit({ type: RouteType.Pop, duration: 300 }) | ||
| 119 | + .slide(SlideEffect.Right) | ||
| 120 | + } | ||
| 121 | + | ||
| 110 | async getContentDetail(contentId: string, relId: string, relType: string) { | 122 | async getContentDetail(contentId: string, relId: string, relType: string) { |
| 111 | await ContentDetailRequest.getContentDetail({ | 123 | await ContentDetailRequest.getContentDetail({ |
| 112 | contentId: contentId, | 124 | contentId: contentId, |
| @@ -155,6 +155,18 @@ export struct VideoChannelDetail { | @@ -155,6 +155,18 @@ export struct VideoChannelDetail { | ||
| 155 | } | 155 | } |
| 156 | } | 156 | } |
| 157 | 157 | ||
| 158 | + pageTransition() { | ||
| 159 | + // 为目标页面时,进入:从右边侧滑入,退出:是右侧划出;跳转别的页面:左侧划出,返回:左侧划入。 | ||
| 160 | + PageTransitionEnter({ type: RouteType.Push, duration: 300 }) | ||
| 161 | + .slide(SlideEffect.Right) | ||
| 162 | + PageTransitionEnter({ type: RouteType.Pop, duration: 300 }) | ||
| 163 | + .slide(SlideEffect.Left) | ||
| 164 | + PageTransitionExit({ type: RouteType.Push, duration: 300 }) | ||
| 165 | + .slide(SlideEffect.Left) | ||
| 166 | + PageTransitionExit({ type: RouteType.Pop, duration: 300 }) | ||
| 167 | + .slide(SlideEffect.Right) | ||
| 168 | + } | ||
| 169 | + | ||
| 158 | /** | 170 | /** |
| 159 | * 根据视频频道传参查询视频楼层信息 | 171 | * 根据视频频道传参查询视频楼层信息 |
| 160 | */ | 172 | */ |
| @@ -74,10 +74,10 @@ export struct DetailDialog { | @@ -74,10 +74,10 @@ export struct DetailDialog { | ||
| 74 | 74 | ||
| 75 | build() { | 75 | build() { |
| 76 | Column() { | 76 | Column() { |
| 77 | - Scroll() { | ||
| 78 | CommentComponent({ | 77 | CommentComponent({ |
| 79 | publishCommentModel: this.publishCommentModel, | 78 | publishCommentModel: this.publishCommentModel, |
| 80 | showCloseIcon: true, | 79 | showCloseIcon: true, |
| 80 | + fixedHeightMode: true, | ||
| 81 | onCloseClick: () => { | 81 | onCloseClick: () => { |
| 82 | console.log('onCloseClick') | 82 | console.log('onCloseClick') |
| 83 | this.showCommentList = false | 83 | this.showCommentList = false |
| @@ -87,9 +87,7 @@ export struct DetailDialog { | @@ -87,9 +87,7 @@ export struct DetailDialog { | ||
| 87 | // }, 1000) | 87 | // }, 1000) |
| 88 | 88 | ||
| 89 | } | 89 | } |
| 90 | - }).height('100%') | ||
| 91 | - } | ||
| 92 | - .layoutWeight(1) | 90 | + }).layoutWeight(1) |
| 93 | 91 | ||
| 94 | OperRowListView({ | 92 | OperRowListView({ |
| 95 | componentType: 1, | 93 | componentType: 1, |
sight_harmony/features/wdDetailPlayShortVideo/src/main/resources/base/media/icon_voice_playing.gif
0 → 100644
36.6 KB
| @@ -44,7 +44,7 @@ export default struct CustomDialogComponent { | @@ -44,7 +44,7 @@ export default struct CustomDialogComponent { | ||
| 44 | .fontSize(14) | 44 | .fontSize(14) |
| 45 | .fontColor($r('app.color.dialog_private_text_color')) | 45 | .fontColor($r('app.color.dialog_private_text_color')) |
| 46 | } | 46 | } |
| 47 | - .width('90%') | 47 | + .width('90%').lineHeight(22) |
| 48 | Row(){ | 48 | Row(){ |
| 49 | 49 | ||
| 50 | // Button(){ | 50 | // Button(){ |
| @@ -135,6 +135,12 @@ export default struct CustomDialogComponent { | @@ -135,6 +135,12 @@ export default struct CustomDialogComponent { | ||
| 135 | .width('90%') | 135 | .width('90%') |
| 136 | .fontColor($r('app.color.dialog_text_color')) | 136 | .fontColor($r('app.color.dialog_text_color')) |
| 137 | .fontSize(14).margin({top:20}) | 137 | .fontSize(14).margin({top:20}) |
| 138 | + | ||
| 139 | + Divider() | ||
| 140 | + .color('#f5f5f5') | ||
| 141 | + .width('100%') | ||
| 142 | + .strokeWidth(1) | ||
| 143 | + .padding({left:16,right:16,top:22}) | ||
| 138 | Row() { | 144 | Row() { |
| 139 | Text($r('app.string.dialog_button_disagree')) | 145 | Text($r('app.string.dialog_button_disagree')) |
| 140 | .fancy() | 146 | .fancy() |
| @@ -154,7 +160,7 @@ export default struct CustomDialogComponent { | @@ -154,7 +160,7 @@ export default struct CustomDialogComponent { | ||
| 154 | }) | 160 | }) |
| 155 | 161 | ||
| 156 | } | 162 | } |
| 157 | - .margin({ bottom: '21lpx',top:'42lpx' }) | 163 | + .margin({ bottom: '21lpx',top:'22lpx' }) |
| 158 | 164 | ||
| 159 | } | 165 | } |
| 160 | .width('528lpx') | 166 | .width('528lpx') |
-
Please register or login to post a comment