wangliang_wd

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

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  fix |> 20762 一键登录,切换登录方式文案应调整为-“其它手机号登录”
  fix |> 20568 【依赖华为】我的评论列表中,上方展示的昵称,换行比安卓早,并且等级的位置展示不正确
  fix |> 搜索-热门搜索 布局单位 lpx 改成 vp
  fix |> 20602 【生产环境】【第三次内部验收】直播频道横滑卡,左滑时,松手跳转手势-查看更多发生抖动;
  fix |> 20793 搜索结果页,聚合的搜索结果,出现在第一条上面不要分割,出现在页面中间上下都要有粗分割线,鸿蒙现状:出现在页面中间,上分割线未加粗
  ref |> 更新默认垫片图片
  fix |> 20302 uat>导航换肤,新闻频道列表页,内容区背景未展示换肤图片(顶部圆角显示)
  ref |> 更新App版本号7402
Showing 53 changed files with 401 additions and 219 deletions
... ... @@ -2,8 +2,8 @@
"app": {
"bundleName": "com.peopledailychina.hosactivity",
"vendor": "$string:app_vendor",
"versionCode": 7401,
"versionName": "7.4.0.1",
"versionCode": 7402,
"versionName": "7.4.0.2",
"icon": "$media:app_icon",
"label": "$string:app_name"
}
... ...
... ... @@ -113,6 +113,8 @@ export class ContentDTO implements BaseDTO {
sameContentListJson:string = ""
sameContentListSize:number = 0
sameContentListId:string = ""
isAggregateData:boolean = false
/*
本地辅助字段
*/
... ...
... ... @@ -64,7 +64,10 @@ export struct CardParser {
// Text(JSON.stringify(this.contentDTO.appStyle))
// Text(this.contentDTO.newsTitle)
this.contentBuilder(this.contentDTO);
}
}.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
}
@Builder
... ... @@ -86,7 +89,8 @@ export struct CardParser {
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName,
compIndex:this.compIndex
})
this.getBehindDivider()
} else {
... ... @@ -96,7 +100,8 @@ export struct CardParser {
contentDTO,
pageId: this.pageId,
pageName: this.pageName,
loadImg: this.loadImg
loadImg: this.loadImg,
compIndex:this.compIndex
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_03) {
... ... @@ -104,7 +109,8 @@ export struct CardParser {
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName, loadImg: this.loadImg
pageName: this.pageName, loadImg: this.loadImg,
compIndex:this.compIndex
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_04) {
... ... @@ -112,7 +118,8 @@ export struct CardParser {
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName, loadImg: this.loadImg
pageName: this.pageName, loadImg: this.loadImg,
compIndex:this.compIndex
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_05) {
... ... @@ -121,7 +128,8 @@ export struct CardParser {
contentDTO,
titleShowPolicy: this.compDTO.titleShowPolicy,
pageId: this.pageId,
pageName: this.pageName, loadImg: this.loadImg
pageName: this.pageName, loadImg: this.loadImg,
compIndex:this.compIndex
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_06 || contentDTO.appStyle === CompStyle.Card_13) {
... ... @@ -129,7 +137,8 @@ export struct CardParser {
compDTO: this.compDTO,
contentDTO: this.contentDTO,
pageId: this.pageId,
pageName: this.pageName, loadImg: this.loadImg
pageName: this.pageName, loadImg: this.loadImg,
compIndex:this.compIndex
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_10 || contentDTO.appStyle === CompStyle.Card_09) {
... ... @@ -137,7 +146,8 @@ export struct CardParser {
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName, loadImg: this.loadImg
pageName: this.pageName, loadImg: this.loadImg,
compIndex:this.compIndex
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_11) {
... ... @@ -145,7 +155,8 @@ export struct CardParser {
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName
pageName: this.pageName,
compIndex:this.compIndex
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_12) {
... ... @@ -153,7 +164,8 @@ export struct CardParser {
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName, loadImg: this.loadImg
pageName: this.pageName, loadImg: this.loadImg,
compIndex:this.compIndex
})
this.getBehindDivider()
... ... @@ -162,7 +174,8 @@ export struct CardParser {
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName, loadImg: this.loadImg
pageName: this.pageName, loadImg: this.loadImg,
compIndex:this.compIndex
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_15) {
... ... @@ -170,7 +183,8 @@ export struct CardParser {
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName, loadImg: this.loadImg
pageName: this.pageName, loadImg: this.loadImg,
compIndex:this.compIndex
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_16) {
... ... @@ -178,7 +192,8 @@ export struct CardParser {
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName, loadImg: this.loadImg
pageName: this.pageName, loadImg: this.loadImg,
compIndex:this.compIndex
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_17) {
... ... @@ -186,7 +201,8 @@ export struct CardParser {
compDTO: this.compDTO,
contentDTO,
pageId: this.pageId,
pageName: this.pageName, loadImg: this.loadImg
pageName: this.pageName, loadImg: this.loadImg,
compIndex:this.compIndex
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_19) {
... ... @@ -195,7 +211,8 @@ export struct CardParser {
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName,
isPeopleShipHome:this.isPeopleShipHome, loadImg: this.loadImg
isPeopleShipHome:this.isPeopleShipHome, loadImg: this.loadImg,
compIndex:this.compIndex
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_20) {
... ... @@ -204,7 +221,8 @@ export struct CardParser {
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName,
isPeopleShipHome:this.isPeopleShipHome, loadImg: this.loadImg
isPeopleShipHome:this.isPeopleShipHome, loadImg: this.loadImg,
compIndex:this.compIndex
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_21) {
... ... @@ -212,7 +230,8 @@ export struct CardParser {
contentDTO,
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName, loadImg: this.loadImg
pageName: this.pageName, loadImg: this.loadImg,
compIndex:this.compIndex
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_Comp_Live_Big_Image_01) {
... ... @@ -221,7 +240,8 @@ export struct CardParser {
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName,
index: this.compIndex, loadImg: this.loadImg
index: this.compIndex, loadImg: this.loadImg,
compIndex:this.compIndex
})
this.getBehindDivider()
} else if (contentDTO.appStyle === CompStyle.Card_Comp_Live_Big_Image_02) {
... ... @@ -230,7 +250,8 @@ export struct CardParser {
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName,
index:this.compIndex, loadImg: this.loadImg
index:this.compIndex, loadImg: this.loadImg,
compIndex:this.compIndex
})
this.getBehindDivider()
} else {
... ...
... ... @@ -74,13 +74,22 @@ export struct CompParser {
Column() {
// Text('CompParser')
// Text(JSON.stringify(this.compDTO.compStyle))
Column(){
this.componentBuilder();
}
.margin({
}.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
}.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius') : 0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius') : 0
})
/*.margin({
left: this.compDTO.compStyle === CompStyle.Zh_Single_Row_04 ? 0 : 6,
right: (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05 || this.compDTO.compStyle === CompStyle.Zh_Single_Row_02 ||
this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) ? 0 : 6
})
})*/
}
// @Builder
... ... @@ -115,17 +124,17 @@ export struct CompParser {
if (this.compDTO.operDataList[0]?.objectType !== '3' &&
this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口
if (this.compDTO.compStyle === CompStyle.Label_03) {
LabelComponent({ compDTO: this.compDTO })
LabelComponent({ compDTO: this.compDTO ,compIndex: this.compIndex})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
if (this.compDTO.operDataList.length > this.audioItems.length) {
ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg })
ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg ,compIndex: this.compIndex})
}
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 &&
this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡"
// Text('LiveHorizontalCardComponent')
LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg })
LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg ,compIndex: this.compIndex})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) {
if (this.compDTO.operDataList.length > 1) {
... ... @@ -133,26 +142,26 @@ export struct CompParser {
HorizontalStrokeCardThreeTwoRadioForMoreComponent({
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName, loadImg: this.pageModel.loadImg
pageName: this.pageName, loadImg: this.pageModel.loadImg,compIndex: this.compIndex
})
} else {
// Text('HorizontalStrokeCardThreeTwoRadioForOneComponent')
HorizontalStrokeCardThreeTwoRadioForOneComponent({
compDTO: this.compDTO,
pageId: this.pageId,
pageName: this.pageName, loadImg: this.pageModel.loadImg
pageName: this.pageName, loadImg: this.pageModel.loadImg,compIndex: this.compIndex
})
}
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) {
ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg })
ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg ,compIndex: this.compIndex})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_03) {
ZhSingleRow03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg })
ZhSingleRow03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg ,compIndex: this.compIndex})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_02) { //双列流小视频,一行两图卡 ->标题
//ZhGridLayout02({ compDTO: this.compDTO })
CompNormalTitle({ compDTO: this.compDTO })
CompNormalTitle({ compDTO: this.compDTO ,compIndex: this.compIndex})
// this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Card_Comp_Zh_Grid_Layout_02) { //双列流小视频,一行两图卡
... ... @@ -160,20 +169,20 @@ export struct CompParser {
compDTO: this.compDTO,
operDataList: this.compDTO.operDataList,
pageId: this.pageId,
pageName: this.pageName, loadImg: this.pageModel.loadImg
pageName: this.pageName, loadImg: this.pageModel.loadImg,compIndex: this.compIndex
})
// this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) {
ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg })
ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg ,compIndex: this.compIndex})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) {
ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg ,bottomNavi:this.bottomNavi})
ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg ,bottomNavi:this.bottomNavi,compIndex: this.compIndex})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) {
// ZhSingleRow05({ compDTO })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) {
ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg })
ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, loadImg: this.pageModel.loadImg ,compIndex: this.compIndex})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
//头图卡 和comStyle 2相同,
... ... @@ -183,7 +192,7 @@ export struct CompParser {
titleShowPolicy: this.compDTO.titleShowPolicy,
pageId: this.pageId,
pageName: this.pageName,
loadImg: this.pageModel.loadImg
loadImg: this.pageModel.loadImg,compIndex: this.compIndex
})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) {
... ... @@ -193,7 +202,7 @@ export struct CompParser {
contentDTO: this.compDTO.operDataList[0],
pageId: this.pageId,
pageName: this.pageName,
loadImg: this.pageModel.loadImg
loadImg: this.pageModel.loadImg,compIndex: this.compIndex
})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Card_09) {
... ... @@ -202,7 +211,7 @@ export struct CompParser {
compDTO: this.compDTO,
contentDTO: this.compDTO.operDataList[0],
pageId: this.pageId,
pageName: this.pageName, loadImg: this.pageModel.loadImg
pageName: this.pageName, loadImg: this.pageModel.loadImg,compIndex: this.compIndex
})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Card_13) {
... ... @@ -210,7 +219,7 @@ export struct CompParser {
compDTO: this.compDTO,
contentDTO: this.compDTO.operDataList[0],
pageId: this.pageId,
pageName: this.pageName, loadImg: this.pageModel.loadImg
pageName: this.pageName, loadImg: this.pageModel.loadImg,compIndex: this.compIndex
})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Card_03) {
... ... @@ -218,11 +227,11 @@ export struct CompParser {
compDTO: this.compDTO,
contentDTO: this.compDTO.operDataList[0],
pageId: this.pageId,
pageName: this.pageName, loadImg: this.pageModel.loadImg
pageName: this.pageName, loadImg: this.pageModel.loadImg,compIndex: this.compIndex
})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_04) {
ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
ZhSingleColumn04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName ,compIndex: this.compIndex})
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_05) {
// ZhSingleColumn05({ compDTO: compDTO })
... ... @@ -230,7 +239,7 @@ export struct CompParser {
ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName, pageModel: this.pageModel, compIndex: this.compIndex, loadImg: this.pageModel.loadImg })
this.getBehindDivider()
} else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告
AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO })
AdvCardParser({ pageModel: this.pageModel, compDTO: this.compDTO ,compIndex: this.compIndex})
this.getBehindDivider()
//Text(`compIndex = ${compIndex}`).width('100%').fontSize('12fp').fontColor(Color.Red).padding({ left: 0, right: 0 })
} else if (!Number.isNaN(Number(this.compDTO.compStyle)) || this.compDTO.compType === 'appStyle') {
... ...
... ... @@ -21,7 +21,7 @@ import PageModel from '../../viewmodel/PageModel';
export struct AdvCardParser {
@State compDTO: CompDTO = {} as CompDTO;
pageModel: PageModel = new PageModel();
@State compIndex: number = 0;
build() {
... ... @@ -31,20 +31,20 @@ export struct AdvCardParser {
@Builder
contentBuilder(pageModel: PageModel, compDTO: CompDTO) {
if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_5) { //三图广告
CardAdvThreeImageComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg })
CardAdvThreeImageComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg ,compIndex:this.compIndex})
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_6) { //小图广告
CardAdvSmallImageComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg })
CardAdvSmallImageComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg ,compIndex:this.compIndex})
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_7 ||
compDTO.matInfo.advSubType === CompStyle.Card_Adv_12) { // 长通栏广告 和 顶部长通栏广告
CardAdvLongImageComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg })
CardAdvLongImageComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg ,compIndex:this.compIndex})
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_8) { //大图广告
CardAdvBigImageComponent({ pageModel, compDTO , loadImg: this.pageModel.loadImg})
CardAdvBigImageComponent({ pageModel, compDTO , loadImg: this.pageModel.loadImg,compIndex:this.compIndex})
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_9) { //视频广告
CardAdvVideoComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg })
CardAdvVideoComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg ,compIndex:this.compIndex})
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_10) { //展会广告
CardAdvVideoExComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg})
CardAdvVideoExComponent({ pageModel, compDTO, loadImg: this.pageModel.loadImg,compIndex:this.compIndex})
} else if (compDTO.matInfo.advSubType === CompStyle.Card_Adv_11) { //冠名广告
CardAdvGanMiComponent({ pageModel, compDTO , loadImg: this.pageModel.loadImg})
CardAdvGanMiComponent({ pageModel, compDTO , loadImg: this.pageModel.loadImg,compIndex:this.compIndex})
}
}
}
\ No newline at end of file
... ...
... ... @@ -18,6 +18,7 @@ const TAG: string = 'Card2Component';
@Component
export struct CardAdvBigImageComponent {
@State compDTO: CompDTO = {} as CompDTO
@State compIndex: number = 0;
@Prop loadImg: boolean = true;
pageModel: PageModel = new PageModel();
... ... @@ -53,6 +54,10 @@ export struct CardAdvBigImageComponent {
top: 8,
})
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.width(CommonConstants.FULL_WIDTH)
.padding({
left: 10,
... ...
... ... @@ -26,6 +26,8 @@ export struct CardAdvGanMiComponent {
@State advLength: number = 0;
pageModel: PageModel = new PageModel();
@Prop loadImg: boolean = true;
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
// this.loadImg = await onlyWifiLoadImg();
... ... @@ -134,6 +136,10 @@ export struct CardAdvGanMiComponent {
this.commonButton()
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.width(CommonConstants.FULL_WIDTH)
.padding({
top: $r('app.float.card_comp_pagePadding_tb'),
... ...
... ... @@ -22,6 +22,7 @@ export struct CardAdvLongImageComponent {
@State haveTitle: boolean = true
pageModel: PageModel = new PageModel();
@Prop loadImg: boolean = true;
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
// this.loadImg = await onlyWifiLoadImg();
... ... @@ -55,6 +56,10 @@ export struct CardAdvLongImageComponent {
top: 8,
})
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.width(CommonConstants.FULL_WIDTH)
.padding({
left: 10,
... ...
... ... @@ -24,6 +24,7 @@ export struct CardAdvSmallImageComponent {
@State isBigThreeLine: boolean = false // 标题的行数大于等于3行 是true
pageModel: PageModel = new PageModel();
@Prop loadImg: boolean = true;
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
// this.loadImg = await onlyWifiLoadImg();
... ... @@ -85,6 +86,10 @@ export struct CardAdvSmallImageComponent {
})
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.width("100%")
.height(this.isBigThreeLine ? 127 : 106)
.padding({
... ...
... ... @@ -21,6 +21,7 @@ export struct CardAdvThreeImageComponent {
@State compDTO: CompDTO = {} as CompDTO
@Prop loadImg: boolean = true;
pageModel: PageModel = new PageModel();
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
// this.loadImg = await onlyWifiLoadImg();
... ... @@ -78,6 +79,10 @@ export struct CardAdvThreeImageComponent {
})
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.width(CommonConstants.FULL_WIDTH)
.padding({
left: 10,
... ...
... ... @@ -23,6 +23,7 @@ export struct CardAdvVideoComponent {
@State contentDTO: ContentDTO = new ContentDTO()
@Prop loadImg: boolean = true;
pageModel: PageModel = new PageModel();
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
// this.loadImg = await onlyWifiLoadImg();
... ... @@ -61,6 +62,10 @@ export struct CardAdvVideoComponent {
top: 8,
})
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.width(CommonConstants.FULL_WIDTH)
.padding({
left: 10,
... ...
... ... @@ -23,6 +23,7 @@ export struct CardAdvVideoExComponent {
@State advExtraData: AdvExtraData = {} as AdvExtraData
pageModel: PageModel = new PageModel();
@Prop loadImg: boolean = true;
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
// this.loadImg = await onlyWifiLoadImg();
... ... @@ -84,6 +85,10 @@ export struct CardAdvVideoExComponent {
this.commonButton()
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.width(CommonConstants.FULL_WIDTH)
.padding({
left: 10,
... ...
... ... @@ -31,6 +31,7 @@ export struct Card10Component {
basePageHelp: BasePageHelp = new BasePageHelp
// 稿件参与批查,需要对列表信息单独重绘
@State isBatchData: boolean = false
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
console.log('Card10Component-compDTO', JSON.stringify(this.compDTO))
... ... @@ -173,6 +174,10 @@ export struct Card10Component {
})
}
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.width(CommonConstants.FULL_WIDTH)
.padding({
left: 10,
... ...
... ... @@ -25,6 +25,7 @@ export struct Card11Component {
@ObjectLink compDTO: CompDTO
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
this.titleInit();
... ... @@ -95,6 +96,10 @@ export struct Card11Component {
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.backgroundColor($r("app.color.white"))
.onClick((event: ClickEvent) => {
///我的收藏 编辑状态点击
... ...
... ... @@ -24,6 +24,7 @@ export struct Card12Component {
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
@Prop loadImg: boolean = true;
@State compIndex: number = 0;
aboutToAppear(): void {
this.titleInit();
... ... @@ -78,6 +79,10 @@ export struct Card12Component {
}
CarderInteraction({contentDTO: this.contentDTO})
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.padding({
left: 10,
right: 10,
... ...
... ... @@ -25,6 +25,7 @@ export struct Card14Component {
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
this.titleInit();
... ... @@ -99,6 +100,10 @@ export struct Card14Component {
//TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.padding({
left: 10,
right: 10,
... ...
... ... @@ -29,6 +29,7 @@ export struct Card15Component {
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
this.titleInit();
... ... @@ -97,6 +98,10 @@ export struct Card15Component {
CarderInteraction({contentDTO: this.contentDTO})
//TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.padding({
left: 10,
right: 10,
... ...
... ... @@ -31,6 +31,7 @@ export struct Card16Component {
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
this.titleInit();
... ... @@ -130,6 +131,10 @@ export struct Card16Component {
CarderInteraction({contentDTO: this.contentDTO})
//TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.padding({
left: 10,
right: 10,
... ...
... ... @@ -26,6 +26,7 @@ export struct Card17Component {
@ObjectLink compDTO: CompDTO
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
console.log('Card17Component', JSON.stringify(this.contentDTO))
... ... @@ -151,6 +152,10 @@ export struct Card17Component {
// 评论等信息
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO, viewShowData: false })
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.padding({
left: 10,
right: 10,
... ...
... ... @@ -25,6 +25,7 @@ export struct Card19Component {
@State textArr: textItem[] = []
@Prop loadImg: boolean = true;
isPeopleShipHome: boolean = false;
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
this.titleInit();
... ... @@ -89,6 +90,10 @@ export struct Card19Component {
CarderInteraction({ contentDTO: this.contentDTO })
//TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.padding({
left: 10,
right: 10,
... ...
... ... @@ -28,6 +28,7 @@ export struct Card20Component {
@State textArr: textItem[] = []
@Prop loadImg: boolean = true;
isPeopleShipHome: boolean = false;
@State compIndex: number = 0;
aboutToAppear(): void {
this.titleInit();
... ... @@ -109,6 +110,10 @@ export struct Card20Component {
CarderInteraction({contentDTO: this.contentDTO})
//TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.padding({
left: 10,
right: 10,
... ...
... ... @@ -25,6 +25,7 @@ export struct Card21Component {
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
this.titleInit();
... ... @@ -110,6 +111,10 @@ export struct Card21Component {
persistentStorage(this.contentDTO.objectId);
ProcessUtils.processPage(this.contentDTO)
})
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.padding({
left: 10,
right: 10,
... ...
... ... @@ -31,6 +31,7 @@ export struct Card2Component {
@ObjectLink compDTO: CompDTO
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
this.titleInit();
... ... @@ -126,6 +127,10 @@ export struct Card2Component {
// 评论等信息
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.padding({
left: 10,
right: 10,
... ...
... ... @@ -24,6 +24,7 @@ export struct Card3Component {
@ObjectLink compDTO: CompDTO
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
this.titleInit();
... ... @@ -84,6 +85,10 @@ export struct Card3Component {
// 评论等信息
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.padding({
left: 10,
right: 10,
... ...
... ... @@ -30,6 +30,7 @@ export struct Card4Component {
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
@ObjectLink compDTO: CompDTO
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
const curRouter = router.getState().name;
... ... @@ -147,6 +148,10 @@ export struct Card4Component {
//bottom 评论等信息
CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO })
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.padding({
left: 10,
right: 10,
... ...
... ... @@ -25,6 +25,7 @@ export struct Card5Component {
@State clicked: boolean = false;
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
// console.log(TAG, JSON.stringify(this.compDTO),this.contentDTO.titleShow)
... ... @@ -139,6 +140,10 @@ export struct Card5Component {
}
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.alignContent(Alignment.Bottom)
.padding({
left: 10,
... ...
... ... @@ -27,6 +27,7 @@ export struct Card6Component {
@State textArr: textItem[] = []
@ObjectLink compDTO: CompDTO
@State contentDTO: ContentDTO = new ContentDTO();
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
console.log('Card6Component', JSON.stringify(this.contentDTO))
... ... @@ -128,6 +129,10 @@ export struct Card6Component {
}
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.onClick((event: ClickEvent) => {
///我的收藏 编辑状态点击
if (this.compDTO.isCollectionEditting) {
... ...
... ... @@ -28,6 +28,7 @@ export struct Card9Component {
pageShowTime:number = 0;
pageHideTime:number = 0;
@State hideDetail: boolean = false;
@State compIndex: number = 0;
onPageShow() {
this.pageShowTime = DateTimeUtils.getTimeStamp()
... ... @@ -154,6 +155,10 @@ export struct Card9Component {
.justifyContent(FlexAlign.Center)
}
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.width(CommonConstants.FULL_WIDTH)
.padding({
top: 14,
... ...
... ... @@ -24,6 +24,7 @@ export struct LiveBigImage01Component {
index: number = 0
@State isLoadingAttention: boolean = false
@State curRouter: string = ''
@State compIndex: number = 0;
async aboutToAppear() {
const curRouter = router.getState().name;
... ... @@ -153,7 +154,10 @@ export struct LiveBigImage01Component {
.justifyContent(FlexAlign.SpaceBetween)
}
.borderRadius(4)
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.backgroundColor(Color.White)
.width('calc(100% - 24vp)')
.margin({
... ...
... ... @@ -20,6 +20,8 @@ export struct LiveBigImage02Component {
@Prop loadImg: boolean = true;
@State clicked: boolean = false;
index: number = 0
@State compIndex: number = 0;
async aboutToAppear() {
const curRouter = router.getState().name;
this.clicked = hasClicked(this.contentDTO.objectId,curRouter)
... ... @@ -85,6 +87,10 @@ export struct LiveBigImage02Component {
.margin({ top: 8, bottom: 8 })
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.width('100%')
.padding({
left: $r('app.float.card_comp_pagePadding_lf'),
... ...
... ... @@ -16,6 +16,7 @@ const TAG: string = 'More_Comp';
export struct MoreComponent {
@State contentDTO: ContentDTO = new ContentDTO();
@State showDetail: boolean = false;
@Prop nextIsAggregateData: boolean = false;
aboutToAppear(): void {
this.dealSearchSameList()
... ... @@ -24,6 +25,7 @@ export struct MoreComponent {
build() {
if (this.showDetail) {
Column(){
ForEach(this.contentDTO.sameContentList, (item: ContentDTO, index: number) => {
if (item.appStyle !== "9") {
CardParser({compDTO:new CompDTO, contentDTO: item ,isNeedDivider:index === this.contentDTO.sameContentList.length -1 ? false:true})
... ... @@ -43,14 +45,17 @@ export struct MoreComponent {
}
})
if(!this.nextIsAggregateData){
Divider()
.width('100%' )
.color($r('app.color.color_F5F5F5'))
.strokeWidth(5)
}
}
} else {
Column(){
Column() {
Row() {
... ... @@ -72,12 +77,13 @@ export struct MoreComponent {
}
.padding({left: 10 + 6 , right: 10 + 6})
}
if(!this.nextIsAggregateData){
Divider()
.width('100%' )
.color($r('app.color.color_F5F5F5'))
.strokeWidth(5)
}
}
... ...
... ... @@ -23,6 +23,7 @@ export struct SearchContentComponent {
@Prop loadImg: boolean = true;
@State clicked: boolean = false;
@State textArr: textItem[] = []
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
... ... @@ -79,6 +80,10 @@ export struct SearchContentComponent {
//bottom 评论等信息
CardSourceInfo({compDTO:new CompDTO, contentDTO: this.contentDTO })
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.padding({
left: 10,
right: 10,
... ...
... ... @@ -13,7 +13,7 @@ import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
@Component
export struct CompNormalTitle {
@State compDTO: CompDTO = new CompDTO
@State compIndex: number = 0;
aboutToAppear() {
}
... ... @@ -41,6 +41,10 @@ export struct CompNormalTitle {
})
.backgroundColor(0xffffff)
.width(CommonConstants.FULL_WIDTH)
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
}
}
... ...
... ... @@ -57,6 +57,7 @@ export struct ZhCarouselLayout01 {
@Prop loadImg: boolean = true;
private data: MyDataSource = new MyDataSource([])
@State compIndex: number = 0;
watchCurrentBreakpoint() {
Logger.info(TAG, `watchCurrentBreakpoint, this.currentBreakpoint: ${this.currentBreakpoint}`);
... ... @@ -177,6 +178,10 @@ export struct ZhCarouselLayout01 {
})
.backgroundColor(0xffffff)
.width(CommonConstants.FULL_WIDTH)
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
} else {
CarouselLayout01CardView({
item: this.filterAtv()[0],
... ...
... ... @@ -19,6 +19,7 @@ export struct ZhGridLayout02NewsContent {
@ObjectLink compDTO: CompDTO
@State operDataList: ContentDTO[] = []
@Prop loadImg: boolean = true;
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
... ... @@ -46,7 +47,10 @@ export struct ZhGridLayout02NewsContent {
})
.backgroundColor(0xffffff)
.width(CommonConstants.FULL_WIDTH)
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
}
@Builder
... ...
... ... @@ -20,6 +20,7 @@ export struct ZhGridLayout03 {
@State pageName: string = '';
@State compDTO: CompDTO = {} as CompDTO
@Prop loadImg: boolean = true;
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
if (this.compDTO.operDataList) {
... ... @@ -46,6 +47,10 @@ export struct ZhGridLayout03 {
})
.backgroundColor(0xffffff)
.width('100%')
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
}
/**
... ...
... ... @@ -18,6 +18,7 @@ export struct ZhSingleColumn04 {
// {newsTitle: "民检普法课堂:正当防卫是什么正当防卫是什么正当防卫是什么正当防卫是什么?", tagWord: 1} as ContentDTO,
// {newsTitle: "审批站”进菜市场 学才艺有云课堂", tagWord: 2} as ContentDTO,
]
@State compIndex: number = 0;
aboutToAppear() {
this.operDataList = this.compDTO.operDataList;
... ... @@ -44,6 +45,10 @@ export struct ZhSingleColumn04 {
})
}
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.padding({
left: 10,
right: 10,
... ...
... ... @@ -279,6 +279,10 @@ export struct ZhSingleColumn09 {
.borderRadius(3)
.justifyContent(FlexAlign.SpaceBetween)
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.padding({
left: 10,
right: 10,
... ...
... ... @@ -24,6 +24,7 @@ export struct ZhSingleRow02 {
@State moreWidth:number = 22
@State moreTips: string = ''
scroller: Scroller = new Scroller()
@State compIndex: number = 0;
resetMoreTips() {
if (this.moreWidth < this.initMoreWidth * 2) {
... ... @@ -163,6 +164,10 @@ export struct ZhSingleRow02 {
.backgroundColor(0xffffff)
.width('102%')
.margin({ bottom: 8, left: -6 })
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
}
@Builder
... ...
... ... @@ -47,6 +47,7 @@ export struct ZhSingleRow03 {
@State moreTips: string = ''
scroller: Scroller = new Scroller()
@Consume @Watch('pageShowForUpdateData') pageShow :number
@State compIndex: number = 0;
resetMoreTips() {
console.log('resetMoreTips', this.moreWidth, this.initMoreWidth)
... ... @@ -269,6 +270,10 @@ export struct ZhSingleRow03 {
})
.backgroundColor(0xffffff)
.width('100%')
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
}
@Builder
... ...
... ... @@ -16,6 +16,7 @@ export struct ZhSingleRow04 {
@State pageName: string = '';
@State compDTO: CompDTO = {} as CompDTO
bottomNavi:BottomNavi = BottomNavi.PEOPLE
@State compIndex: number = 0;
build() {
Column() {
... ... @@ -105,6 +106,10 @@ export struct ZhSingleRow04 {
})
.backgroundColor(0xffffff)
.width('100%')
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
}
}
... ...
... ... @@ -27,6 +27,7 @@ export struct ZhSingleRow06 {
likeStatus: '0'
} as batchLikeAndCollectResult // 点赞、收藏状态
@Prop loadImg: boolean = true;
@State compIndex: number = 0;
async aboutToAppear(): Promise<void> {
console.log('Zh_Single_Row-06', JSON.stringify(this.compDTO.operDataList[0]?.commentInfo))
... ... @@ -184,6 +185,10 @@ export struct ZhSingleRow06 {
.onClick(() => {
InfomationCardClick.track(this.compDTO, this.compDTO.operDataList[0], this.pageId, this.pageName)
})
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
}
@Builder
... ...
import { BottomNavi, CommonConstants, ViewType } from 'wdConstant';
import { BottomNavi, CommonConstants, CompStyle, ViewType } from 'wdConstant';
import { EmitterEventId, EmitterUtils, Logger, NetworkUtil } from 'wdKit';
import { EmptyComponent, WDViewDefaultType } from '../view/EmptyComponent';
import PageModel from '../../viewmodel/PageModel';
... ... @@ -132,8 +132,16 @@ export struct PageComponent {
}
)
}
}
}.margin({
left: compDTO.compStyle === CompStyle.Zh_Single_Row_04 ? 0 : 6,
right: (compDTO.compStyle === CompStyle.Zh_Single_Row_05 || compDTO.compStyle === CompStyle.Zh_Single_Row_02 ||
compDTO.compStyle === CompStyle.Zh_Single_Row_04) ? 0 : 6
})
.grayscale(this.isMourning && compIndex < 8 ? 1 : 0)
.borderRadius({
topLeft:compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:compIndex === 0 ? $r('app.float.image_border_radius'):0
})
},
(compDTO: CompDTO, compIndex: number) => JSON.stringify(compDTO))
... ...
... ... @@ -171,7 +171,6 @@ export struct SearchComponent {
SearchHotsComponent({
onGetSearchRes: (item): void => this.getSearchHotResData(item),
percent: this.percent
})
}
}
... ... @@ -179,7 +178,7 @@ export struct SearchComponent {
.scrollBar(BarState.Off)
.width('100%')
.height('100%')
.padding({ left: `${this.calcHeight(31)}lpx`, right: `${this.calcHeight(31)}lpx` })
.padding({ left: 16, right: 16 })
} else {
if (this.hasChooseSearch) {
//搜索结果
... ...
... ... @@ -10,7 +10,6 @@ const TAG = "SearchHotsComponent"
export struct SearchHotsComponent{
@State searchHotsData:SearchHotContentItem[] = []
onGetSearchRes?: (item:string) => void;
@Prop percent:number = 1
aboutToAppear(){
//获取搜索热词
... ... @@ -35,22 +34,21 @@ export struct SearchHotsComponent{
if(this.searchHotsData.length>0){
Row() {
Image($r('app.media.search_hot_icon'))
.width(`${this.calcHeight(46)}lpx`)
.height(`${this.calcHeight(46)}lpx`)
.width(24)
.height(24)
.objectFit(ImageFit.Auto)
.margin({right:`${this.calcHeight(8)}lpx`})
.margin({right:4})
.interpolation(ImageInterpolation.Medium)
Text("热门搜索")
.textAlign(TextAlign.Center)
.fontWeight(FontWeight.Bold)
.fontSize(`${this.calcHeight(33)}lpx`)
.lineHeight(`${this.calcHeight(46)}lpx`)
.fontSize(17)
.fontColor($r('app.color.color_222222'))
.height(`${this.calcHeight(46)}lpx`)
.height(24)
}
.width('100%')
.margin({bottom:`${this.calcHeight(15)}lpx`})
.margin({bottom:8})
}
List(){
... ... @@ -61,49 +59,47 @@ export struct SearchHotsComponent{
Row(){
if(item.sequence <=3){
Image(item.sequence===1?$r('app.media.search_hot_num1'):item.sequence===2?$r('app.media.search_hot_num2'):$r('app.media.search_hot_num3'))
.width(`${this.calcHeight(27)}lpx`)
.height(`${this.calcHeight(35)}lpx`)
.width(14)
.height(18)
.objectFit(ImageFit.Auto)
.margin({right:`${this.calcHeight(12)}lpx`})
.margin({right:6})
.interpolation(ImageInterpolation.High)
}else {
Text(`${item.sequence}`)
.height(`${this.calcHeight(31)}lpx`)
.height(16)
.fontColor($r('app.color.color_666666'))
.fontSize(`${this.calcHeight(27)}lpx`)
.fontSize(14)
.fontWeight(FontWeight.Regular)
.lineHeight(`${this.calcHeight(31)}lpx`)
.margin({right:`${this.calcHeight(12)}lpx`})
.margin({right:6})
}
Text(`${item.hotEntry}`)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.fontColor($r('app.color.color_222222'))
.fontSize(`${this.calcHeight(31)}lpx`)
.fontSize(16)
.maxLines(1)
.fontWeight(FontWeight.Regular)
.lineHeight(`${this.calcHeight(42)}lpx`)
}.layoutWeight(1)
if(item.mark===1 || item.mark===2){
Image(item.mark===1?$r('app.media.search_hots_mark1'):$r('app.media.search_hots_mark2'))
.width(`${this.calcHeight(42)}lpx`)
.height(`${this.calcHeight(31)}lpx`)
.width(22)
.height(16)
.objectFit(ImageFit.Auto)
.interpolation(ImageInterpolation.High)
}
}.alignItems(VerticalAlign.Center)
.height(`${this.calcHeight(84)}lpx`)
.height(44)
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
if(index != this.searchHotsData.length-1 ){
Divider()
.width('100%')
.height(`${this.calcHeight(1)}lpx`)
.height(1)
.color($r('app.color.color_F5F5F5'))
.strokeWidth(`${this.calcHeight(1)}lpx`)
.strokeWidth(1)
}
}.height(`${this.calcHeight(85)}lpx`)
}.height(45)
.width('100%')
.alignItems(HorizontalAlign.Start)
}
... ... @@ -118,10 +114,7 @@ export struct SearchHotsComponent{
}).layoutWeight(1)
}.width('100%')
.height('100%')
.margin({top:`${this.calcHeight(46)}lpx`})
.margin({top:24})
}
calcHeight(value:number): number{
return value * this.percent
}
}
\ No newline at end of file
... ...
... ... @@ -317,8 +317,17 @@ export struct SearchResultContentComponent {
ActivityItemComponent({ contentDTO: item })
.padding({left: 6, right: 6})
} else if (item.sameContentListSize > 0) {
MoreComponent({ contentDTO: item })
MoreComponent({ contentDTO: item ,
nextIsAggregateData:(index+1 < this.data.totalCount() && this.data.get(index+1).isAggregateData)})
} else if (item.appStyle == "9") {
Column(){
if(item.isAggregateData && index != 0){
Divider()
.width('100%' )
.color($r('app.color.color_F5F5F5'))
.strokeWidth(5)
}
Column() {
Card9Component({
compDTO: new CompDTO,
... ... @@ -329,10 +338,20 @@ export struct SearchResultContentComponent {
Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
}
.padding({left: 6, right: 6})
}
} else {
CardParser({ compDTO: new CompDTO, contentDTO: item })
Column(){
if(item.isAggregateData && index != 0){
Divider()
.width('100%' )
.color($r('app.color.color_F5F5F5'))
.strokeWidth(5)
}
CardParser({ compDTO: new CompDTO, contentDTO: item ,isNeedDivider: (index+1 < this.data.totalCount() && this.data.get(index+1).isAggregateData) ? false : true})
.padding({left: 6, right: 6})
}
}
}
}
}, (item: ContentDTO, index: number) => index.toString())
... ... @@ -564,6 +583,7 @@ export struct SearchResultContentComponent {
contentDTO.shareFlag = value.data.shareFlag
contentDTO.contentText = value.data.contentText
contentDTO.author = value.data.author
contentDTO.isAggregateData = (value.data.sameContentList != null && value.data.sameContentList.length > 0)
return contentDTO;
}
... ...
... ... @@ -14,6 +14,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
@State moreWidth:number = 22
@State moreTips: string = ''
scroller: Scroller = new Scroller()
@State compIndex: number = 0;
resetMoreTips() {
console.log('resetMoreTips', this.moreWidth, this.initMoreWidth)
... ... @@ -208,6 +209,10 @@ export struct HorizontalStrokeCardThreeTwoRadioForMoreComponent {
left: this.compDTO.operDataList.length >= 2 ? -6 : 0,
bottom: 8
})
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
}
private jumpToLiveMorePage() {
... ...
... ... @@ -12,6 +12,7 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
@State pageName: string = '';
@State compDTO: CompDTO = {} as CompDTO
@State clicked: boolean = false;
@State compIndex: number = 0;
build() {
Column() {
... ... @@ -77,6 +78,10 @@ export struct HorizontalStrokeCardThreeTwoRadioForOneComponent {
this.clicked = true;
ProcessUtils.processPage(this.compDTO?.operDataList[0])
})
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
}
showMore() {
... ...
... ... @@ -12,6 +12,7 @@ const TAG = 'LabelComponent';
@Component
export struct LabelComponent {
@State compDTO: CompDTO = {} as CompDTO
@State compIndex: number = 0;
build() {
Row() {
... ... @@ -28,6 +29,10 @@ export struct LabelComponent {
.maxLines(1)// .backgroundColor(Color.Yellow)
.textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。
}
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.width(CommonConstants.FULL_PARENT)
.justifyContent(FlexAlign.Start)
}
... ...
... ... @@ -22,93 +22,21 @@ export struct LiveHorizontalCardComponent {
@State moreWidth:number = 22
@State moreTips: string = ''
scroller: Scroller = new Scroller()
@State compIndex: number = 0;
@State ellipseW: number = 0
@State isEnd: boolean = false
@State listLeft: number = 0
resetMoreTips() {
console.log('resetMoreTips', this.moreWidth, this.initMoreWidth)
if (this.moreWidth < this.initMoreWidth * 2) {
this.moreTips = '查看更多';
}
}
edgeAnimation() {
if (this.moreWidth < this.initMoreWidth * 3) {
if (!this.moreTips) {
this.moreTips = '查看更多';
}
this.moreWidth = this.moreWidth + 2
}
if (this.moreWidth > this.initMoreWidth * 2) {
this.moreTips = '松手查看';
} else {
}
}
reverseEdgeAnimation() {
if (this.moreWidth > this.initMoreWidth) {
this.moreWidth = this.moreWidth - 2
}
this.resetMoreTips()
}
resetEdgeAnimation() {
if (this.moreWidth > this.initMoreWidth) {
this.moreWidth = 22
}
this.resetMoreTips()
}
toMore() {
if (this.moreWidth > this.initMoreWidth * 2) {
this.liveToMore();
}
}
liveToMore() {
ProcessUtils.compJumpPage(this.compDTO)
return;
if (!!this.compDTO.dataSourceType) {
if (this.compDTO.linkUrl) {
let taskAction: Action = {
type: 'JUMP_INNER_NEW_PAGE',
params: {
url: this.compDTO.linkUrl,
pageID: 'SPACIAL_TOPIC_PAGE',
contentID: this.compDTO.objectId,
extra: {
relId: this.compDTO.relId,
relType: this.compDTO.relType,
pageId: this.compDTO.pageId
}
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
} else {
this.jumpToLiveMorePage()
}
} else {
if (this.compDTO?.objectType === '11') {
} else {
const contentDTO: ContentDTO = {
objectId: this.compDTO.objectId,
objectType: this.compDTO.objectType,
linkUrl: this.compDTO.linkUrl,
pageId: this.compDTO.pageId
} as ContentDTO
ProcessUtils.processPage(contentDTO)
}
}
}
async aboutToAppear(): Promise<void> {
// this.loadImg = await onlyWifiLoadImg();
}
showMore() {
return (!!this.compDTO.dataSourceType && this.compDTO.dataSourceType !== 'OBJECT_POS') || !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')
}
build() {
Column() {
Row() {
... ... @@ -192,31 +120,30 @@ export struct LiveHorizontalCardComponent {
}
})
})
}
}.offset({ left: this.listLeft })
if (this.compDTO.operDataList.length >= 2 && this.showMore()) {
Row() {
Ellipse()
.width(2* (this.moreWidth - this.initMoreWidth - 1))
.width(2 * this.ellipseW)
.height('100%')
.fill(0xe9e9e9)
.position({ left: -(this.moreWidth - this.initMoreWidth - 3) * 0.8 , top: 0 })
.fill('rgb(240,235,238)')
.position({ left: -this.ellipseW, top: 0 })
Column() {
if (this.moreWidth > this.initMoreWidth + 2) {
Text(this.moreTips)
.fontSize(9)
.fontColor(0x858585)
.width(8)
}
Text(this.ellipseW === 0 ? '' : this.ellipseW < 20 ? '查看更多' : '松手查看')
.width('19lpx')
.fontSize('19lpx')
.fontWeight('400lpx')
.lineHeight('27lpx')
.fontColor("#9E9E9E")
}
.justifyContent(FlexAlign.Center)
.align(Alignment.Center)
.height('100%')
.width(this.initMoreWidth)
.backgroundColor(0xe9e9e9)
.borderRadius({ topLeft: 5, bottomLeft: 5 })
.width(this.moreWidth)
.backgroundColor("#EDEDED")
.justifyContent(FlexAlign.Center)
}
.margin({left: 1.5 * (this.moreWidth - this.initMoreWidth)})
.height('100%')
}
}
}
... ... @@ -225,24 +152,43 @@ export struct LiveHorizontalCardComponent {
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
.onReachEnd(() => {
this.edgeAnimation()
this.isEnd = true
})
.onScrollStop(() => {
// this.resetEdgeAnimation();
.onScrollFrameBegin((offset: number, state: ScrollState) => {
if (!this.scroller.isAtEnd()) {
this.isEnd = false
}
if (this.ellipseW > 0) {
return { offsetRemain: 0 }
}
return { offsetRemain: offset }
})
.onScroll((xOffset: number, yOffset: number) => {
if (xOffset < 0) {
this.reverseEdgeAnimation();
.parallelGesture(
PanGesture({ direction: PanDirection.Horizontal, distance: 1 })
.onActionStart((event: GestureEvent) => {
})
.onActionUpdate((event: GestureEvent) => {
if(this.compDTO.operDataList.length >= 2 && this.showMore()){
if (event && this.isEnd) {
// console.log('event.offsetX',event.offsetX)
this.listLeft = event.offsetX < -60 ? -60 : event.offsetX > 0 ? 0 : event.offsetX
this.ellipseW = (-this.listLeft) / 1.5
}
}
})
.onTouch((event?: TouchEvent) => {
if(event) {
if (event.type === TouchType.Up) {
this.toMore();
this.resetEdgeAnimation();
.onActionEnd((event: GestureEvent) => {
if(this.compDTO.operDataList.length >= 2 && this.showMore()){
this.listLeft = 0
// this.moreWidth = 20
if (event.offsetX < 0 && this.ellipseW >= 20) {
this.liveToMore();
}
this.ellipseW = 0
}
})
)
.width(CommonConstants.FULL_WIDTH)
.height(this.compDTO.operDataList.length == 2 ? 167 : 134)
} else if (this.compDTO.operDataList.length) {
... ... @@ -267,6 +213,10 @@ export struct LiveHorizontalCardComponent {
.margin({
left: this.compDTO.operDataList.length >= 2 ? -6 : 0
})
.borderRadius({
topLeft:this.compIndex === 0 ? $r('app.float.image_border_radius'):0,
topRight:this.compIndex === 0 ? $r('app.float.image_border_radius'):0
})
.backgroundColor($r("app.color.white"))
}
... ...
... ... @@ -7,6 +7,7 @@ import { OtherHomePageBottomCommentComponent } from '../components/mine/home/Oth
import { OtherHomePageBottomFollowComponent } from '../components/mine/home/OtherHomePageBottomFollowComponent';
import { CustomTitleUI } from '../components/reusable/CustomTitleUI';
import { EmptyComponent } from '../components/view/EmptyComponent';
import { UserGradeTextSpan } from '../components/view/UserGradeTextSpan';
import MinePageDatasModel from '../model/MinePageDatasModel';
import { OtherUserDetailRequestItem } from '../viewmodel/OtherUserDetailRequestItem';
... ... @@ -110,6 +111,12 @@ struct OtherNormalUserHomePage {
Column() {
Row() {
UserGradeTextSpan({nameContent:`${this.userName}`,gradeContent:`等级${this.levelId}`,gradeWidth:this.levelId >9 ? 50 : 45})
}.constraintSize({maxWidth:`calc(100% - 16vp - 90vp)`})
.padding({top:8})
/*Row() {
Text(`${this.userName}`)
.fontColor($r('app.color.white'))
.maxLines(1)
... ... @@ -130,7 +137,7 @@ struct OtherNormalUserHomePage {
.height('35lpx')
}
Blank()
}.width('507lpx')
}.width('507lpx')*/
Row() {
Row() {
... ...
... ... @@ -114,10 +114,9 @@ struct OneKeyLoginPage {
this.loginButton()
Text("账号密码登录")
Text("其它手机号登录")
.fontColor("#666666")
.height(26)
.width(100)
.margin({top: 20})
.onClick(() => {
router.replaceUrl({url: WDRouterPage.loginPage.url()})
... ... @@ -128,31 +127,6 @@ struct OneKeyLoginPage {
.padding({top: `${this.topSafeHeight}px`})
}
// @Builder loginButton() {
// Column() {
// LoginWithHuaweiIDButton({
// params: {
// // LoginWithHuaweiIDButton支持的样式。
// style: loginComponentManager.Style.BUTTON_CUSTOM,
// // LoginWithHuaweiIDButton的边框圆角半径。
// borderRadius: 4,
// // LoginWithHuaweiIDButton支持的登录类型。
// loginType: loginComponentManager.LoginType.QUICK_LOGIN,
// // LoginWithHuaweiIDButton支持按钮的样式跟随系统深浅色模式切换。
// supportDarkMode: true,
// customButtonParams: {
// fontColor: loginComponentManager.FontColor.WHITE,
// // backgroundColor:!this.agreeProtocol ? "#60ED2800" : "#ED2800"
// backgroundColor:"#ED2800"
// }
// },
// controller: this.controller
// })
// }
// .backgroundColor("#ED2800")
// .height(48)
// .margin({ top: 20 ,left: 25, right: 25 })
// }
@Builder loginButton() {
Row() {
... ...