b165f94a
“wangming”
111
|
1
2
3
4
5
6
7
8
|
<template>
<view class="page">
<view class="header-hero" :style="{ paddingTop: statusBarHeight + 'px' }">
<view class="top-bar">
<view class="top-left" @click="goBack">
<AppIcon name="chevronLeft" size="sm" color="white" />
</view>
<view class="top-center">
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
9
10
|
<text class="app-name">Labeling</text>
<LocationPicker />
|
b165f94a
“wangming”
111
|
11
12
13
14
15
16
17
18
|
</view>
<view class="top-right" @click="isMenuOpen = true">
<AppIcon name="menu" size="sm" color="white" />
</view>
</view>
<view class="bt-bar" @click="goBluetoothPage">
<view class="bt-left">
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
19
|
<AppIcon name="bluetooth" size="sm" color="white" />
|
b165f94a
“wangming”
111
|
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<text class="bt-text">{{ btConnected ? btDeviceName : 'No printer connected' }}</text>
</view>
<view class="bt-status" :class="{ connected: btConnected }">
<text class="bt-dot" />
<text class="bt-label">{{ btConnected ? 'Connected' : 'Disconnected' }}</text>
</view>
<AppIcon name="chevronRight" size="sm" color="white" />
</view>
</view>
<view class="body">
<view class="sidebar">
<view
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
33
34
|
v-for="cat in labelCategories"
:key="cat.id"
|
b165f94a
“wangming”
111
|
35
|
class="cat-item"
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
36
37
|
:class="{ active: selectedCategory === cat.id }"
@click="selectedCategory = cat.id"
|
b165f94a
“wangming”
111
|
38
|
>
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
39
40
41
|
<view v-if="selectedCategory === cat.id" class="active-bar" />
<view class="cat-icon" :class="cat.bgClass">
<AppIcon :name="cat.icon" size="sm" :color="selectedCategory === cat.id ? 'white' : cat.iconColor" />
|
b165f94a
“wangming”
111
|
42
|
</view>
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
43
|
<text class="cat-name">{{ cat.name }}</text>
|
b165f94a
“wangming”
111
|
44
45
46
47
48
49
50
51
52
53
54
55
|
</view>
</view>
<scroll-view class="main-panel" scroll-y>
<view class="panel-inner">
<view class="search-box">
<view class="search-icon-wrap">
<AppIcon name="search" size="sm" color="gray" />
</view>
<input
v-model="searchTerm"
class="search-input"
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
56
|
placeholder="Search products..."
|
b165f94a
“wangming”
111
|
57
58
59
60
|
placeholder-class="placeholder"
/>
</view>
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
61
|
<view v-if="filteredProductCategories.length === 0" class="empty">
|
b165f94a
“wangming”
111
|
62
|
<AppIcon name="search" size="lg" color="gray" />
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
63
|
<text class="empty-text">No products found</text>
|
b165f94a
“wangming”
111
|
64
65
|
</view>
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
66
|
<view v-else class="category-list">
|
b165f94a
“wangming”
111
|
67
|
<view
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
68
69
70
|
v-for="pCat in filteredProductCategories"
:key="pCat.id"
class="cat-section"
|
b165f94a
“wangming”
111
|
71
|
>
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
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
|
<view class="cat-header" @click="toggleCategory(pCat.id)">
<view class="cat-header-left">
<view class="cat-header-icon" :class="pCat.colorClass">
<AppIcon :name="pCat.icon" size="sm" :color="pCat.iconColor" />
</view>
<view class="cat-header-info">
<text class="cat-header-name">{{ pCat.name }}</text>
<text class="cat-header-count">{{ pCat.products.length }} items</text>
</view>
</view>
<AppIcon
:name="expandedCategories.indexOf(pCat.id) >= 0 ? 'chevronUp' : 'chevronDown'"
size="sm"
color="gray"
/>
</view>
<view v-if="expandedCategories.indexOf(pCat.id) >= 0" class="cat-foods">
<view class="food-grid">
<view
v-for="product in pCat.products"
:key="product.id"
class="food-card"
@click="handleProductClick(product)"
>
<view class="food-img-wrap">
<image :src="product.image" class="food-img" mode="aspectFill" />
<view class="size-badge">
<text class="size-badge-text">{{ product.templateSize }}</text>
</view>
<view v-if="product.labelTypes.length > 0" class="type-badge">
<text class="type-badge-text">{{ product.labelTypes.length }} Types</text>
</view>
</view>
|
a0aeefab
“wangming”
好了,设计现在需要给美国那边看,估...
|
106
|
<text class="food-name">{{ getDisplayName(product) }}</text>
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
107
108
109
|
<text class="food-desc">{{ product.templateName }}</text>
</view>
</view>
|
b165f94a
“wangming”
111
|
110
|
</view>
|
b165f94a
“wangming”
111
|
111
112
113
114
115
116
|
</view>
</view>
</view>
</scroll-view>
</view>
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
117
118
119
|
<view v-if="showSubTypeModal" class="modal-mask" @click="showSubTypeModal = false">
<view class="modal-body" @click.stop>
<text class="modal-title">Select Label Type</text>
|
a0aeefab
“wangming”
好了,设计现在需要给美国那边看,估...
|
120
|
<text class="modal-desc">{{ selectedProduct ? getDisplayName(selectedProduct) : '' }}</text>
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
<view class="subtype-list">
<view
v-for="lt in currentLabelTypes"
:key="lt.id"
class="subtype-item"
@click="selectLabelType(lt)"
>
<text class="subtype-name">{{ lt.name }}</text>
<AppIcon name="chevronRight" size="sm" color="gray" />
</view>
</view>
<view class="modal-cancel" @click="showSubTypeModal = false">
<text class="modal-cancel-text">Cancel</text>
</view>
</view>
</view>
|
b165f94a
“wangming”
111
|
138
139
140
141
142
143
144
|
<SideMenu v-model="isMenuOpen" />
</view>
</template>
<script setup lang="ts">
import { ref, computed } from 'vue'
import { onShow } from '@dcloudio/uni-app'
|
b165f94a
“wangming”
111
|
145
146
|
import AppIcon from '../../components/AppIcon.vue'
import SideMenu from '../../components/SideMenu.vue'
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
147
|
import LocationPicker from '../../components/LocationPicker.vue'
|
b165f94a
“wangming”
111
|
148
149
|
import { getStatusBarHeight } from '../../utils/statusBar'
|
b165f94a
“wangming”
111
|
150
151
|
const statusBarHeight = getStatusBarHeight()
const isMenuOpen = ref(false)
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
152
|
const selectedCategory = ref('prep')
|
b165f94a
“wangming”
111
|
153
|
const searchTerm = ref('')
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
154
155
156
157
|
const expandedCategories = ref<string[]>([])
const showSubTypeModal = ref(false)
const selectedProduct = ref<any>(null)
const currentLabelTypes = ref<any[]>([])
|
b165f94a
“wangming”
111
|
158
159
160
161
162
163
164
165
166
167
|
const btConnected = ref(false)
const btDeviceName = ref('')
onShow(() => {
const name = uni.getStorageSync('btDeviceName')
btConnected.value = !!name
btDeviceName.value = name || ''
})
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
168
169
170
171
|
const labelCategories = [
{ id: 'prep', name: 'Prep', icon: 'chef', iconColor: 'green' as const, bgClass: 'green' },
{ id: 'grabngo', name: "Grab'n'Go", icon: 'package', iconColor: 'orange' as const, bgClass: 'orange' },
{ id: 'expiry', name: 'Expiry', icon: 'calendar', iconColor: 'red' as const, bgClass: 'red' },
|
b165f94a
“wangming”
111
|
172
173
|
]
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
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
|
interface LabelType {
id: string
name: string
desc: string
}
interface Product {
id: string
name: string
image: string
templateSize: string
templateName: string
lastEdited: string
labelTypes: LabelType[]
}
interface ProductCategory {
id: string
name: string
icon: string
iconColor: 'blue' | 'orange' | 'green' | 'purple' | 'red' | 'gray'
colorClass: string
products: Product[]
}
const productCategoriesByLabel: Record<string, ProductCategory[]> = {
prep: [
{
id: 'meat',
name: 'Meat',
icon: 'food',
iconColor: 'red',
colorClass: 'bg-red',
products: [
{
id: 'chicken',
name: 'Chicken',
image: 'https://images.unsplash.com/photo-1532550907401-a500c9a57435?w=400',
templateSize: '2"x2"',
templateName: 'Basic',
lastEdited: '2025.12.03 11:45',
labelTypes: [
{ id: 'defrost', name: 'Defrost', desc: 'For defrosted items, tracks thaw date' },
{ id: 'opened', name: 'Opened/Preped', desc: 'For opened or prepared items' },
{ id: 'heated', name: 'Heated', desc: 'For heated/cooked items' },
],
},
{
id: 'beef',
name: 'Beef',
image: 'https://images.unsplash.com/photo-1607623488235-e2e6794c30b5?w=400',
templateSize: '2"x2"',
templateName: 'Basic',
lastEdited: '2025.12.04 09:20',
labelTypes: [
{ id: 'defrost', name: 'Defrost', desc: 'For defrosted items' },
{ id: 'opened', name: 'Opened/Preped', desc: 'For opened or prepared items' },
{ id: 'heated', name: 'Heated', desc: 'For heated/cooked items' },
],
},
{
id: 'bacon',
name: 'Bacon',
image: 'https://images.unsplash.com/photo-1528607929212-2636ec44253e?w=400',
templateSize: '2"x2"',
templateName: 'Basic',
lastEdited: '2025.12.03 14:30',
labelTypes: [
{ id: 'raw', name: 'Raw Bacon', desc: 'Uncooked, requires refrigeration' },
{ id: 'cooked', name: 'Cooked Bacon', desc: 'Fully cooked, ready to eat' },
],
},
],
},
],
grabngo: [
{
id: 'sandwich',
name: 'Sandwich',
icon: 'food',
iconColor: 'orange',
colorClass: 'bg-orange',
products: [
{
id: 'chicken-sandwich',
name: 'Chicken Sandwich',
image: 'https://images.unsplash.com/photo-1553909489-cd47e0907980?w=400',
templateSize: '2"x6"',
templateName: "G'n'G",
lastEdited: '2025.12.03 11:45',
labelTypes: [],
},
{
id: 'turkey-club',
name: 'Turkey Club',
image: 'https://images.unsplash.com/photo-1534422298391-e4f8c172dddb?w=400',
templateSize: '2"x6"',
templateName: "G'n'G",
lastEdited: '2025.12.04 09:30',
labelTypes: [],
},
{
id: 'cheese-burger',
name: 'Cheese Burger',
image: 'https://images.unsplash.com/photo-1568901346375-23c9450c58cd?w=400',
templateSize: '2"x6"',
templateName: "G'n'G",
lastEdited: '2025.12.03 15:20',
labelTypes: [],
},
],
},
{
id: 'salads',
name: 'Salads',
icon: 'food',
iconColor: 'green',
colorClass: 'bg-green',
products: [
{
id: 'caesar-salad',
name: 'Caesar Salad',
image: 'https://images.unsplash.com/photo-1546793665-c74683f339c1?w=400',
templateSize: '2"x4"',
templateName: "G'n'G",
lastEdited: '2025.12.04 09:00',
labelTypes: [],
},
{
id: 'greek-salad',
name: 'Greek Salad',
image: 'https://images.unsplash.com/photo-1540189543-6e6f32e2c1f0?w=400',
templateSize: '2"x4"',
templateName: "G'n'G",
lastEdited: '2025.12.03 12:30',
labelTypes: [],
},
],
},
{
id: 'beverages',
name: 'Beverages',
icon: 'food',
iconColor: 'blue',
colorClass: 'bg-blue',
products: [
{
id: 'fresh-juice',
name: 'Fresh Juice',
image: 'https://images.unsplash.com/photo-1621506289937-a8e4df240d0b?w=400',
templateSize: '2"x2"',
templateName: "G'n'G",
lastEdited: '2025.12.04 07:45',
labelTypes: [],
},
{
id: 'smoothie',
name: 'Smoothie',
image: 'https://images.unsplash.com/photo-1553530666-ba11a7da3888?w=400',
templateSize: '2"x2"',
templateName: "G'n'G",
lastEdited: '2025.12.03 11:00',
labelTypes: [],
},
],
},
],
expiry: [
{
id: 'dairy',
name: 'Dairy',
icon: 'food',
iconColor: 'blue',
colorClass: 'bg-blue',
products: [
{
id: 'milk',
name: 'Milk',
image: 'https://images.unsplash.com/photo-1563636619-e9143da7973b?w=400',
templateSize: '2"x2"',
templateName: 'Basic',
lastEdited: '2025.12.04 08:30',
labelTypes: [],
},
{
id: 'cheese',
name: 'Cheese',
image: 'https://images.unsplash.com/photo-1486297678162-eb2a19b0a32d?w=400',
templateSize: '2"x2"',
templateName: 'Basic',
lastEdited: '2025.12.03 11:15',
labelTypes: [],
},
],
},
{
id: 'deli',
name: 'Deli',
icon: 'food',
iconColor: 'red',
colorClass: 'bg-red',
products: [
{
id: 'sliced-ham',
name: 'Sliced Ham',
image: 'https://images.unsplash.com/photo-1529692236671-f1f6cf9683ba?w=400',
templateSize: '2"x2"',
templateName: 'Basic',
lastEdited: '2025.12.04 10:00',
labelTypes: [],
},
{
id: 'turkey-deli',
name: 'Turkey Deli',
image: 'https://images.unsplash.com/photo-1607623488235-e2e6794c30b5?w=400',
templateSize: '2"x2"',
templateName: 'Basic',
lastEdited: '2025.12.03 14:20',
labelTypes: [],
},
],
},
],
}
|
a0aeefab
“wangming”
好了,设计现在需要给美国那边看,估...
|
399
400
401
402
403
404
405
406
|
// 按详情页规则:chicken→Chicken,2"x6"/2"x4"→Cheese Burger Deluxe,其余→Syrup(图片仍用产品图)
function getDisplayName(product: Product): string {
if (product.id === 'chicken') return 'Chicken'
const size = product.templateSize || ''
if (size.indexOf('2"x6"') >= 0 || size.indexOf('2"x4"') >= 0) return 'Cheese Burger Deluxe'
return 'Syrup'
}
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
407
408
|
const filteredProductCategories = computed(() => {
const cats = productCategoriesByLabel[selectedCategory.value] || []
|
b165f94a
“wangming”
111
|
409
|
const s = searchTerm.value.toLowerCase()
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
410
411
412
413
414
415
|
if (!s) return cats
return cats
.map(function (cat) {
return {
...cat,
products: cat.products.filter(function (p) {
|
a0aeefab
“wangming”
好了,设计现在需要给美国那边看,估...
|
416
417
|
const displayName = getDisplayName(p)
return p.name.toLowerCase().indexOf(s) >= 0 || displayName.toLowerCase().indexOf(s) >= 0
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
418
419
420
421
|
}),
}
})
.filter(function (cat) { return cat.products.length > 0 })
|
b165f94a
“wangming”
111
|
422
423
|
})
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
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
|
const toggleCategory = (catId: string) => {
if (expandedCategories.value.indexOf(catId) >= 0) {
expandedCategories.value = []
} else {
expandedCategories.value = [catId]
}
}
const handleProductClick = (product: Product) => {
if (product.labelTypes.length > 0) {
selectedProduct.value = product
currentLabelTypes.value = product.labelTypes
showSubTypeModal.value = true
} else {
goPreview(product.id, '')
}
}
const selectLabelType = (lt: LabelType) => {
const product = selectedProduct.value
if (product) {
showSubTypeModal.value = false
goPreview(product.id, lt.id)
}
}
|
b165f94a
“wangming”
111
|
450
451
452
453
454
455
456
457
458
459
460
461
462
|
const goBack = () => {
const pages = getCurrentPages()
if (pages.length > 1) {
uni.navigateBack()
} else {
uni.redirectTo({ url: '/pages/index/index' })
}
}
const goBluetoothPage = () => {
uni.navigateTo({ url: '/pages/labels/bluetooth' })
}
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
463
464
465
466
467
468
|
const goPreview = (productId: string, subType: string) => {
let url = '/pages/labels/preview?productId=' + productId
if (subType) {
url += '&subType=' + subType
}
uni.navigateTo({ url })
|
b165f94a
“wangming”
111
|
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
|
}
</script>
<style scoped>
.page {
min-height: 100vh;
background: #f9fafb;
display: flex;
flex-direction: column;
}
.header-hero {
background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-dark));
padding-left: 32rpx;
padding-right: 32rpx;
padding-bottom: 0;
}
.top-bar {
height: 96rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
494
495
|
.top-left,
.top-right {
|
b165f94a
“wangming”
111
|
496
497
498
499
500
501
502
503
504
505
506
|
width: 64rpx;
height: 64rpx;
border-radius: 999rpx;
background: rgba(255, 255, 255, 0.15);
display: flex;
align-items: center;
justify-content: center;
}
.top-center {
flex: 1;
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
507
508
509
|
display: flex;
flex-direction: column;
align-items: center;
|
b165f94a
“wangming”
111
|
510
511
512
513
514
515
516
517
|
}
.app-name {
font-size: 34rpx;
font-weight: 600;
color: #ffffff;
}
|
b165f94a
“wangming”
111
|
518
519
520
521
522
523
524
525
526
|
.bt-bar {
display: flex;
align-items: center;
gap: 12rpx;
padding: 16rpx 20rpx;
margin-top: 16rpx;
margin-bottom: 16rpx;
background: rgba(255, 255, 255, 0.12);
border-radius: 16rpx;
|
b165f94a
“wangming”
111
|
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
|
}
.bt-left {
display: flex;
align-items: center;
gap: 12rpx;
flex: 1;
min-width: 0;
}
.bt-text {
font-size: 24rpx;
color: rgba(255, 255, 255, 0.9);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.bt-status {
display: flex;
align-items: center;
gap: 8rpx;
padding: 6rpx 16rpx;
background: rgba(255, 255, 255, 0.12);
border-radius: 999rpx;
flex-shrink: 0;
}
.bt-dot {
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: #fbbf24;
}
.bt-status.connected .bt-dot {
background: #4ade80;
}
.bt-label {
font-size: 22rpx;
color: rgba(255, 255, 255, 0.85);
}
|
b165f94a
“wangming”
111
|
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
|
.body {
flex: 1;
display: flex;
min-height: 0;
}
.sidebar {
width: 200rpx;
background: #ffffff;
border-right: 1rpx solid #e5e7eb;
padding: 16rpx 0;
overflow-y: auto;
}
.cat-item {
display: flex;
flex-direction: column;
align-items: center;
padding: 20rpx 8rpx;
|
b165f94a
“wangming”
111
|
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
|
position: relative;
}
.cat-item.active {
background: var(--theme-primary-light);
}
.active-bar {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 6rpx;
background: var(--theme-primary);
border-radius: 0 6rpx 6rpx 0;
}
.cat-icon {
width: 64rpx;
height: 64rpx;
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 8rpx;
}
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
617
618
619
|
.cat-icon.green {
background: #f0fdf4;
}
|
b165f94a
“wangming”
111
|
620
|
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
|
.cat-icon.orange {
background: #fff7ed;
}
.cat-icon.red {
background: #fef2f2;
}
.cat-icon.blue {
background: #eff6ff;
}
.cat-icon.cyan {
background: #ecfeff;
}
.cat-item.active .cat-icon.green,
|
b165f94a
“wangming”
111
|
638
|
.cat-item.active .cat-icon.orange,
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
639
640
641
|
.cat-item.active .cat-icon.red,
.cat-item.active .cat-icon.blue,
.cat-item.active .cat-icon.cyan {
|
b165f94a
“wangming”
111
|
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
|
background: var(--theme-primary);
}
.cat-name {
font-size: 20rpx;
color: #4b5563;
text-align: center;
word-break: break-word;
}
.cat-item.active .cat-name {
color: var(--theme-primary);
font-weight: 600;
}
.main-panel {
flex: 1;
min-width: 0;
height: 100%;
}
.panel-inner {
padding: 24rpx;
}
.search-box {
position: relative;
display: flex;
align-items: center;
margin-bottom: 24rpx;
}
.search-icon-wrap {
position: absolute;
left: 20rpx;
z-index: 1;
}
.search-input {
flex: 1;
height: 72rpx;
padding-left: 64rpx;
padding-right: 20rpx;
background: #f3f4f6;
border-radius: 16rpx;
font-size: 26rpx;
}
.empty {
display: flex;
flex-direction: column;
align-items: center;
padding: 80rpx 24rpx;
}
.empty-text {
font-size: 28rpx;
color: #9ca3af;
margin-top: 24rpx;
}
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
|
.category-list {
display: flex;
flex-direction: column;
gap: 16rpx;
}
.cat-section {
background: #fff;
border-radius: 16rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
overflow: hidden;
}
.cat-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 24rpx;
}
.cat-header-left {
display: flex;
align-items: center;
gap: 16rpx;
flex: 1;
min-width: 0;
}
.cat-header-icon {
width: 56rpx;
height: 56rpx;
border-radius: 14rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.cat-header-icon.bg-red {
background: #fef2f2;
}
.cat-header-icon.bg-blue {
background: #eff6ff;
}
.cat-header-icon.bg-green {
background: #f0fdf4;
}
.cat-header-icon.bg-orange {
background: #fff7ed;
}
.cat-header-icon.bg-purple {
background: #faf5ff;
}
.cat-header-info {
flex: 1;
min-width: 0;
}
.cat-header-name {
font-size: 28rpx;
font-weight: 600;
color: #111827;
display: block;
}
.cat-header-count {
font-size: 22rpx;
color: #9ca3af;
display: block;
margin-top: 2rpx;
}
.cat-foods {
padding: 0 16rpx 16rpx;
border-top: 1rpx solid #f3f4f6;
}
|
b165f94a
“wangming”
111
|
785
786
787
|
.food-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
788
789
790
|
column-gap: 12rpx;
row-gap: 12rpx;
padding-top: 16rpx;
|
b165f94a
“wangming”
111
|
791
792
793
|
}
.food-card {
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
794
795
796
|
background: #f9fafb;
padding: 10rpx;
border-radius: 14rpx;
|
b165f94a
“wangming”
111
|
797
798
799
|
}
.food-card:active {
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
800
|
background: #f3f4f6;
|
b165f94a
“wangming”
111
|
801
802
803
804
805
806
807
|
}
.food-img-wrap {
width: 100%;
position: relative;
padding-top: 75%;
border-radius: 10rpx;
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
808
809
|
background: #e5e7eb;
margin-bottom: 10rpx;
|
b165f94a
“wangming”
111
|
810
811
812
813
814
815
816
817
818
819
820
|
overflow: hidden;
}
.food-img {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
|
.size-badge {
position: absolute;
left: 8rpx;
top: 8rpx;
background: rgba(0, 0, 0, 0.25);
padding: 4rpx 12rpx;
border-radius: 8rpx;
}
.size-badge-text {
font-size: 18rpx;
color: #fff;
font-weight: 500;
}
.type-badge {
position: absolute;
right: 8rpx;
bottom: 8rpx;
background: rgba(0, 0, 0, 0.25);
padding: 4rpx 12rpx;
border-radius: 8rpx;
}
.type-badge-text {
font-size: 18rpx;
color: #fff;
font-weight: 500;
}
|
b165f94a
“wangming”
111
|
851
852
853
854
855
|
.food-name {
font-size: 24rpx;
font-weight: 600;
color: #111827;
display: block;
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
856
|
margin-bottom: 2rpx;
|
b165f94a
“wangming”
111
|
857
858
859
860
861
862
863
864
|
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.food-desc {
font-size: 20rpx;
color: #6b7280;
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
865
|
display: block;
|
b165f94a
“wangming”
111
|
866
|
overflow: hidden;
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
|
text-overflow: ellipsis;
white-space: nowrap;
}
.modal-mask {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 1000;
display: flex;
align-items: flex-end;
justify-content: center;
}
.modal-body {
width: 100%;
background: #fff;
border-radius: 32rpx 32rpx 0 0;
padding: 40rpx 32rpx;
max-height: 70vh;
overflow-y: auto;
}
.modal-title {
font-size: 36rpx;
font-weight: 700;
color: #111827;
display: block;
margin-bottom: 8rpx;
}
.modal-desc {
font-size: 28rpx;
color: #6b7280;
display: block;
margin-bottom: 32rpx;
}
.subtype-list {
display: flex;
flex-direction: column;
gap: 16rpx;
margin-bottom: 24rpx;
}
.subtype-item {
display: flex;
align-items: center;
gap: 20rpx;
padding: 28rpx 24rpx;
background: #f9fafb;
border-radius: 16rpx;
border: 2rpx solid #e5e7eb;
}
.subtype-item:active {
background: var(--theme-primary-light);
border-color: var(--theme-primary);
}
.subtype-name {
flex: 1;
min-width: 0;
font-size: 30rpx;
font-weight: 600;
color: #111827;
}
.modal-cancel {
width: 100%;
height: 88rpx;
background: #f3f4f6;
border-radius: 16rpx;
display: flex;
align-items: center;
justify-content: center;
}
.modal-cancel-text {
font-size: 30rpx;
font-weight: 500;
color: #374151;
line-height: 1;
|
b165f94a
“wangming”
111
|
953
954
955
956
957
958
959
960
961
|
}
@media (min-width: 768px) {
.sidebar {
width: 260rpx;
}
.food-grid {
grid-template-columns: repeat(3, minmax(0, 1fr));
|
940fb6ea
“wangming”
又改了一个版本,这泰额太纠结了,一...
|
962
963
|
column-gap: 16rpx;
row-gap: 16rpx;
|
b165f94a
“wangming”
111
|
964
965
966
|
}
}
</style>
|