wwf
3 天以前 23fa268f56dcd99c8dcd46f50f3ffcaa4cdcbc49
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
import { router } from '@kit.ArkUI'
 
@Entry
@Component
struct SettingPage {
  @State messagePushFlag: boolean = false
  @State autoUpdateFlag: boolean = false
  build() {
    Column() {
      Row() {
        Image($r('app.media.left_icon'))
          .width(20)
          .height(20)
          .onClick(() => {
            router.back()
          })
        Text('隐私设置')
          .fontSize(18)
          .fontWeight(700)
        Row()
      }
      .width('100%')
      .padding(10)
      .justifyContent(FlexAlign.SpaceBetween)
 
      Divider()
 
      Column() {
        Row() {
          Column({ space: 10 }) {
            Text('是否开启消息推送')
              .fontColor(Color.Black)
              .width('100%')
            Text(`您已经${this.messagePushFlag?'开启':'关闭'}消息推送`)
              .fontSize(12)
              .fontColor('#666666')
              .width('100%')
          }
          .layoutWeight(1)
          Toggle({ type: ToggleType.Switch, isOn: this.messagePushFlag })
            .selectedColor('#007DFF')
            .switchPointColor('#FFFFFF')
            .onChange(() => {
              this.messagePushFlag = !this.messagePushFlag
            })
        }
        Divider().margin({ top: 20, bottom: 20 })
          .color('#ededed')
 
        Row() {
          Column({ space: 10 }) {
            Text('是否开启自动更新')
              .fontColor(Color.Black)
              .width('100%')
            Text(`您已经${this.autoUpdateFlag?'开启':'关闭'}自动更新`)
              .fontSize(12)
              .fontColor('#666666')
              .width('100%')
          }
          .layoutWeight(1)
          Toggle({ type: ToggleType.Switch, isOn: this.autoUpdateFlag })
            .selectedColor('#007DFF')
            .switchPointColor('#FFFFFF')
            .onChange(() => {
              this.autoUpdateFlag = !this.autoUpdateFlag
            })
        }
      }
      .padding(16)
      .width('100%')
      .height('100%')
 
    }
  }
}