-
Notifications
You must be signed in to change notification settings - Fork 28
/
App.vue
286 lines (244 loc) · 4.4 KB
/
App.vue
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<script>
export default {
onLaunch: function () {
console.log('App Launch');
//#ifdef APP-PLUS
/* 5+环境锁定屏幕方向 */
plus.screen.lockOrientation('portrait-primary'); //锁定
/* 5+环境升级提示 */
var server = "https://uniapp.dcloud.io/update"; //检查更新地址
var req = { //升级检测数据
"appid": plus.runtime.appid,
"version": plus.runtime.version,
"imei": plus.device.imei
};
uni.request({
url: server,
data: req,
success: (res) => {
console.log("success", res);
if (res.statusCode == 200 && res.data.isUpdate) {
let openUrl = plus.os.name === 'iOS' ? res.data.iOS : res.data.Android;
uni.showModal({ //提醒用户更新
title: '更新提示',
content: '是否选择更新',
success: (res) => {
if (res.confirm) {
plus.runtime.openURL(openUrl);
}
}
})
}
}
})
//#endif
},
onShow: function () {
console.log('App Show')
},
onHide: function () {
console.log('App Hide')
}
}
</script>
<style>
/* 这是页面的公用css */
page {
background-color: #F8F8F8;
height: 100%;
font-size: 32px;
line-height: 1.6;
}
.mgr10 {
margin-right: 10px;
}
.mgl10 {
margin-left: 10px;
}
.mgr20 {
margin-right: 20px;
}
.mgl20 {
margin-left: 20px;
}
checkbox,
radio {
margin: 0 10px;
}
button {
margin-top: 20px;
margin-bottom: 20px;
}
form {
width: 100%;
}
/* page */
.container {
display: flex;
flex-direction: column;
min-height: 100%;
justify-content: space-between;
font-size: 32px;
font-family: -apple-system-font, Helvetica Neue, Helvetica, sans-serif;
}
.page-head-title {
display: inline-block;
padding: 0 40px;
font-size: 30px;
height: 60px;
line-height: 60px;
color: #BEBEBE;
background: #1E1E78;
box-sizing: border-box;
border-bottom: 2px solid #D8D8D8;
}
.page-head-desc {
padding-top: 20px;
color: #9B9B9B;
font-size: 32px;
}
.page-body {
width: 100%;
flex-grow: 1;
overflow-x: hidden;
}
.page-body-wrapper {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}
.page-body-wording {
text-align: center;
padding: 200px 100px;
}
.page-body-info {
display: flex;
flex-direction: column;
align-items: center;
background-color: #fff;
width: 100%;
padding: 50px 0 150px 0;
}
.page-body-title {
margin-bottom: 100px;
font-size: 32px;
}
.page-body-text {
font-size: 30px;
line-height: 52px;
color: #ccc;
}
.page-body-text-small {
font-size: 24px;
color: #000;
margin-bottom: 100px;
}
.page-foot {
margin: 100px 0 30px 0;
text-align: center;
color: #1aad19;
font-size: 0;
}
.icon-foot {
width: 152px;
height: 23px;
}
.page-section {
width: 100%;
margin-bottom: 60px;
}
.page-section_center {
display: flex;
flex-direction: column;
align-items: center;
}
.page-section:last-child {
margin-bottom: 0;
}
.page-section-gap {
box-sizing: border-box;
padding: 0 30px;
}
.page-section-spacing {
box-sizing: border-box;
padding: 0 80px;
}
.page-section-title {
font-size: 28px;
color: #999999;
margin-top: 10px;
margin-bottom: 10px;
padding-left: 30px;
padding-right: 30px;
}
.page-section-gap .page-section-title {
padding-left: 0;
padding-right: 0;
}
/* example */
.index-hd {
padding: 90px;
text-align: center;
}
.index-logo {
width: 140px;
height: 140px;
}
.btn-area {
margin-top: 60px;
box-sizing: border-box;
width: 100%;
padding: 0 30px;
}
.image-plus {
width: 150px;
height: 150px;
border: 2px solid #D9D9D9;
position: relative;
}
.image-plus-nb {
border: 0;
}
.image-plus-text {
color: #888888;
font-size: 28px;
}
.image-plus-horizontal {
position: absolute;
top: 50%;
left: 50%;
background-color: #d9d9d9;
width: 4px;
height: 80px;
transform: translate(-50%, -50%);
}
.image-plus-vertical {
position: absolute;
top: 50%;
left: 50%;
background-color: #d9d9d9;
width: 80px;
height: 4px;
transform: translate(-50%, -50%);
}
.color1 {
background-color: #1AAD19;
color: #FFFFFF;
}
.color2 {
background-color: #2782D7;
color: #FFFFFF;
}
.color3 {
background-color: #F1F1F1;
color: #353535;
}
/* 只有状态栏的情况 */
.status-contents {
flex-direction: column;
background: #1E1E78;
height: var(--status-bar-height);
color: #FFFFFF;
}
</style>