陈剑华

Merge remote-tracking branch 'origin/main'

... ... @@ -106,10 +106,11 @@ export class ProcessUtils {
case ContentConstants.TYPE_AUDIO:
ProcessUtils.gotoAudio(content)
break;
case ContentConstants.TYPE_TELETEXT:case ContentConstants.TYPE_Activity:
case ContentConstants.TYPE_TELETEXT:
case ContentConstants.TYPE_Activity:
// 图文详情,跳转h5
if (content?.linkUrl) { //有 linkUrl 走专题页展示逻辑
ProcessUtils.gotoSpecialTopic(content,true)
ProcessUtils.gotoSpecialTopic(content, true)
} else {
ProcessUtils.gotoWeb(content);
}
... ... @@ -171,17 +172,17 @@ export class ProcessUtils {
let relIndex = 0;
for (let index = 0; index < photoList.length; index++) {
const element = photoList[index];
if(!StringUtils.isEmpty(element.picPath)){
relIndex = relIndex+1
if (!StringUtils.isEmpty(element.picPath)) {
relIndex = relIndex + 1
}
}
tempP.length = relIndex
relIndex = 0
for (let index = 0; index < photoList.length; index++) {
const element = photoList[index];
if(!StringUtils.isEmpty(element.picPath)){
if (!StringUtils.isEmpty(element.picPath)) {
tempP[relIndex] = element
relIndex = relIndex+1
relIndex = relIndex + 1
}
}
photoList.length = tempP.length
... ... @@ -243,7 +244,7 @@ export class ProcessUtils {
public static gotoDefaultWeb(content: ContentDTO) {
// 内链
if(content.openType == '1'){
if (content.openType == '1') {
let taskAction: Action = {
type: 'JUMP_H5_BY_WEB_VIEW',
params: {
... ... @@ -251,10 +252,10 @@ export class ProcessUtils {
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
}else if(content.openType == '2') {
} else if (content.openType == '2') {
// 外链
ProcessUtils.jumpExternalWebPage(content.linkUrl);
}else {
} else {
// 无需跳转
}
... ... @@ -476,9 +477,14 @@ export class ProcessUtils {
/**
* 跳转人民号主页
* @params creatorId 创作者id
* @param creatorId 创作者id
* @param banControl 是否封禁可以查看号主页 0 可以,1不可以
* @param mainControl 中文端账号是否拥有主页展示权限:0-未拥有,1-拥有
* @param userId 用户id
* @param userType 用户类型 1: 普通用户,2: 创作者 3: 矩阵号 4:运营子账号 5:内容源账号
*/
public static gotoPeopleShipHomePage(creatorId: string) {
public static gotoPeopleShipHomePage(creatorId: string, banControl?: number, mainControl?: number, userId?: string,
userType?: string) {
let params = { 'creatorId': creatorId } as Record<string, string>;
WDRouterRule.jumpWithPage(WDRouterPage.peopleShipHomePage, params)
}
... ...
... ... @@ -82,6 +82,9 @@ export struct DynamicDetailComponent {
@State openLikes: boolean = false // 是否可以点赞 1:可以 0:不可以
pageParam: ParamType = {}
// @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
async aboutToAppear() {
await this.getContentDetailData()
// 内容用 点赞样式 1红心(点赞) 2大拇指(祈福) 3蜡烛(默哀) 4置空
... ... @@ -112,7 +115,7 @@ export struct DynamicDetailComponent {
.width('100%')
.alignItems(VerticalAlign.Bottom)
.padding({ bottom: 5 })
.margin({top: `${this.topSafeHeight}px`})
//分割线
Image($r('app.media.ic_news_detail_division'))
.width('100%')
... ... @@ -570,6 +573,7 @@ export struct DynamicDetailComponent {
})
.height(100)
}
.margin({bottom: 65})
}
.alignSelf(ItemAlign.Start)
.backgroundColor('#FFFFFFFF')
... ...
... ... @@ -9,7 +9,7 @@ import { RmhInfoDTO, CompDTO, ContentDTO } from 'wdBean'
import { CommonConstants } from 'wdConstant/Index';
import { DateTimeUtils, SPHelper, Logger, ToastUtils } from 'wdKit';
import { SpConstants } from 'wdConstant/Index'
import { WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter/Index';
import router from '@ohos.router'
import { postBatchAttentionStatusParams } from 'wdBean/Index';
import { MultiPictureDetailViewModel } from '../../viewmodel/MultiPictureDetailViewModel'
... ... @@ -180,5 +180,11 @@ export struct RmhTitle {
}
.width(CommonConstants.FULL_WIDTH)
.margin({ bottom: 10 })
.onClick(()=>{
// 跳转号主
ProcessUtils.gotoPeopleShipHomePage( this.rmhInfo?.rmhId,this.rmhInfo?.banControl,this.rmhInfo?.cnMainControl,this.rmhInfo?.userId,this.rmhInfo?.userType)
})
}
}
\ No newline at end of file
... ...