本文原创发布在华为开发者社区

介绍

本示例是对标金融类产品,使用ArkTS编写金融类产品UI页面,以此开发的行业通用Demo,实现基础的注册、登录、Web嵌入,一二级页面布局参考等功能,工程以feature方式进行模块化设计。

实现金融类应用源码链接

效果预览

请添加链接描述

使用说明

打开应用后,用户可以根据需求查看应用。

实现思路

  1. 进入页面后弹出隐私请求弹窗。

    dialogController: CustomDialogController = new CustomDialogController({
      builder: CustomDialogComponent(
     {
       cancel: () => {
         this.onCancel();
       },
       confirm: () => {
         this.onConfirm();
       }
     }),
      alignment: DialogAlignment.Bottom,
      offset: { dx: 0, dy: CommonConstants.DIALOG_CONTROLLER_DY_OFFSET },
      customStyle: true,
      autoCancel: false
    });
  2. 调用方法,跳转至广告页面。

    jumpToAdvertisingPage() {
      this.timerId = setTimeout(() => {
     this.isJumpToAdvertising = true;
     router.pushUrl({
       url: CommonConstants.ADVERTISING_PAGE_URL
     }).catch((error: Error) => {
       hilog.info(0x0000, CommonConstants.LAUNCHER_PAGE_TAG, 'LauncherPage pushUrl error ' + JSON.stringify(error))
     });
      }, CommonConstants.LAUNCHER_DELAY_TIME);
    }

鸿蒙场景化代码
1 声望0 粉丝