wwf
6 天以前 e794ed885a75be8ab5c789c2ea8db902ce338b0b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import { router } from "@kit.ArkUI"
 
@Entry
@Component
export struct ActiveDetail {
  @State index: number = 0
  aboutToAppear(): void {
    interface Params {
      index: number
    }
    const params: Params = router.getParams() as Params
    this.index = params.index
  }
 
 
  getTagFontColor(statusText: string) {
    switch (statusText) {
      case '报名中':
        return '#10920e'
      case '进行中':
        return '#ffa100'
      default :
        return '#666666'
    }
  }
 
  getTagBgColor(statusText: string) {
    switch (statusText) {
      case '报名中':
        return '#d5f2db'
      case '进行中':
        return '#fff0cc'
      default :
        return '#ebebeb'
    }
  }
 
  build() {
    Column() {
      Row() {
        Image($r('app.media.left_icon'))
          .width(20)
          .height(20)
        Text('详情页')
          .fontSize(18)
          .fontWeight(700)
        Row()
      }
      .width('100%')
      .padding(10)
      .justifyContent(FlexAlign.SpaceBetween)
 
      Image($r('app.media.image1'))
        .width('100%')
        .height(150)
 
      Column({ space: 14 }) {
        Text('北京人工智能IE')
          .fontWeight(800)
          .width('100%')
 
        Row({ space: 10 }) {
          Text('报名中')
            .fontSize(10)
            .fontWeight(500)
            .padding({ left: 4, right: 4, top: 2, bottom: 2 })
            .borderRadius(10)
            .fontColor(this.getTagFontColor('报名中'))
            .backgroundColor(this.getTagBgColor('报名中'))
          Row() {
            Image($r('app.media.date_icon'))
              .width(12)
              .height(12)
            Text('20250520-20250620')
              .fontSize(10)
              .fontColor('#676767')
              .margin({ left: 4 })
          }
          Text(`80人已报名`)
            .fontSize(10)
            .fontColor('#676767')
        }
        .width('100%')
        .justifyContent(FlexAlign.Start)
 
        Text('课程介绍')
          .width('100%')
          .fontSize(14)
          .fontWeight(800)
 
        Text('本课程是计算机网络技术、通信技术等专业的专业核心课程,旨在培养学生的网络技术职业能力、职业素养和创新能力。' +
          '\n采用项目式实训教学,通过引入一个循序渐进的企业网络组建案例,让学生在模拟真实场景中掌握中小型企业网络组建的知识和能力' +
          '教材内容覆盖华为“1+X”证书考试要求,包含大量实操练习。')
          .width('100%')
          .fontSize(13)
          .lineHeight(20)
      }
      .padding(14)
 
 
 
    }
    .width('100%')
    .height('100%')
  }
}