HarmonyOS NEXT 实战之元服务:静态案例效果--- 我的一课表

背景:

前几篇学习了元服务,后面几期就让我们开发简单的元服务吧,里面丰富的内容大家自己加,本期案例 仅供参考

先上本期效果图 ,里面图片自行替换

在这里插入图片描述
在这里插入图片描述

效果图1完整代码案例如下:

import { authentication } from '@kit.AccountKit';
import { BusinessError } from '@kit.BasicServicesKit';
import { hilog } from '@kit.PerformanceAnalysisKit';

@Entry
@ComponentV2
struct Index {
  readonly PAGE_FULL: string = "100%";
  readonly PRE_96: string = "96%";
  readonly SIZE_40: number = 40;
  readonly SIZE_30: number = 30;
  readonly SIZE_20: number = 20;
  readonly SIZE_16: number = 16;
  readonly SIZE_8: number = 8;
  readonly SIZE_4: number = 4;
  @Local origin: string = '课程表一'
  @Local author: string = '课程目录:语文'
  @Local content: string = '08:00-10:15'
  @Local category: string = '教学楼A'
  @Local teacher: string = '王老师'
  @Local status: number = 0

  build() {
    Column() {
      Row({ space: this.SIZE_8 }) {
        Row({ space: this.SIZE_8 }) {
          Image($r('app.media.startIcon'))