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