王士厅
... ... @@ -45,7 +45,9 @@ export struct CompParser {
aboutToAppear(): void {
console.log('CompParser-compDTO', JSON.stringify(this.compDTO))
console.log('CompParser', JSON.stringify(this.compDTO))
this.pageName = this.pageModel.pageInfo.name
// 轮播图屏蔽音频类型稿件
if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
... ... @@ -79,11 +81,13 @@ export struct CompParser {
@Builder
componentBuilder() {
//CardParser({ contentDTO: this.compDTO.operDataList[0], compDTO:this.compDTO })
if (this.compDTO.operDataList[0]?.objectType !== '3' &&
this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口
if (this.compDTO.compStyle === CompStyle.Label_03) {
LabelComponent({ compDTO: this.compDTO })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} 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 })
... ... @@ -100,7 +104,7 @@ export struct CompParser {
} else {
HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
}
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) {
ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
... ... @@ -117,27 +121,38 @@ export struct CompParser {
} else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) {
ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) {
ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) {
// ZhSingleRow05({ compDTO })
// Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) {
ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
//头图卡 和comStyle 2相同,
Card5Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], titleShowPolicy: this.compDTO.titleShowPolicy, pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 })
Card5Component({
compDTO: this.compDTO,
contentDTO: this.compDTO.operDataList[0],
titleShowPolicy: this.compDTO.titleShowPolicy,
pageId: this.pageId,
pageName: this.pageName
})
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) {
// 大图卡
Card2Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (this.compDTO.compStyle === CompStyle.Card_09) {
//时间链卡
Card9Component({ compDTO: this.compDTO, contentDTO:this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName })
Card9Component({
compDTO: this.compDTO,
contentDTO:this.compDTO.operDataList[0],
pageId: this.pageId,
pageName: this.pageName
})
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if(this.compDTO.compStyle === CompStyle.Card_13){
Card6Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName })
... ... @@ -152,8 +167,6 @@ export struct CompParser {
// ZhSingleColumn05({ compDTO: compDTO })
// Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
} else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) {
// Divider().strokeWidth(3).color('#ffffff').padding({ left: 0, right: 0 }).margin({ top: -3 })
// Divider().strokeWidth(6).color('#f5f5f5')
ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
} else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告
... ...
... ... @@ -40,6 +40,10 @@ export struct FeedBackActivity {
@State pics: PhotoListBean[] = [this.addPic] as PhotoListBean[]
@State toastText:ResourceStr = ""
// @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@Provide topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
dialogToast: CustomDialogController = new CustomDialogController({
builder: CustomToast({
bgColor:$r("app.color.color_B3000000"),
... ... @@ -60,6 +64,7 @@ export struct FeedBackActivity {
build() {
Column() {
Blank().height(`${this.topSafeHeight}px`)
//标题栏目
CustomTitleUI({ titleName: $r('app.string.feedback') })
Stack({ alignContent: Alignment.Bottom }) {
... ... @@ -285,7 +290,7 @@ export struct FeedBackActivity {
.height(CommonConstants.FULL_HEIGHT)
.scrollBar(BarState.Off)
.alignSelf(ItemAlign.Start)
.padding({ bottom: 44 })
.padding({ bottom: 64+64 })
Column(){
Text($r('app.string.submit'))
.textAlign(TextAlign.Center)
... ... @@ -301,10 +306,9 @@ export struct FeedBackActivity {
}
this.reportCommit()
})
.margin({bottom:64})
.margin({bottom:64+64})
}
}
// .margin({bottom:64})
}
.backgroundColor($r('app.color.color_fff'))
}
... ...
... ... @@ -7,6 +7,7 @@ import { Notes } from './notes';
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
import { InfomationCardClick } from '../../utils/infomationCardClick'
import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed';
import router from '@ohos.router'
/**
* 大专题卡--CompStyle: 10
... ... @@ -23,10 +24,19 @@ export struct Card10Component {
@ObjectLink compDTO: CompDTO
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
@State hideDetail: boolean = false;
async aboutToAppear(): Promise<void> {
this.titleInit();
this.loadImg = await onlyWifiLoadImg();
this.initHideDetail();
}
initHideDetail() {
const curRouter = router.getState().name;
if (curRouter === 'MyCollectionListPage') {
this.hideDetail = true;
}
}
titleInit() {
... ... @@ -83,19 +93,21 @@ export struct Card10Component {
}.alignContent(Alignment.BottomStart)
// 专题列表--后端返回三个,
Column() {
ForEach(this.contentDTO.slideShows, (item: slideShows, index: number) => {
this.timelineItem(item, index)
if (index < this.contentDTO.slideShows.length - 1) {
// 在不是最后一个元素的情况下添加分隔符
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 });
}
})
if (!this.hideDetail) {
Column() {
ForEach(this.contentDTO.slideShows, (item: slideShows, index: number) => {
this.timelineItem(item, index)
if (index < this.contentDTO.slideShows.length - 1) {
// 在不是最后一个元素的情况下添加分隔符
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 });
}
})
}
}
// 底部-查看更多。根据接口返回的isMore判断是否显示查看更多
if (this.contentDTO.hasMore == 1) {
if (this.contentDTO.hasMore == 1 && !this.hideDetail) {
Row() {
Text("查看更多")
.fontSize($r("app.float.font_size_14"))
... ...
... ... @@ -32,6 +32,7 @@ let preferenceTheme: dataPreferences.Preferences | null = null
struct LiveMorePage {
@State data: LazyDataSource<ContentDTO> = new LazyDataSource();
topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number;
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
type: number = 1;
pageSize: number = 20;
operDataList: ContentDTO[] = [];
... ... @@ -100,6 +101,7 @@ struct LiveMorePage {
right: $r('app.float.card_comp_pagePadding_lf'),
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.margin({bottom:px2vp(this.bottomSafeHeight)})
.onClick(() => {
ProcessUtils.processPage(this.contentDTO)
})
... ... @@ -244,6 +246,7 @@ struct LiveMorePage {
})
}
.height(44)
.margin({top:this.topSafeHeight+'px'})
.width('100%')
}
... ...
... ... @@ -306,9 +306,10 @@ struct ReserveMorePage {
middle: { anchor: "__container__", align: HorizontalAlign.Center }
})
}
.backgroundColor('#FFFFFF')
.height(44)
.width('100%')
.height(vp2px(44) + this.topSafeHeight + 'px')
.padding({ top: this.topSafeHeight + 'px' })
.width('100%').backgroundColor('#FFFFFF')
}
@Builder
... ... @@ -413,7 +414,9 @@ struct ReserveMorePage {
this.reservedIds = []
}
liveReviewDTO.list.forEach((content) => { content.pageId = this.pageId })
liveReviewDTO.list.forEach((content) => {
content.pageId = this.pageId
})
this.data.push(...liveReviewDTO.list)
//批量查询关注状态
this.getAppointmentInfo(liveReviewDTO.list)
... ... @@ -518,7 +521,7 @@ struct ReserveMorePage {
try {
// 埋点
Tracking.event(!reserveItem.subscribe ? "live_subscribe_click":"cancel_live_subscribe_click",
Tracking.event(!reserveItem.subscribe ? "live_subscribe_click" : "cancel_live_subscribe_click",
TrackParamConvert.program(item))
const res = await LiveModel.liveAppointment(reserveItem.relationId, reserveItem.liveId.toString(),
... ... @@ -555,6 +558,7 @@ struct ReserveMorePage {
}
}
}
getReserveDate(eventDateTimeString: string, type: number): string {
// 解析事件的日期和时间
const eventDateTime = new Date(eventDateTimeString);
... ... @@ -570,15 +574,16 @@ struct ReserveMorePage {
const currentDate = currentDateTime.setHours(0, 0, 0, 0);
if (eventDate === currentDate) {
return `今天`;
}else{
} else {
const month = eventDateTime.getMonth() + 1;
const date = eventDateTime.getDate();
return `${month}月${date}日`;
}
}else {
} else {
return `${eventTimeStr}`;
}
}
// getReserveDate(eventDateTimeString: string, type: number): string {
// // 解析事件的日期和时间
// const eventDateTime = new Date(eventDateTimeString);
... ...