Showing
2 changed files
with
24 additions
and
12 deletions
| @@ -106,10 +106,11 @@ export class ProcessUtils { | @@ -106,10 +106,11 @@ export class ProcessUtils { | ||
| 106 | case ContentConstants.TYPE_AUDIO: | 106 | case ContentConstants.TYPE_AUDIO: |
| 107 | ProcessUtils.gotoAudio(content) | 107 | ProcessUtils.gotoAudio(content) |
| 108 | break; | 108 | break; |
| 109 | - case ContentConstants.TYPE_TELETEXT:case ContentConstants.TYPE_Activity: | 109 | + case ContentConstants.TYPE_TELETEXT: |
| 110 | + case ContentConstants.TYPE_Activity: | ||
| 110 | // 图文详情,跳转h5 | 111 | // 图文详情,跳转h5 |
| 111 | if (content?.linkUrl) { //有 linkUrl 走专题页展示逻辑 | 112 | if (content?.linkUrl) { //有 linkUrl 走专题页展示逻辑 |
| 112 | - ProcessUtils.gotoSpecialTopic(content,true) | 113 | + ProcessUtils.gotoSpecialTopic(content, true) |
| 113 | } else { | 114 | } else { |
| 114 | ProcessUtils.gotoWeb(content); | 115 | ProcessUtils.gotoWeb(content); |
| 115 | } | 116 | } |
| @@ -171,17 +172,17 @@ export class ProcessUtils { | @@ -171,17 +172,17 @@ export class ProcessUtils { | ||
| 171 | let relIndex = 0; | 172 | let relIndex = 0; |
| 172 | for (let index = 0; index < photoList.length; index++) { | 173 | for (let index = 0; index < photoList.length; index++) { |
| 173 | const element = photoList[index]; | 174 | const element = photoList[index]; |
| 174 | - if(!StringUtils.isEmpty(element.picPath)){ | ||
| 175 | - relIndex = relIndex+1 | 175 | + if (!StringUtils.isEmpty(element.picPath)) { |
| 176 | + relIndex = relIndex + 1 | ||
| 176 | } | 177 | } |
| 177 | } | 178 | } |
| 178 | tempP.length = relIndex | 179 | tempP.length = relIndex |
| 179 | relIndex = 0 | 180 | relIndex = 0 |
| 180 | for (let index = 0; index < photoList.length; index++) { | 181 | for (let index = 0; index < photoList.length; index++) { |
| 181 | const element = photoList[index]; | 182 | const element = photoList[index]; |
| 182 | - if(!StringUtils.isEmpty(element.picPath)){ | 183 | + if (!StringUtils.isEmpty(element.picPath)) { |
| 183 | tempP[relIndex] = element | 184 | tempP[relIndex] = element |
| 184 | - relIndex = relIndex+1 | 185 | + relIndex = relIndex + 1 |
| 185 | } | 186 | } |
| 186 | } | 187 | } |
| 187 | photoList.length = tempP.length | 188 | photoList.length = tempP.length |
| @@ -243,7 +244,7 @@ export class ProcessUtils { | @@ -243,7 +244,7 @@ export class ProcessUtils { | ||
| 243 | public static gotoDefaultWeb(content: ContentDTO) { | 244 | public static gotoDefaultWeb(content: ContentDTO) { |
| 244 | 245 | ||
| 245 | // 内链 | 246 | // 内链 |
| 246 | - if(content.openType == '1'){ | 247 | + if (content.openType == '1') { |
| 247 | let taskAction: Action = { | 248 | let taskAction: Action = { |
| 248 | type: 'JUMP_H5_BY_WEB_VIEW', | 249 | type: 'JUMP_H5_BY_WEB_VIEW', |
| 249 | params: { | 250 | params: { |
| @@ -251,10 +252,10 @@ export class ProcessUtils { | @@ -251,10 +252,10 @@ export class ProcessUtils { | ||
| 251 | } as Params, | 252 | } as Params, |
| 252 | }; | 253 | }; |
| 253 | WDRouterRule.jumpWithAction(taskAction) | 254 | WDRouterRule.jumpWithAction(taskAction) |
| 254 | - }else if(content.openType == '2') { | 255 | + } else if (content.openType == '2') { |
| 255 | // 外链 | 256 | // 外链 |
| 256 | ProcessUtils.jumpExternalWebPage(content.linkUrl); | 257 | ProcessUtils.jumpExternalWebPage(content.linkUrl); |
| 257 | - }else { | 258 | + } else { |
| 258 | // 无需跳转 | 259 | // 无需跳转 |
| 259 | 260 | ||
| 260 | } | 261 | } |
| @@ -476,9 +477,14 @@ export class ProcessUtils { | @@ -476,9 +477,14 @@ export class ProcessUtils { | ||
| 476 | 477 | ||
| 477 | /** | 478 | /** |
| 478 | * 跳转人民号主页 | 479 | * 跳转人民号主页 |
| 479 | - * @params creatorId 创作者id | 480 | + * @param creatorId 创作者id |
| 481 | + * @param banControl 是否封禁可以查看号主页 0 可以,1不可以 | ||
| 482 | + * @param mainControl 中文端账号是否拥有主页展示权限:0-未拥有,1-拥有 | ||
| 483 | + * @param userId 用户id | ||
| 484 | + * @param userType 用户类型 1: 普通用户,2: 创作者 3: 矩阵号 4:运营子账号 5:内容源账号 | ||
| 480 | */ | 485 | */ |
| 481 | - public static gotoPeopleShipHomePage(creatorId: string) { | 486 | + public static gotoPeopleShipHomePage(creatorId: string, banControl?: number, mainControl?: number, userId?: string, |
| 487 | + userType?: string) { | ||
| 482 | let params = { 'creatorId': creatorId } as Record<string, string>; | 488 | let params = { 'creatorId': creatorId } as Record<string, string>; |
| 483 | WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) | 489 | WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params) |
| 484 | } | 490 | } |
| @@ -9,7 +9,7 @@ import { RmhInfoDTO, CompDTO, ContentDTO } from 'wdBean' | @@ -9,7 +9,7 @@ import { RmhInfoDTO, CompDTO, ContentDTO } from 'wdBean' | ||
| 9 | import { CommonConstants } from 'wdConstant/Index'; | 9 | import { CommonConstants } from 'wdConstant/Index'; |
| 10 | import { DateTimeUtils, SPHelper, Logger, ToastUtils } from 'wdKit'; | 10 | import { DateTimeUtils, SPHelper, Logger, ToastUtils } from 'wdKit'; |
| 11 | import { SpConstants } from 'wdConstant/Index' | 11 | import { SpConstants } from 'wdConstant/Index' |
| 12 | -import { WDRouterPage, WDRouterRule } from 'wdRouter/Index'; | 12 | +import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter/Index'; |
| 13 | import router from '@ohos.router' | 13 | import router from '@ohos.router' |
| 14 | import { postBatchAttentionStatusParams } from 'wdBean/Index'; | 14 | import { postBatchAttentionStatusParams } from 'wdBean/Index'; |
| 15 | import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel' | 15 | import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel' |
| @@ -180,5 +180,11 @@ export struct RmhTitle { | @@ -180,5 +180,11 @@ export struct RmhTitle { | ||
| 180 | } | 180 | } |
| 181 | .width(CommonConstants.FULL_WIDTH) | 181 | .width(CommonConstants.FULL_WIDTH) |
| 182 | .margin({ bottom: 10 }) | 182 | .margin({ bottom: 10 }) |
| 183 | + .onClick(()=>{ | ||
| 184 | + | ||
| 185 | + // 跳转号主 | ||
| 186 | + ProcessUtils.gotoPeopleShipHomePage( this.rmhInfo?.rmhId,this.rmhInfo?.banControl,this.rmhInfo?.cnMainControl,this.rmhInfo?.userId,this.rmhInfo?.userType) | ||
| 187 | + | ||
| 188 | + }) | ||
| 183 | } | 189 | } |
| 184 | } | 190 | } |
-
Please register or login to post a comment