zhenghy
... ... @@ -9,6 +9,7 @@ export interface PageInfoDTO {
name: string; // 名称
hasPopUp: number;
baselineShow: number;
baselineCopywriting: string;
groups: GroupInfoDTO[];
channelInfo: ChannelInfoDTO;
... ... @@ -20,11 +21,11 @@ export interface PageInfoDTO {
/**
* 挂角广告数据
*/
cornersAdv:AdvRuleBean
cornersAdv: AdvRuleBean
/**
* 广告中心-挂角广告信息
*/
cornersAdv2:CompAdvBean[]
cornersAdv2: CompAdvBean[]
}
... ...
/**
* 已到底UI,数据bean封装【page接口返回配置信息:文字、文字颜色】
*/
@Observed
export class NoMoreBean {
text: string = '';
textColor: string = '';
constructor(text: string) {
this.text = text;
}
}
\ No newline at end of file
... ...
... ... @@ -16,6 +16,8 @@ import PageHelper from '../../viewmodel/PageHelper';
import { channelSkeleton } from '../skeleton/channelSkeleton'
import { ProcessUtils } from 'wdRouter/Index';
import PageAdModel from '../../viewmodel/PageAdvModel';
import PageNoMoreLayout from './PageNoMoreLayout';
import { NoMoreBean } from './NoMoreBean';
const TAG = 'PageComponent';
... ... @@ -87,7 +89,7 @@ export struct PageComponent {
this.pageModel.pullUpLoadText, this.pageModel.pullUpLoadHeight)
})
} else if (!this.pageModel.contentNeedScroll) {
NoMoreLayout()
PageNoMoreLayout({ noMoreBean: new NoMoreBean(this.pageModel.pageInfo.baselineCopywriting) })
}
}
}
... ...
import { RefreshConstants } from '../../utils/RefreshConstants'
import { NoMoreBean } from './NoMoreBean';
/**
* The No more data layout component.
*/
@Component
export default struct PageNoMoreLayout {
@ObjectLink noMoreBean: NoMoreBean;
text: string | Resource = $r('app.string.footer_text')
aboutToAppear(): void {
if (this.noMoreBean && this.noMoreBean.text.length > 0) {
this.text = this.noMoreBean.text
}
}
build() {
Row() {
Text(this.text)
.margin({ left: RefreshConstants.NoMoreLayoutConstant_NORMAL_PADDING })
.fontSize(RefreshConstants.NoMoreLayoutConstant_TITLE_FONT)
.textAlign(TextAlign.Center)
}
.width(RefreshConstants.FULL_WIDTH)
.justifyContent(FlexAlign.Center)
.height(RefreshConstants.CUSTOM_LAYOUT_HEIGHT)
}
}
\ No newline at end of file
... ...
... ... @@ -6,7 +6,7 @@
},
{
"name": "footer_text",
"value": "已经到底了"
"value": "已显示全部内容"
},
{
"name": "pull_up_load_text",
... ...