实现预约会见应用鸿蒙示例代码

鸿蒙场景化示例代码技术工程师
发布于 2025-3-13 11:03
浏览
0收藏

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

介绍

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

实现预约会见应用源码链接

效果预览

实现预约会见应用鸿蒙示例代码-鸿蒙开发者社区

使用说明

打开应用后,用户可以根据需求查看应用。开发者可以根据此示例后续进行进一步开发。

实现思路

  1. 进入页面后进入登陆注册页面,如果没有注册会提醒用户注册。
if (!this.checkPhoneRegistrationFlag) {
  AlertDialog.show(
    {
      title: '温馨提示',
      subtitle: '',
      message: '您的手机号码' + this.accountName + '还未注册,是否现在就注册?',
      autoCancel: true,
      alignment: DialogAlignment.Center,
      gridCount: 4,
      showInSubWindow: true,
      isModal: true,
      offset: { dx: 0, dy: -20 },
      buttonDirection: DialogButtonDirection.HORIZONTAL,
      ...
    }
  )
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  1. 页面下方提供Tab栏优化页面跳转。
Tabs({
  barPosition: BarPosition.End,
  index: this.currentIndex
}) {
  TabContent() {
    PublicNoticePage();
  }
  .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
  .tabBar(this.TabBarBuilder(this.tabBarsInfo.getTabList()[0], 0))
  ...
}
.vertical(false)
.onChange((index: number) => {
  this.currentIndex = index;
})
.barHeight($r('app.float.bar_height'))
.barWidth(CommonConstants.FULL_PERCENT)
.scrollable(false)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
.clip(false)
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  1. 后续具体使用可在应用中自行查看。

分类
收藏
回复
举报
回复
    相关推荐