mh-two-thousand-and-two
2024-04-12 7fc6dbf547b8899d949b67cdec36b96a7d1701c7
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<template>
  <div class="demo-page">
    <!-- 应用图标 -->
    <image id="icon" :src="icon"></image>
 
    <!-- 应用名 -->
    <text id="name">{{name}}</text>
 
    <!-- 应用标签 -->
    <div id="tags">
      <text class="tag">无安装</text>
      <text class="gap">|</text>
      <text class="tag">体积小</text>
      <text class="gap">|</text>
      <text class="tag">一步直达</text>
    </div>
 
    <!-- 应用描述 -->
    <text id="desc">{{desc}}</text>
 
    <!-- 应用详情 -->
    <div class="detail detail-first">
      <text class="detail-title">服务类型</text>
      <text class="detail-content">{{serviceType}}</text>
    </div>
    <div class="detail">
      <text class="detail-title">主体信息</text>
      <text class="detail-content">{{subjectInfo}}</text>
    </div>
 
    <!-- 创建快捷方式 -->
    <input class="btn" type="button" @click="createShortcut" value="创建快捷方式" />
 
    <!-- 版权信息 -->
    <text id="footer">{{copyright}}</text>
  </div>
</template>
 
<script>
  /**
   * 默认的菜单页(可自定义)
   * name默认为manifest文件中的name字段
   * icon默认为manifest文件中的icon字段
   * 若需修改页面中文本,请修改ViewModel private中对应变量
   * 注意:使用加载器测试`创建桌面快捷方式`功能时,需要进入系统设置->权限管理->开启应用加载器的`桌面快捷方式`权限,才能保存到桌面。应用上线后可自动获取`桌面快捷方式`权限
   */
  export default {
    protected: {
      name: null,
      icon: null
    },
    private: {
      desc: '即点即用,让你省去下载安装的步骤,立即使用各类服务',
      serviceType: '工具类',
      subjectInfo: 'xxx有限公司',
      copyright: ''
    },
    mounted () {
      // 设置标题栏
      this.$page.setTitleBar({ text: this.name })
    },
    methods: {
      createShortcut () {
        // 创建快捷方式
        this.$app.$def.createShortcut()
      }
    }
  }
</script>
 
<style>
  .demo-page {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
 
  /* 应用图标 */
  #icon {
    margin-top: 90px;
    width: 134px;
    height: 134px;
    border-radius: 10px;
    border: 1px solid #8d8d8d;
  }
 
  /* 应用名 */
  #name {
    margin-top: 20px;
    font-size: 36px;
    color: #000000;
  }
 
  /* 应用标签 */
  #tags {
    margin-top: 22px;
    align-items: center;
  }
 
  .tag {
    padding-left: 20px;
    padding-right: 20px;
    font-size: 28px;
    color: #2a9700;
  }
 
  .gap {
    font-size: 22px;
    color: #b2b2b2;
  }
 
  /* 应用描述 */
  #desc {
    width: 650px;
    margin-top: 40px;
    line-height: 35px;
    font-size: 25px;
    color: #8d8d8d;
  }
 
  /* 应用详情 */
  .detail {
    width: 650px;
    height: 90px;
    border-bottom-width: 1px;
    border-bottom-color: #f0f0f0;
  }
 
  .detail-first {
    margin-top: 65px;
    border-top-width: 1px;
    border-top-color: #f0f0f0;
  }
 
  .detail-title {
    width: 160px;
    padding-left: 10px;
    font-size: 25px;
    color: #000000;
  }
 
  .detail-content {
    font-size: 25px;
    color: #8d8d8d;
  }
 
  /* 按钮 */
  .btn {
    width: 550px;
    height: 86px;
    margin-top: 75px;
    border-radius: 43px;
    background-color: #09ba07;
    font-size: 30px;
    color: #ffffff;
  }
 
  /* 底部版权信息 */
  #footer {
    width: 750px;
    position: fixed;
    bottom: 55px;
    font-size: 25px;
    color: #8d8d8d;
    text-align: center;
  }
</style>