common.scss
9.75 KB
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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
// ========================================================================
// HomeFrame 公共样式 - 横竖屏通用
// ========================================================================
// ===== HomeFrame 容器基础样式 =====
// .home-frame-container {
// width: 100%;
// height: 100%;
// display: flex;
// flex-direction: column;
// position: relative;
// background-color: var(--bg-page, #F8FAFC);
// }
/* 嵌入 index tab 槽(TabBarShell 右侧):在 flex 列/行里占满剩余空间,避免仅依赖 height:100% 横竖屏一侧失效 */
// .home-frame-container.hf-embed-in-tab-slot {
// flex: 1;
// min-height: 0;
// min-width: 0;
// }
// ===== 内容区域布局 =====
.home-content {
// position: relative;
// flex: 1;
// display: flex;
// flex-direction: row;
// width: 100%;
// height: 100%;
// overflow: hidden;
}
// .right-side {
// height: 100%;
// display: flex;
// flex-direction: column;
// overflow: hidden;
// // padding-bottom: var(--tabbar-height);
// }
/* 横屏:Tabbar 在 DOM 中已先于 right-side,侧栏在物理左侧 */
// ===== 应用内容区 =====
.app-content-box {
/* 横屏:与左侧 Tabbar 用户区视觉对齐;竖屏见下方 .mode-portrait 覆盖 */
// margin-top: 40px;
flex: 1;
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
padding:var(--content-tabbar-gap, 12px);
// padding: 0 var(--content-box-padding-side);
// margin-bottom: var(--content-box-margin-bottom); /* ✅ 竖屏下为底部 tabBar 预留空间 */
// border:1px solid green
}
// .mode-portrait .app-content-box {
// margin-top: 0;
// }
.right-content {
// padding: var(--l-spacing-lg) 8px var(--l-spacing-2xl);
}
// 大屏平板横屏 (1174x768) 特殊优化
// .layout-landscape-1174x768 .right-content {
// padding-top: 4px;
// padding-bottom: 8px;
// }
// .layout-landscape-1174x768 .start {
// // margin-top: 0;
// // height: 72px;
// }
// ===== Start 按钮 =====
.start {
height: 80px;
box-sizing: border-box;
position: relative;
z-index: 100;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
overflow: visible;
flex-shrink: 0;
min-width: 100px;
margin-top: 0;
// margin: var(--l-spacing-sm) 0;
padding: 0;
border-radius: var(--l-radius-xl);
background-color: #667eea;
// ✅ 性能优化:移除 box-shadow,低端机渲染压力大
// box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
// ✅ 性能优化:移除 transition,减少重绘开销
}
.start-hover {
// ✅ 性能优化:用 opacity 替代 transform + box-shadow
opacity: 0.85;
}
.start-inner {
position: relative;
z-index: 10;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding: 0 var(--l-spacing-lg);
background-color: transparent;
}
.start-icon-wrap {
width: 32px;
height: 32px;
border-radius: 16px;
background: rgba(255, 255, 255, 0.95);
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
margin-right: 10px;
// ✅ 性能优化:移除 box-shadow
// box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.start-text {
font-size: var(--l-font-lg);
font-weight: 600;
color: #ffffff;
text-align: center;
letter-spacing: 1px;
}
// ✅ UVUE 不支持 @keyframes,已移除动画定义
// 原 startGlowPulse、startShineSweep、startIconBreath 动画已删除
// ===== 右侧内容盒子 =====
.right-content-box {
flex: 1;
display: flex;
flex-direction: row;
// gap: var(--l-spacing-lg);
// padding: var(--l-spacing-md) 0 var(--l-spacing-3xl);
margin-top: var(--l-spacing-md);
overflow: hidden;
// border:1px solid blue
}
.box-class {
background: var(--l-bg-card);
// ✅ UVUE 不支持 backdrop-filter,低端机性能优化
border-radius: var(--l-radius-lg);
overflow: hidden;
display: flex;
flex-direction: column;
// ✅ 性能优化:移除 box-shadow,低端机渲染压力大
// box-shadow: var(--l-shadow-md);
}
.box-class:hover {
// ✅ 性能优化:hover 在移动端无意义,且增加开销
// box-shadow: var(--l-shadow-lg);
// background: var(--l-bg-card-hover);
}
.content-left {
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: column;
}
.content-right {
flex: 1;
min-width: 200px;
display: flex;
flex-direction: column;
// border:1px solid yellow
}
// ===== 模块盒子(使用 CSS 变量)=====
.module-box {
height: var(--module-box-height);
margin-bottom: var(--l-spacing-xl);
display: flex; // 启用 flex 布局
flex-direction: column; // 垂直排列
}
.tool-box {
flex: 1;
display: flex;
flex-direction: column;
// border:1px solid red
}
// ===== 通用标题和内容 =====
.common-title {
height: var(--common-title-height);
display: flex;
flex-direction: row;
align-items: center;
padding-left: var(--l-spacing-lg);
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
background-color: var(--bg-card, #FFFFFF);
}
.title-text {
font-size: var(--l-font-md);
font-weight: 600;
color: #1a1a1a;
letter-spacing: 0.5px;
position: relative;
}
// ✅ UVUE 不支持 ::before 伪元素,已移除左侧装饰条
// .title-text::before {
// content: '';
// position: absolute;
// left: -12px;
// top: 50%;
// transform: translateY(-50%);
// width: 3px;
// height: 16px;
// background-color: var(--l-color-primary, #667eea);
// border-radius: 2px;
// }
.content-box {
flex: 1;
padding: 0;
overflow: hidden;
}
// 工具区内容区:确保填充剩余空间并支持垂直居中
.tool-content-box {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.swiper-placeholder {
width: 100%;
height: 100%;
display: flex;
flex-direction: column; // 改为 column 以支持垂直居中
align-items: center;
justify-content: center;
}
.placeholder-text {
font-size: var(--l-font-sm);
color: #999;
}
.message-box {
flex: 1;
min-height: 0;
}
.legacy-home-wrap {
flex: 1;
width: 100%;
height: 100%;
overflow: hidden;
}
.reception-center-wrap {
flex: 1;
width: 100%;
height: 100%;
min-height: 0;
display: flex;
flex-direction: column;
position: relative;
}
.reception-center-inner,
.reception-detail-inner {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
display: flex;
flex-direction: column;
}
.my-center-wrap {
flex: 1;
width: 100%;
height: 100%;
min-height: 0;
}
.store-addr {
position: absolute;
left: 50%;
bottom: 24rpx;
transform: translateX(-50%);
display: flex;
flex-direction: row;
align-items: center;
}
.icon-addr {
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
background-color: #4673ff;
border-radius: 4rpx;
}
.addr-text {
font-size: 24rpx;
color: #999999;
// ✅ UVUE 不支持 word-wrap,white-space: normal 已可实现换行
white-space: normal;
line-height: 32rpx;
margin-left: 4rpx;
flex-shrink: 0;
}
.addr-line {
width: 600rpx;
height: 2rpx;
margin: 0 40rpx;
flex-shrink: 0;
}
.addr-line-left {
background-color: #eeeeee;
}
.addr-line-right {
background-color: #eeeeee;
}
// ===== HomeFrame Tabbar(横屏左侧 / 竖屏底部)=====
.home-tabbar {
display: flex;
flex-direction: column;
position: relative;
// width: 120px;
flex-shrink: 0;
background-color: var(--bg-card, #FFFFFF);
.home-tabbar-bg-img {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 0;
pointer-events: none;
}
.hf-landscape-column,
.user-box,
.landscape-tabbar-wrap,
.home-tabbar-footer {
position: relative;
z-index: 1;
}
}
.home-tabbar-landscape {
min-height: 0;
height: 100%;
align-self: stretch;
}
.home-tabbar-portrait {
width: 100%;
height: var(--tabbar-height, 70px); /* ✅ 使用 CSS 变量控制 tabbar 高度 */
flex-shrink: 0;
flex-direction: column;
align-items: stretch;
padding: 0;
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}
.portrait-un-tabbar {
width: 100%;
}
.tabbar-icon-img {
width: 24px;
height: 24px;
}
.tabbar-icon-img-pad {
width: 30px;
height: 30px;
}
.home-tabbar-portrait-pad {
padding-bottom: 6px;
}
.portrait-top-row {
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
.user-box {
padding-top: 0;
padding-right: var(--l-spacing-md);
flex-shrink: 0;
}
}
.portrait-action {
flex-shrink: 0;
}
.user-box {
padding-top: 46px;
}
.user-box-clickable {
// ✅ UVUE 不支持 cursor,移动端无鼠标指针
}
.user-info-row {
flex-direction: row;
align-items: center;
.user-avatar {
margin-right: var(--l-spacing-sm);
}
.user-name-text {
margin-top: 0;
max-width: 80px;
}
}
.user-info {
width: 92px;
display: flex;
flex-direction: column;
align-items: center;
box-sizing: border-box;
position: relative;
}
.user-avatar {
width: 50px;
height: 50px;
border: 1px solid #ffffff;
box-shadow: 0 2px 4px 0 #0000001a;
border-radius: 50%;
}
.user-name-text {
font-size: 14px;
color: #292d33;
margin-top: 8px;
max-width: 56px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
}
// 横屏:中间区域放 un-tabbar(组件根节点通过 custom-style 纵向排列)
.landscape-tabbar-wrap {
flex: 1;
min-height: 0;
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.landscape-un-tabbar {
width: 100%;
flex: 1;
min-height: 0;
}
/* 横屏:footer 为侧栏第三段,由父级 flex 贴底;竖屏若复用此类名再按需加 margin */
.home-tabbar-footer {
flex-shrink: 0;
// padding-bottom: 10px;
}
.btn-placeholder {
width: 40px;
height: 40px;
background-color: #e8eaef;
border-radius: 20px;
margin: var(--l-spacing-sm) auto 0;
}