wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  feat: 标签高度和右图高度
  意图框架参数跳转【isPublicData这个字段从必选改为可选了,而且类型从原来的boolean改成了integer,如果需要填写,写0或者1,不需要的话直接删除。】
  -fix 进入文章专题页面_评论框及评论组件元素未展现
  fix:bug[18232] 个人中心设计变更,评论、关注等功能按钮展示一行
... ... @@ -203,6 +203,7 @@ export class ProcessUtils {
relType: content?.relType,
relId: content?.relId,
channelId: content?.channelId,
pageId: content?.pageId
} as ExtraDTO
} as Params,
};
... ...
... ... @@ -10,6 +10,7 @@ export interface ExtraDTO extends ItemDTO {
topicId: string;
channelId: string;
compId: string;
pageId: string;
sourcePage: string;
relId: string;
relType: string;
... ...
... ... @@ -25,5 +25,6 @@ export interface Params {
creatorId?: string; //号主id
videoUrl?: string;
videoCoverUrl?: string;
pageId?: string;
backVisibility?: boolean; //展示顶部返回栏
}
... ...
... ... @@ -12,6 +12,7 @@ import { EmptyComponent } from '../components/view/EmptyComponent';
import { NetworkUtil, WindowModel } from 'wdKit';
import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare'
import { common } from '@kit.AbilityKit';
import { PageRepository } from '../repository/PageRepository';
const TAG: string = 'SpacialTopicPageComponent'
... ... @@ -59,7 +60,6 @@ export struct SpacialTopicPageComponent {
private async getDetail() {
this.isNetConnected = NetworkUtil.isNetConnected()
let contentId: string = ''
let relId: string = ''
let relType: string = ''
... ... @@ -74,11 +74,14 @@ export struct SpacialTopicPageComponent {
if (this.action.params.extra.relType) {
relType = this.action.params.extra.relType
}
}
let pageId = this.action.params.extra?.pageId
console.log('pageIdpageId',pageId)
if(pageId){
let pageInfoMsg = await PageRepository.fetchMorningEveningPageInfo(pageId)
let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType)
if (detailBeans && detailBeans.length > 0) {
this.contentDetailData = detailBeans[0];
if (detailBeans?.length > 0) {
this.contentDetailData = JSON.parse(JSON.stringify(detailBeans[0]));
this.viewBlogInsightIntentShare()
// if (this.contentDetailData[0]?.openComment) {
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
... ... @@ -92,6 +95,11 @@ export struct SpacialTopicPageComponent {
// }
this.trySendData2H5()
}
if(pageInfoMsg && pageInfoMsg.data){
this.contentDetailData.openComment = Number(pageInfoMsg.data.topicInfo.commentFlag)
this.contentDetailData.commentDisplay = Number(pageInfoMsg.data.topicInfo.commentShowFlag)
}
}
}
}
... ...
... ... @@ -77,15 +77,8 @@ export struct Card10Component {
InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
ProcessUtils.processPage(this.contentDTO)
})
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center).margin({ left: 5, bottom: 5 })
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
}
if (this.contentDTO.objectType == '5') {
Notes({ objectType: 5 }).margin({ left: 5, bottom: 5 })
}
}.alignContent(Alignment.BottomStart)
... ... @@ -135,15 +128,8 @@ export struct Card10Component {
Row() {
Column() {
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
}
if (item.objectType == '5') {
Notes({ objectType: 5 })
}
Text(item.newsTitle)
.fontSize($r('app.float.font_size_17'))
... ... @@ -151,12 +137,10 @@ export struct Card10Component {
.fontColor($r('app.color.color_222222'))
.maxLines(2)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&
(this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :
((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :
0 )
.textIndent(item.objectType == '5' ? 38 : 0)
}.alignContent(Alignment.TopStart)
Blank()
//bottom 评论等信息
CardSourceInfo(
{
... ... @@ -166,6 +150,7 @@ export struct Card10Component {
)
}
.layoutWeight(1)
.height(78)
.alignItems(HorizontalAlign.Start)
// 右侧图片
... ... @@ -183,6 +168,7 @@ export struct Card10Component {
})
}
.alignContent(Alignment.BottomEnd)
.height(78)
}
}
.padding({ top: 10, bottom: 10 })
... ...
... ... @@ -39,13 +39,13 @@ export struct Card11Component {
Column() {
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
}
}
Text() {
... ...
... ... @@ -61,13 +61,13 @@ export struct Card2Component {
// }
// }
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
}
}
//新闻标题
... ...
... ... @@ -42,13 +42,13 @@ export struct Card3Component {
// Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center)
// }
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
}
}
Text() {
... ...
... ... @@ -58,13 +58,13 @@ export struct Card5Component {
Row() {
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
}
}
... ...
... ... @@ -53,17 +53,16 @@ export struct Card6Component {
// }
Stack() {
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).height(28).align(Alignment.Center)
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).height(28).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).height(28).align(Alignment.Center)
}
}
Text() {
if (this.titleMarked) {
ForEach(this.textArr, (textItem: textItem) => {
... ...
... ... @@ -89,14 +89,14 @@ export struct Card9Component {
topRight: $r('app.float.image_border_radius')
})
if(this.contentDTO.objectType == '5'){
Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)
Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center)
.margin({ left: 5, bottom: 5 })
} else {
if (this.contentDTO.seoTags) {
Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
}
if (this.contentDTO.newTags) {
Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)
Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
}
}
... ...
... ... @@ -16,7 +16,7 @@ export default struct MinePagePersonFunctionUI {
Grid(){
ForEach(this.personalData,(item:MinePagePersonalFunctionsItem,index:number)=>{
GridItem(){
PagePersonFunction({ item: item, noDivider : (index % 4 < 3 && index != this.personalData.length-1) ? false : true})
PagePersonFunction({ item: item, noDivider : (index % 5 < 4 && index != this.personalData.length-1) ? false : true})
}.onClick(()=>{
console.log(index+"")
switch (item.msg){
... ... @@ -77,14 +77,14 @@ export default struct MinePagePersonFunctionUI {
break;
}
}
}).width('169lpx')
}).width('142lpx')
.height('117lpx')
})
}
.rowsTemplate('1fr 1fr')
.columnsTemplate('1fr 1fr 1fr 1fr')
.height('234lpx')
.margin({top:'31lpx',left:'23lpx',right:'23lpx' })
.rowsTemplate('1fr')
.columnsTemplate('1fr 1fr 1fr 1fr 1fr')
.height('117lpx')
.margin({top:'31lpx'})
}
messageClick(){
... ...
... ... @@ -62,8 +62,7 @@ export function viewBlogInsightIntentShare(context: common.UIAbilityContext, ent
commentCount: _item?.interactData?.commentNum || 0,
favorites: _item?.interactData?.collectNum || 0,
viewCount: _item?.interactData?.readNum || 0,
rankingHint: 99,
isPublicData: true
rankingHint: 99
}
}
insightIntentArray.push(viewBlogInsightIntentItem)
... ... @@ -113,8 +112,7 @@ export function viewBlogItemInsightIntentShare(context: common.UIAbilityContext,
forwardCount: interactData?.shareNum || 0,
commentCount: interactData?.commentNum || 0,
favorites: interactData?.collectNum || 0,
rankingHint: 99,
isPublicData: true
rankingHint: 99
}
}
... ... @@ -147,8 +145,7 @@ export function viewColumInsightIntentShare(context: common.UIAbilityContext, en
activityType: ['RecentViews'],
columnTitle: pageInfoBean?.topicInfo?.title,
columnSubTitle: pageInfoBean?.shareSummary,
rankingHint: 99,
isPublicData: true
rankingHint: 99
}
}
console.log('yzl viewColumInsightIntentShare', JSON.stringify(viewColumInsightIntentItem))
... ...