cyy-vue-material 7.0.19 → 7.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +34 -34
- package/src/App.vue +149 -149
- package/src/api/http.js +16 -16
- package/src/api/index.js +21 -21
- package/src/api/urlQuery.js +20 -20
- package/src/common/js/constant.js +5 -5
- package/src/common/js/index.js +1 -1
- package/src/components/vop-label.vue +29 -29
- package/src/index.dev.js +4 -4
- package/src/package/cyy-ArsenalActivity/components/u-cont-down.vue +316 -316
- package/src/package/cyy-ArsenalActivity/components/u-line-progress.vue +150 -150
- package/src/package/cyy-ArsenalActivity/cyy-ArsenalActivity.vue +820 -820
- package/src/package/cyy-ArsenalCarousel/cyy-ArsenalCarousel.vue +137 -137
- package/src/package/cyy-ArsenalClass/cyy-ArsenalClass.vue +564 -564
- package/src/package/cyy-ArsenalMyNavigation/cyy-ArsenalMyNavigation.vue +128 -125
- package/src/package/cyy-ArsenalMyTop/cyy-ArsenalMyTop.vue +211 -211
- package/src/package/cyy-ArsenalNavigation/cyy-ArsenalNavigation.vue +236 -236
- package/src/package/cyy-ArsenalPicture/cyy-ArsenalPicture.vue +228 -228
- package/src/package/cyy-ArsenalPromotion/cyy-ArsenalPromotion.vue +913 -899
- package/src/package/cyy-ArsenalRecommend/cyy-ArsenalRecommend.vue +56 -56
- package/src/package/cyy-ArsenalTop/cyy-ArsenalTop.vue +328 -328
- package/src/package/cyy-collocation/cyy-collocation.vue +639 -639
- package/src/package/cyy-goods/cyy-goods.vue +317 -317
- package/src/package/cyy-goodsOne/consult.vue +267 -267
- package/src/package/cyy-goodsOne/cyy-goodsOne.vue +217 -217
- package/src/package/cyy-image/cyy-image.vue +64 -64
- package/src/package/cyy-live/cyy-live.vue +196 -196
- package/src/package/cyy-new-product/cyy-new-product.vue +834 -834
- package/src/package/cyy-notice/cyy-notice.vue +137 -137
- package/src/package/cyy-search/cyy-search.vue +57 -57
- package/src/package/cyy-slider/cyy-slider.vue +117 -117
- package/src/package/cyy-title/cyy-title.vue +38 -38
- package/src/package/cyy-video/cyy-video.vue +49 -49
- package/src/package/index.js +21 -21
- package/src/utils/checkEnv.js +16 -16
- package/src/utils/fetchFactory.js +100 -100
- package/src/utils/index.js +2 -2
|
@@ -1,899 +1,913 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div>
|
|
4
|
-
<div
|
|
5
|
-
class="classTitle"
|
|
6
|
-
:style="{ backgroundColor: props.bgColor }"
|
|
7
|
-
v-if="scrollTop > 20 || isLc"
|
|
8
|
-
>
|
|
9
|
-
<span
|
|
10
|
-
class="classTitleItem"
|
|
11
|
-
v-for="(ele, index) in classDomainList"
|
|
12
|
-
:key="ele.goodsClassId"
|
|
13
|
-
:style="{
|
|
14
|
-
height: props.navigationHeight + 'px',
|
|
15
|
-
lineHeight: props.navigationHeight + 'px',
|
|
16
|
-
fontSize: props.navigationFontSize + 'px',
|
|
17
|
-
}"
|
|
18
|
-
>
|
|
19
|
-
<span
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
scroll-
|
|
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
|
-
<span class="
|
|
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
|
-
this.
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
initgoods()
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
const
|
|
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
|
-
const res = await fetchPost(url);
|
|
389
|
-
item.goodsList = res.list
|
|
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
|
-
console.log("
|
|
472
|
-
ele.page++;
|
|
473
|
-
const res = await this.getGoodsImpl()(this,
|
|
474
|
-
this.$set(ele, "goodsList", [...ele.goodsList,...res.list]);
|
|
475
|
-
this.$set(ele, "page",
|
|
476
|
-
} else {
|
|
477
|
-
if (!isLc) {
|
|
478
|
-
uni.$u.toast("没有更多了~");
|
|
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
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
return
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
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
|
-
return
|
|
569
|
-
},
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
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
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
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
|
-
justify-content: center;
|
|
682
|
-
align-items: center;
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
}
|
|
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
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
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
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
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
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div>
|
|
4
|
+
<div
|
|
5
|
+
class="classTitle"
|
|
6
|
+
:style="{ backgroundColor: props.bgColor }"
|
|
7
|
+
v-if="scrollTop > 20 || isLc"
|
|
8
|
+
>
|
|
9
|
+
<span
|
|
10
|
+
class="classTitleItem"
|
|
11
|
+
v-for="(ele, index) in classDomainList"
|
|
12
|
+
:key="ele.goodsClassId"
|
|
13
|
+
:style="{
|
|
14
|
+
height: props.navigationHeight + 'px',
|
|
15
|
+
lineHeight: props.navigationHeight + 'px',
|
|
16
|
+
fontSize: props.navigationFontSize + 'px',
|
|
17
|
+
}"
|
|
18
|
+
>
|
|
19
|
+
<span
|
|
20
|
+
v-if="ele.goodsList && ele.goodsList.length > 0"
|
|
21
|
+
class="classSpan"
|
|
22
|
+
@click="checkClass(index)"
|
|
23
|
+
:style="{
|
|
24
|
+
background:
|
|
25
|
+
checkClassIndex === index ? props.getBgColor : props.bgColor,
|
|
26
|
+
color:
|
|
27
|
+
checkClassIndex === index
|
|
28
|
+
? props.getfontColor
|
|
29
|
+
: props.fontColor,
|
|
30
|
+
}"
|
|
31
|
+
>{{ ele.goodsChangeClassName }}</span
|
|
32
|
+
>
|
|
33
|
+
</span>
|
|
34
|
+
</div>
|
|
35
|
+
<scroll-view
|
|
36
|
+
scroll-y="true"
|
|
37
|
+
scroll-with-animation="true"
|
|
38
|
+
@scroll="handleScroll"
|
|
39
|
+
:scroll-into-view="targetId"
|
|
40
|
+
style="height: 100vh"
|
|
41
|
+
>
|
|
42
|
+
<template v-if="props.headImg">
|
|
43
|
+
<img v-if="isLc" class="headerImg" :src="props.headImg" />
|
|
44
|
+
<image
|
|
45
|
+
v-else
|
|
46
|
+
class="headerImg"
|
|
47
|
+
:src="props.headImg"
|
|
48
|
+
mode="widthFix"
|
|
49
|
+
></image>
|
|
50
|
+
</template>
|
|
51
|
+
<div class="classContent">
|
|
52
|
+
<div
|
|
53
|
+
class="classContentItem"
|
|
54
|
+
v-for="(ele, index) in classDomainList"
|
|
55
|
+
:key="ele.goodsClassId"
|
|
56
|
+
:id="'item-' + index"
|
|
57
|
+
>
|
|
58
|
+
<div v-if="ele.goodsList && ele.goodsList.length > 0">
|
|
59
|
+
<div
|
|
60
|
+
v-if="!ele.classfooterImg"
|
|
61
|
+
class="classContentSpan"
|
|
62
|
+
:style="{
|
|
63
|
+
paddingTop: ele.titleMt + 'px',
|
|
64
|
+
paddingBottom: ele.titleBt + 'px',
|
|
65
|
+
backgroundColor: ele.bgColor,
|
|
66
|
+
}"
|
|
67
|
+
>
|
|
68
|
+
<img
|
|
69
|
+
style="
|
|
70
|
+
display: inline-block;
|
|
71
|
+
width: 15px;
|
|
72
|
+
height: 15px;
|
|
73
|
+
margin-right: 2px;
|
|
74
|
+
margin-top: 3px;
|
|
75
|
+
"
|
|
76
|
+
v-if="ele.iconFlag"
|
|
77
|
+
:src="
|
|
78
|
+
ele.goodsClassLogo
|
|
79
|
+
? ele.goodsClassLogo.indexOf('http') === -1
|
|
80
|
+
? domainNameUrl + ele.goodsClassLogo
|
|
81
|
+
: ele.goodsClassLogo
|
|
82
|
+
: ''
|
|
83
|
+
"
|
|
84
|
+
/>
|
|
85
|
+
<span
|
|
86
|
+
v-if="ele.goodsClassNameFlag"
|
|
87
|
+
:style="{
|
|
88
|
+
color: ele.titleColor,
|
|
89
|
+
fontSize: ele.titleFontSize + 'px',
|
|
90
|
+
}"
|
|
91
|
+
>
|
|
92
|
+
{{ ele.goodsChangeClassName }}
|
|
93
|
+
</span>
|
|
94
|
+
</div>
|
|
95
|
+
<div
|
|
96
|
+
v-else
|
|
97
|
+
class="classContentImgBox"
|
|
98
|
+
:style="{
|
|
99
|
+
paddingTop: ele.titleMt + 'px',
|
|
100
|
+
paddingBottom: ele.titleBt + 'px',
|
|
101
|
+
backgroundColor: ele.bgColor,
|
|
102
|
+
}"
|
|
103
|
+
>
|
|
104
|
+
<img
|
|
105
|
+
v-if="isLc"
|
|
106
|
+
class="classContentImg"
|
|
107
|
+
:src="ele.classfooterImg"
|
|
108
|
+
/>
|
|
109
|
+
<image
|
|
110
|
+
v-else
|
|
111
|
+
class="classContentImg"
|
|
112
|
+
:src="ele.classfooterImg"
|
|
113
|
+
mode="widthFix"
|
|
114
|
+
></image>
|
|
115
|
+
<div class="text-overlay">
|
|
116
|
+
<img
|
|
117
|
+
style="
|
|
118
|
+
display: inline-block;
|
|
119
|
+
width: 15px;
|
|
120
|
+
height: 15px;
|
|
121
|
+
margin-right: 2px;
|
|
122
|
+
margin-top: 3px;
|
|
123
|
+
"
|
|
124
|
+
v-if="ele.iconFlag"
|
|
125
|
+
:src="
|
|
126
|
+
ele.goodsClassLogo
|
|
127
|
+
? ele.goodsClassLogo.indexOf('http') === -1
|
|
128
|
+
? domainNameUrl + ele.goodsClassLogo
|
|
129
|
+
: ele.goodsClassLogo
|
|
130
|
+
: ''
|
|
131
|
+
"
|
|
132
|
+
/>
|
|
133
|
+
<span
|
|
134
|
+
v-if="ele.goodsClassNameFlag"
|
|
135
|
+
:style="{
|
|
136
|
+
color: ele.titleColor,
|
|
137
|
+
fontSize: ele.titleFontSize + 'px',
|
|
138
|
+
}"
|
|
139
|
+
>
|
|
140
|
+
{{ ele.goodsChangeClassName }}
|
|
141
|
+
</span>
|
|
142
|
+
<!-- 类型为代金券的时候显示 -->
|
|
143
|
+
<div class="coupon" v-if="ele.promotionType == '4' && ele.couponData">
|
|
144
|
+
<div class="left">
|
|
145
|
+
<div class="card">代金券</div>
|
|
146
|
+
<div class="price">面额 {{ele.couponData.condOnceNums}} 元</div>
|
|
147
|
+
</div>
|
|
148
|
+
<div class="right">
|
|
149
|
+
<div class="right-container">
|
|
150
|
+
<span class="discount">满{{ele.couponData.condAmount}}减 {{ ele.couponData.condOnceNums }}</span>
|
|
151
|
+
<span class="date">{{getTime(ele.couponData.receiveStart)}}至{{ getTime(ele.couponData.receiveEnd) }}</span>
|
|
152
|
+
</div>
|
|
153
|
+
<!-- <span class="not_btn">已领取</span>
|
|
154
|
+
<span class="not_btn">已超期</span> -->
|
|
155
|
+
<span class="get_btn" @click="getWelfare(ele.goodsClassId)">点击领取</span>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
|
|
161
|
+
<!-- 商品 -->
|
|
162
|
+
<div
|
|
163
|
+
:class="[
|
|
164
|
+
'cube-container',
|
|
165
|
+
`arrange-${ele.showTitle}`,
|
|
166
|
+
{ isLc: isLc },
|
|
167
|
+
]"
|
|
168
|
+
:style="{
|
|
169
|
+
backgroundColor: ele.goodsBgColor,
|
|
170
|
+
}"
|
|
171
|
+
>
|
|
172
|
+
<div
|
|
173
|
+
v-for="(item, index) in ele.goodsList"
|
|
174
|
+
class="cube-item"
|
|
175
|
+
:style="{
|
|
176
|
+
marginTop: `${ele.goodsMt}px`,
|
|
177
|
+
marginBottom: `${ele.goodsBt}px`,
|
|
178
|
+
}"
|
|
179
|
+
:key="item.skuCode"
|
|
180
|
+
@click="goGoodsDetail(item)"
|
|
181
|
+
>
|
|
182
|
+
<div class="imgWrapper">
|
|
183
|
+
<div
|
|
184
|
+
v-if="
|
|
185
|
+
isLc === false &&
|
|
186
|
+
(item.goodsSupplynum <= 0 || item.goodsProperty5 === '1')
|
|
187
|
+
"
|
|
188
|
+
class="imgMarked"
|
|
189
|
+
:style="{
|
|
190
|
+
borderRadius: `${ele.borderRaduils}px`,
|
|
191
|
+
}"
|
|
192
|
+
>
|
|
193
|
+
<div class="maskState">
|
|
194
|
+
{{ getMaskState(item.goodsProperty5) }}
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
<img
|
|
198
|
+
class="goodsImg"
|
|
199
|
+
:src="
|
|
200
|
+
item.dataPic
|
|
201
|
+
? item.dataPic.indexOf('http') === -1
|
|
202
|
+
? domainNameUrl + item.dataPic
|
|
203
|
+
: item.dataPic
|
|
204
|
+
: ''
|
|
205
|
+
"
|
|
206
|
+
alt=""
|
|
207
|
+
:style="{
|
|
208
|
+
borderRadius: `${ele.borderRaduils}px`,
|
|
209
|
+
}"
|
|
210
|
+
/>
|
|
211
|
+
</div>
|
|
212
|
+
<div class="goodsDescription">
|
|
213
|
+
<div
|
|
214
|
+
v-if="isLc === true && ele.showTitle === 2"
|
|
215
|
+
class="specialGoodsName"
|
|
216
|
+
:style="{
|
|
217
|
+
marginTop: ele.goodsSpacingFlag ? '5px' : '0',
|
|
218
|
+
marginBottom: ele.goodsSpacingFlag ? '5px' : '0',
|
|
219
|
+
}"
|
|
220
|
+
>
|
|
221
|
+
{{ item.goodsName }}
|
|
222
|
+
</div>
|
|
223
|
+
<div
|
|
224
|
+
v-else
|
|
225
|
+
class="goodsName"
|
|
226
|
+
:style="{
|
|
227
|
+
marginTop: ele.goodsSpacingFlag ? '5px' : '0',
|
|
228
|
+
marginBottom: ele.goodsSpacingFlag ? '5px' : '0',
|
|
229
|
+
}"
|
|
230
|
+
>
|
|
231
|
+
{{ item.goodsName }}
|
|
232
|
+
</div>
|
|
233
|
+
<section
|
|
234
|
+
class="footerContent"
|
|
235
|
+
:style="{
|
|
236
|
+
marginTop: ele.goodsSpacingFlag ? '5px' : '0',
|
|
237
|
+
marginBottom: ele.goodsSpacingFlag ? '5px' : '0',
|
|
238
|
+
}"
|
|
239
|
+
>
|
|
240
|
+
<div class="goodsPrice">
|
|
241
|
+
¥{{ item.pricesetNprice }}
|
|
242
|
+
<div class="scribing" v-if="ele.underLineFlag === 1">
|
|
243
|
+
¥{{ item.pricesetMakeprice }}
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
<div class="goodsBuy">
|
|
247
|
+
<img
|
|
248
|
+
src="https://rcyx-platform-test.yoxuan.vip/paas/shop/2021011200000001/2025-05-14/car.png"
|
|
249
|
+
@click.stop="addShoppingShow(item)"
|
|
250
|
+
style="height: 25px; width: 25px"
|
|
251
|
+
/>
|
|
252
|
+
</div>
|
|
253
|
+
</section>
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
257
|
+
<button class="moreBtn" v-if="!isLc" @click="loadMore(ele, index)">
|
|
258
|
+
查看更多
|
|
259
|
+
</button>
|
|
260
|
+
</div>
|
|
261
|
+
|
|
262
|
+
</div>
|
|
263
|
+
</div>
|
|
264
|
+
</scroll-view>
|
|
265
|
+
<!-- -->
|
|
266
|
+
</div>
|
|
267
|
+
</div>
|
|
268
|
+
</template>
|
|
269
|
+
|
|
270
|
+
<script>
|
|
271
|
+
import { isLc, getUrl, fetchGoodImpl } from "../../utils/index.js";
|
|
272
|
+
import {
|
|
273
|
+
find,
|
|
274
|
+
querySkuFromJm,
|
|
275
|
+
queryPromotionByCodeAndCheckUser,
|
|
276
|
+
} from "../../api/index.js";
|
|
277
|
+
import { fetchPost } from "../../api/http.js";
|
|
278
|
+
import { query } from "../../api/urlQuery.js";
|
|
279
|
+
import { isEmpty, isUndefined } from "lodash-es";
|
|
280
|
+
export default {
|
|
281
|
+
name: "cyy-ArsenalPromotion",
|
|
282
|
+
// bgColor: "#08fc29", //标题背景颜色
|
|
283
|
+
// goodsBgColor // 商品背景颜色
|
|
284
|
+
// goodsClassNameFlag: 0, //分类名称显示隐藏
|
|
285
|
+
// titleColor: "#08fc29", //分类标题颜色
|
|
286
|
+
// titleFontSize: 20, //分类标题字号
|
|
287
|
+
// titleMt: 20, //分类标题上边距
|
|
288
|
+
// titleBt: 20, //分类标题下边距
|
|
289
|
+
// iconFlag: 1, //分类Icon显示隐藏
|
|
290
|
+
// iconSize: 20, //分类标题大小
|
|
291
|
+
// classfooterImg: "", //分类底图
|
|
292
|
+
// showTitle: 1, //展示风格
|
|
293
|
+
// underLineFlag: 1, //划线价显示隐藏
|
|
294
|
+
// borderRaduils: 1, //边角样式
|
|
295
|
+
// goodsSpacingFlag: 1, //商品间距(有/无)
|
|
296
|
+
// goodsMt: 20, //商品上边距
|
|
297
|
+
// goodsBt: 20, //商品下边距
|
|
298
|
+
// synchronousOther: false, //同步其他
|
|
299
|
+
// changeGoodsType: 1, // 选择商品或分类商品 1分类2商品
|
|
300
|
+
// changeGoodsStr: '', // 选择的商品数据
|
|
301
|
+
props: {
|
|
302
|
+
props: {
|
|
303
|
+
compName: String, //组件名称
|
|
304
|
+
headImg: String, //头部展示图
|
|
305
|
+
classList: Array, //选择分类
|
|
306
|
+
promotionType: Number, //促销类型
|
|
307
|
+
carIcon: Number, //购物车图标
|
|
308
|
+
bgColor: String, //导航栏背景颜色
|
|
309
|
+
getBgColor: String, //已选导航背景颜色
|
|
310
|
+
fontColor: String, //导航字体颜色
|
|
311
|
+
getfontColor: String, //已选导航字体颜色
|
|
312
|
+
navigationHeight: Number, //导航栏高度
|
|
313
|
+
navigationFontSize: Number, //导航栏字号
|
|
314
|
+
classDomainList: Array, //分类项配置集合
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
data() {
|
|
318
|
+
return {
|
|
319
|
+
classTitleStyle: {
|
|
320
|
+
height: this.props.navigationHeight + "px",
|
|
321
|
+
lineHeight: this.props.navigationHeight + "px",
|
|
322
|
+
fontSize: this.props.navigationFontSize + "px",
|
|
323
|
+
},
|
|
324
|
+
classDomainList: [],
|
|
325
|
+
domainNameUrl: "",
|
|
326
|
+
isLc: isLc,
|
|
327
|
+
checkClassIndex: -1,
|
|
328
|
+
targetId: "",
|
|
329
|
+
scrollTop: 0,
|
|
330
|
+
page: 1,
|
|
331
|
+
rows: 12,
|
|
332
|
+
};
|
|
333
|
+
},
|
|
334
|
+
mounted() {
|
|
335
|
+
this.domainNameUrl = getUrl(this);
|
|
336
|
+
this.classDomainList = JSON.parse(
|
|
337
|
+
JSON.stringify(this.props.classDomainList)
|
|
338
|
+
);
|
|
339
|
+
this.initgoods();
|
|
340
|
+
},
|
|
341
|
+
computed: {},
|
|
342
|
+
methods: {
|
|
343
|
+
initgoods() {
|
|
344
|
+
let that = this;
|
|
345
|
+
if (isLc) {
|
|
346
|
+
return this.LcGetGoodsList(that);
|
|
347
|
+
}
|
|
348
|
+
return this.getGoodsList(that);
|
|
349
|
+
},
|
|
350
|
+
async LcGetGoodsList(that) {
|
|
351
|
+
// 遍历classDomainList
|
|
352
|
+
let tempList = that.classDomainList;
|
|
353
|
+
for (let item of tempList) {
|
|
354
|
+
const url = `${queryPromotionByCodeAndCheckUser}?promotionCode=${item.goodsClassId}`;
|
|
355
|
+
let result = await fetchPost(url)
|
|
356
|
+
console.log(result,'result')
|
|
357
|
+
// 从 URL 中获取 channelCode
|
|
358
|
+
const urlParams = new URLSearchParams(
|
|
359
|
+
window.location.hash.split("?")[1] || window.location.search
|
|
360
|
+
);
|
|
361
|
+
const channelCode = urlParams.get("channelCode") || "";
|
|
362
|
+
if (result && result.length > 0 && result[0].pbCode == '0003' && result[0].activationMode == '1') {
|
|
363
|
+
console.log("代金券")
|
|
364
|
+
item.promotionType = 4
|
|
365
|
+
let condAmount = result[0].pmPromotionConditionList ? result[0].pmPromotionConditionList[0].condAmount : ''
|
|
366
|
+
let condOnceNums = result[0].pmPromotionConditionList ? result[0].pmPromotionConditionList[0].condOnceNums : ''
|
|
367
|
+
const couponData = {
|
|
368
|
+
promotionBegintime: result[0].promotionBegintime, // 代金券开始时间
|
|
369
|
+
promotionEndtime: result[0].promotionEndtime, // 代金券结束时间
|
|
370
|
+
receiveStart: result[0].receiveStart, // 代金券领取开始时间
|
|
371
|
+
receiveEnd: result[0].receiveEnd, // 代金券领取结束时间
|
|
372
|
+
promotionFrequency: result[0].promotionFrequency, // 领取次数 0为不限制
|
|
373
|
+
condAmount, // 领取条件
|
|
374
|
+
condOnceNums // 优惠面额
|
|
375
|
+
}
|
|
376
|
+
item.couponData = couponData
|
|
377
|
+
}
|
|
378
|
+
if (result && result.length > 0 && result[0].rangeType == 5) {
|
|
379
|
+
let skuNoList = []
|
|
380
|
+
const firstItem = result[0];
|
|
381
|
+
console.log(firstItem,'firstItem')
|
|
382
|
+
if (firstItem.pmPromotionRangeList && firstItem.pmPromotionRangeList.length > 0) {
|
|
383
|
+
firstItem.pmPromotionRangeList.forEach(item => {
|
|
384
|
+
skuNoList.push(item.rangeCode);
|
|
385
|
+
})
|
|
386
|
+
console.log(skuNoList,'skuNoList')
|
|
387
|
+
const url = `${find}?skuNo=${skuNoList.join()}&rows=12&page=1`;
|
|
388
|
+
const res = await fetchPost(url);
|
|
389
|
+
item.goodsList = res.list
|
|
390
|
+
console.log(item,'商品')
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
} else if (result && result.length > 0 && result[0].rangeType == 0) {
|
|
394
|
+
// 全部商品
|
|
395
|
+
const url = `${find}?rows=12&page=1`;
|
|
396
|
+
const res = await fetchPost(url);
|
|
397
|
+
item.goodsList = res.list
|
|
398
|
+
console.log(item,'商品')
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
}
|
|
403
|
+
that.classDomainList = tempList;
|
|
404
|
+
},
|
|
405
|
+
async getGoodsList(that) {
|
|
406
|
+
console.log(that.classDomainList,'活动')
|
|
407
|
+
// 遍历classDomainList
|
|
408
|
+
for (let item of that.classDomainList) {
|
|
409
|
+
// 调用getNotice方法,传入classtreeCode
|
|
410
|
+
let params = {
|
|
411
|
+
promotionCode: item.goodsClassId,
|
|
412
|
+
};
|
|
413
|
+
let result = await that.http.get(`${queryPromotionByCodeAndCheckUser}`, params);
|
|
414
|
+
// 如果是代金券并且用户领取
|
|
415
|
+
if (result && result.length > 0 && result[0].pbCode == '0003' && result[0].activationMode == '1') {
|
|
416
|
+
console.log("代金券")
|
|
417
|
+
that.$set(item, "promotionType", 4);
|
|
418
|
+
let condAmount = result[0].pmPromotionConditionList ? result[0].pmPromotionConditionList[0].condAmount : ''
|
|
419
|
+
let condOnceNums = result[0].pmPromotionConditionList ? result[0].pmPromotionConditionList[0].condOnceNums : ''
|
|
420
|
+
const couponData = {
|
|
421
|
+
promotionBegintime: result[0].promotionBegintime, // 代金券开始时间
|
|
422
|
+
promotionEndtime: result[0].promotionEndtime, // 代金券结束时间
|
|
423
|
+
receiveStart: result[0].receiveStart, // 代金券领取开始时间
|
|
424
|
+
receiveEnd: result[0].receiveEnd, // 代金券领取结束时间
|
|
425
|
+
promotionFrequency: result[0].promotionFrequency, // 领取次数 0为不限制
|
|
426
|
+
condAmount, // 领取条件
|
|
427
|
+
condOnceNums // 优惠面额
|
|
428
|
+
}
|
|
429
|
+
that.$set(item, "couponData", couponData);
|
|
430
|
+
}
|
|
431
|
+
// 部分商品
|
|
432
|
+
if (result && result.length > 0 && result[0].rangeType == 5) {
|
|
433
|
+
let skuNoList = []
|
|
434
|
+
const firstItem = result[0];
|
|
435
|
+
console.log(firstItem,'firstItem')
|
|
436
|
+
if (firstItem.pmPromotionRangeList && firstItem.pmPromotionRangeList.length > 0) {
|
|
437
|
+
firstItem.pmPromotionRangeList.forEach(item => {
|
|
438
|
+
skuNoList.push(item.rangeCode);
|
|
439
|
+
})
|
|
440
|
+
console.log(skuNoList,'skuNoList')
|
|
441
|
+
let paramObj = {
|
|
442
|
+
skuNo: skuNoList.join()
|
|
443
|
+
}
|
|
444
|
+
const res = await that.getGoodsImpl()(this, paramObj, this.page);
|
|
445
|
+
that.$set(item, "goodsList", res.list);
|
|
446
|
+
that.$set(item, "skuNoList", skuNoList.join());
|
|
447
|
+
that.$set(item, "page", 1);
|
|
448
|
+
console.log(item,'商品111')
|
|
449
|
+
} else {
|
|
450
|
+
that.$set(item, "goodsList", []);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
} else if (result && result.length > 0 && result[0].rangeType == 0) {
|
|
454
|
+
// 全部商品
|
|
455
|
+
const res = await that.getGoodsImpl()(this, {}, this.page);
|
|
456
|
+
that.$set(item, "goodsList", res.list);
|
|
457
|
+
that.$set(item, "page", 1);
|
|
458
|
+
that.$set(item, "total", res.total);
|
|
459
|
+
console.log(item,'商品')
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
async loadMore(ele, idx) {
|
|
464
|
+
console.log(ele, idx, "加载当前活动商品");
|
|
465
|
+
if (ele.skuNoList) {
|
|
466
|
+
let paramObj = {
|
|
467
|
+
skuNo: ele.skuNoList
|
|
468
|
+
};
|
|
469
|
+
let totalNum = ele.skuNoList.split(',').length;
|
|
470
|
+
if (Math.ceil(totalNum / this.rows) > ele.page) {
|
|
471
|
+
console.log("分页加载")
|
|
472
|
+
ele.page++;
|
|
473
|
+
const res = await this.getGoodsImpl()(this, paramObj, ele.page);
|
|
474
|
+
this.$set(ele, "goodsList", [...ele.goodsList,...res.list]);
|
|
475
|
+
this.$set(ele, "page",ele.page);
|
|
476
|
+
} else {
|
|
477
|
+
if (!isLc) {
|
|
478
|
+
uni.$u.toast("没有更多了~");
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
}
|
|
482
|
+
} else {
|
|
483
|
+
console.log("全部商品")
|
|
484
|
+
if (Math.ceil(ele.total / this.rows) > ele.page) {
|
|
485
|
+
console.log("分页加载----全部商品")
|
|
486
|
+
ele.page++;
|
|
487
|
+
const res = await this.getGoodsImpl()(this, {}, ele.page);
|
|
488
|
+
this.$set(ele, "goodsList", [...ele.goodsList,...res.list]);
|
|
489
|
+
this.$set(ele, "page", ele.page);
|
|
490
|
+
} else {
|
|
491
|
+
if (!isLc) {
|
|
492
|
+
uni.$u.toast("没有更多了~");
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
},
|
|
498
|
+
getGoodsImpl() {
|
|
499
|
+
console.log(99999);
|
|
500
|
+
const uniIo = async (that, paramObj, page) => {
|
|
501
|
+
const { list, total } = await that.http.get(
|
|
502
|
+
`web/es/searchengine/find.json?rows=12&page=${page}`,
|
|
503
|
+
paramObj
|
|
504
|
+
);
|
|
505
|
+
if (paramObj.hasOwnProperty('skuNo')) {
|
|
506
|
+
const skuCodeList = paramObj.skuNo.split(",");
|
|
507
|
+
let sortedArrays = [];
|
|
508
|
+
|
|
509
|
+
skuCodeList.forEach((skuNo) => {
|
|
510
|
+
list.forEach((item) => {
|
|
511
|
+
if (item.skuNo === skuNo) {
|
|
512
|
+
sortedArrays.push(item);
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
});
|
|
516
|
+
console.log("findList", sortedArrays);
|
|
517
|
+
return { list: sortedArrays, total };
|
|
518
|
+
} else {
|
|
519
|
+
return { list, total };
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
};
|
|
524
|
+
const fetchIO = async (that, paramObj) => {
|
|
525
|
+
const { id, goods } = that.props;
|
|
526
|
+
if (isEmpty(goods)) return Promise.resolve({ list: [] });
|
|
527
|
+
|
|
528
|
+
const isEqualFlag = handleCache(that);
|
|
529
|
+
|
|
530
|
+
if (isEqualFlag) {
|
|
531
|
+
return Promise.resolve(fetchGoodsInfo(id));
|
|
532
|
+
}
|
|
533
|
+
// 从 URL 中获取 channelCode
|
|
534
|
+
const urlParams = new URLSearchParams(
|
|
535
|
+
window.location.hash.split("?")[1] || window.location.search
|
|
536
|
+
);
|
|
537
|
+
const channelCode = urlParams.get("channelCode") || "";
|
|
538
|
+
const saasToken = localStorage.getItem("saas-token");
|
|
539
|
+
return await fetch(
|
|
540
|
+
getUrl() +
|
|
541
|
+
find +
|
|
542
|
+
"?rows=12&page=1&skuNo=" +
|
|
543
|
+
paramObj.skuNo +
|
|
544
|
+
"&channelCode=" +
|
|
545
|
+
channelCode,
|
|
546
|
+
{
|
|
547
|
+
method: "GET",
|
|
548
|
+
headers: {
|
|
549
|
+
"saas-token": saasToken,
|
|
550
|
+
"user-agent":
|
|
551
|
+
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36",
|
|
552
|
+
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
|
553
|
+
},
|
|
554
|
+
credentials: "include",
|
|
555
|
+
}
|
|
556
|
+
)
|
|
557
|
+
.then((response) => response.json())
|
|
558
|
+
.then((res = {}) => {
|
|
559
|
+
setGoodsInfo(id, goods, res);
|
|
560
|
+
console.log("Pc数据----res")
|
|
561
|
+
return res;
|
|
562
|
+
});
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
if (isLc) {
|
|
566
|
+
return fetchIO;
|
|
567
|
+
}
|
|
568
|
+
return uniIo;
|
|
569
|
+
},
|
|
570
|
+
//点击领取优惠券
|
|
571
|
+
async getWelfare(promotionCode) {
|
|
572
|
+
if (!isLc) {
|
|
573
|
+
this.$emit("getWelfare", promotionCode)
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
getTime(timestamp) {
|
|
577
|
+
let date = new Date(timestamp);
|
|
578
|
+
// 格式化为年月日的格式
|
|
579
|
+
let year = date.getFullYear();
|
|
580
|
+
let month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1,并且确保月份是两位数
|
|
581
|
+
let day = String(date.getDate()).padStart(2, '0'); // 确保日期是两位数
|
|
582
|
+
return `${year}-${month}-${day}`;
|
|
583
|
+
},
|
|
584
|
+
checkClass(index) {
|
|
585
|
+
this.checkClassIndex = index;
|
|
586
|
+
this.targetId = `item-${index}`;
|
|
587
|
+
},
|
|
588
|
+
addShoppingShow(el) {
|
|
589
|
+
if (isLc) {
|
|
590
|
+
return;
|
|
591
|
+
}
|
|
592
|
+
this.$emit("addShoppingShow", el);
|
|
593
|
+
},
|
|
594
|
+
getMaskState(state) {
|
|
595
|
+
if (state === "1") {
|
|
596
|
+
return "预售中";
|
|
597
|
+
} else {
|
|
598
|
+
return "补货中";
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
getTextStyle(item) {
|
|
602
|
+
return {
|
|
603
|
+
color: item.titleColor || "#000000",
|
|
604
|
+
fontSize: item.titleFontSize || "16px",
|
|
605
|
+
};
|
|
606
|
+
},
|
|
607
|
+
goGoodsDetail(item) {
|
|
608
|
+
if (isLc) {
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
611
|
+
const { skuCode } = item;
|
|
612
|
+
let params = {
|
|
613
|
+
skuNo: skuCode,
|
|
614
|
+
};
|
|
615
|
+
this.$routers.push("detail", params);
|
|
616
|
+
},
|
|
617
|
+
handleScroll(e) {
|
|
618
|
+
this.scrollTop = e.detail.scrollTop;
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
|
+
};
|
|
622
|
+
</script>
|
|
623
|
+
<style lang="less" scoped>
|
|
624
|
+
.headerImg {
|
|
625
|
+
width: 100%;
|
|
626
|
+
}
|
|
627
|
+
.classTitle {
|
|
628
|
+
overflow-x: scroll;
|
|
629
|
+
white-space: nowrap;
|
|
630
|
+
padding: 0 12px;
|
|
631
|
+
.classTitleItem {
|
|
632
|
+
margin-right: 10px;
|
|
633
|
+
.classSpan {
|
|
634
|
+
border-radius: 20px;
|
|
635
|
+
padding: 4px 12px;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
.classContent {
|
|
640
|
+
.classContentItem {
|
|
641
|
+
.classContentSpan {
|
|
642
|
+
display: flex;
|
|
643
|
+
justify-content: center;
|
|
644
|
+
padding: 30px 0;
|
|
645
|
+
}
|
|
646
|
+
.classContentImg {
|
|
647
|
+
width: 100%;
|
|
648
|
+
}
|
|
649
|
+
.classContentImgBox {
|
|
650
|
+
position: relative;
|
|
651
|
+
width: 100%;
|
|
652
|
+
.classContentImg {
|
|
653
|
+
width: 100%;
|
|
654
|
+
height: auto;
|
|
655
|
+
display: block;
|
|
656
|
+
}
|
|
657
|
+
.text-overlay {
|
|
658
|
+
position: absolute;
|
|
659
|
+
top: 0;
|
|
660
|
+
left: 0;
|
|
661
|
+
width: 100%;
|
|
662
|
+
height: 100%;
|
|
663
|
+
display: flex;
|
|
664
|
+
justify-content: center;
|
|
665
|
+
align-items: center;
|
|
666
|
+
flex-direction: column;
|
|
667
|
+
.coupon {
|
|
668
|
+
display: flex;
|
|
669
|
+
position: relative;
|
|
670
|
+
height: 90px;
|
|
671
|
+
margin-top: 20px;
|
|
672
|
+
width: 100%;
|
|
673
|
+
padding: 3px 0;
|
|
674
|
+
background: url('https://qjstatic.oss-cn-shanghai.aliyuncs.com/SZRC/image/youhuibg.png') no-repeat;
|
|
675
|
+
background-size: 352px 98px;
|
|
676
|
+
.left {
|
|
677
|
+
width: 34%;
|
|
678
|
+
height: 90px;
|
|
679
|
+
display: flex;
|
|
680
|
+
flex-direction: column;
|
|
681
|
+
justify-content: center;
|
|
682
|
+
align-items: center;
|
|
683
|
+
.card {
|
|
684
|
+
font-size: 20px;
|
|
685
|
+
color: #eb5555;
|
|
686
|
+
}
|
|
687
|
+
.price {
|
|
688
|
+
font-size: 12px;
|
|
689
|
+
color: #888;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
.right {
|
|
693
|
+
height: 90px;
|
|
694
|
+
display: flex;
|
|
695
|
+
justify-content: center;
|
|
696
|
+
align-items: center;
|
|
697
|
+
margin-left: 0;
|
|
698
|
+
.right-container {
|
|
699
|
+
display: flex;
|
|
700
|
+
flex-direction: column;
|
|
701
|
+
justify-content: space-around;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.date {
|
|
705
|
+
margin-top: 15px;
|
|
706
|
+
font-size: 12px;
|
|
707
|
+
color: #888;
|
|
708
|
+
}
|
|
709
|
+
.get_btn,.not_btn {
|
|
710
|
+
width: 68px;
|
|
711
|
+
height: 20px;
|
|
712
|
+
line-height: 20px;
|
|
713
|
+
text-align: center;
|
|
714
|
+
color: #f1f1f1;
|
|
715
|
+
border-radius: 20px;
|
|
716
|
+
}
|
|
717
|
+
.get_btn {
|
|
718
|
+
background-color: #eb5555;
|
|
719
|
+
}
|
|
720
|
+
.not_btn {
|
|
721
|
+
background-color: #ccc;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
.cube-container {
|
|
730
|
+
display: grid;
|
|
731
|
+
&.arrange-4 {
|
|
732
|
+
display: flex;
|
|
733
|
+
justify-content: space-between;
|
|
734
|
+
flex-wrap: wrap;
|
|
735
|
+
.cube-item {
|
|
736
|
+
flex: 0 0 auto;
|
|
737
|
+
width: 30%;
|
|
738
|
+
max-width: 30%;
|
|
739
|
+
.goodsImg {
|
|
740
|
+
width: 100%;
|
|
741
|
+
height: 100%;
|
|
742
|
+
aspect-ratio: 1;
|
|
743
|
+
}
|
|
744
|
+
.goodsDescription {
|
|
745
|
+
.goodsPrice {
|
|
746
|
+
font-size: 18px;
|
|
747
|
+
.scribing {
|
|
748
|
+
font-size: 14px;
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
.goodsName {
|
|
752
|
+
font-size: 20px;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
.cube-item:not(:last-child) {
|
|
757
|
+
margin-right: 10px;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
&.arrange-3 {
|
|
761
|
+
display: flex;
|
|
762
|
+
overflow-x: scroll;
|
|
763
|
+
.cube-item {
|
|
764
|
+
flex: 0 0 auto;
|
|
765
|
+
width: 32%;
|
|
766
|
+
max-width: 32%;
|
|
767
|
+
.goodsImg {
|
|
768
|
+
width: 100%;
|
|
769
|
+
height: 100%;
|
|
770
|
+
aspect-ratio: 1;
|
|
771
|
+
}
|
|
772
|
+
.goodsDescription {
|
|
773
|
+
.goodsPrice {
|
|
774
|
+
font-size: 18px;
|
|
775
|
+
.scribing {
|
|
776
|
+
font-size: 14px;
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
.goodsName {
|
|
780
|
+
font-size: 20px;
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
.cube-item:not(:last-child) {
|
|
785
|
+
margin-right: 10px;
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
&.arrange-2 {
|
|
789
|
+
grid-template-columns: repeat(2, 1fr);
|
|
790
|
+
.cube-item {
|
|
791
|
+
margin: 0 5px;
|
|
792
|
+
.goodsImg {
|
|
793
|
+
width: 100%;
|
|
794
|
+
height: 100%;
|
|
795
|
+
aspect-ratio: 1;
|
|
796
|
+
}
|
|
797
|
+
.goodsDescription {
|
|
798
|
+
position: relative;
|
|
799
|
+
.goodsName {
|
|
800
|
+
font-size: 16px;
|
|
801
|
+
height: 42px;
|
|
802
|
+
width: 41vw;
|
|
803
|
+
}
|
|
804
|
+
.specialGoodsName {
|
|
805
|
+
font-size: 12px;
|
|
806
|
+
height: 42px;
|
|
807
|
+
}
|
|
808
|
+
.footerContent {
|
|
809
|
+
.goodsPrice {
|
|
810
|
+
font-size: 14px;
|
|
811
|
+
.scribing {
|
|
812
|
+
font-size: 12px;
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
&.arrange-1 {
|
|
820
|
+
.cube-item {
|
|
821
|
+
display: flex;
|
|
822
|
+
justify-content: space-around;
|
|
823
|
+
height: 100px;
|
|
824
|
+
|
|
825
|
+
.imgWrapper {
|
|
826
|
+
.goodsImg {
|
|
827
|
+
width: 100px;
|
|
828
|
+
height: 100px;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
.goodsDescription {
|
|
833
|
+
position: relative;
|
|
834
|
+
width: 100%;
|
|
835
|
+
margin-left: 20px;
|
|
836
|
+
.goodsName {
|
|
837
|
+
height: auto;
|
|
838
|
+
font-size: 16px;
|
|
839
|
+
}
|
|
840
|
+
.footerContent {
|
|
841
|
+
.goodsPrice {
|
|
842
|
+
font-size: 16px;
|
|
843
|
+
.scribing {
|
|
844
|
+
font-size: 12px;
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
.goodsBuyWrapper {
|
|
849
|
+
position: relative;
|
|
850
|
+
.goodsBuy {
|
|
851
|
+
position: absolute;
|
|
852
|
+
top: 0;
|
|
853
|
+
right: 0;
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
.cube-item {
|
|
861
|
+
.imgWrapper {
|
|
862
|
+
position: relative;
|
|
863
|
+
text-align: center;
|
|
864
|
+
}
|
|
865
|
+
.imgMarked {
|
|
866
|
+
position: absolute;
|
|
867
|
+
top: 0;
|
|
868
|
+
left: 0;
|
|
869
|
+
width: 100%;
|
|
870
|
+
height: 100%;
|
|
871
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
872
|
+
display: flex;
|
|
873
|
+
justify-content: center;
|
|
874
|
+
align-items: center;
|
|
875
|
+
z-index: 100;
|
|
876
|
+
.maskState {
|
|
877
|
+
font-size: 23px;
|
|
878
|
+
color: white;
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
.goodsDescription {
|
|
882
|
+
display: flex;
|
|
883
|
+
flex-direction: column;
|
|
884
|
+
justify-content: space-between;
|
|
885
|
+
.goodsName {
|
|
886
|
+
display: -webkit-box;
|
|
887
|
+
-webkit-line-clamp: 2;
|
|
888
|
+
-webkit-box-orient: vertical;
|
|
889
|
+
overflow: hidden;
|
|
890
|
+
text-overflow: ellipsis;
|
|
891
|
+
}
|
|
892
|
+
.footerContent {
|
|
893
|
+
display: flex;
|
|
894
|
+
justify-content: space-between;
|
|
895
|
+
align-items: flex-end;
|
|
896
|
+
.goodsPrice {
|
|
897
|
+
color: #f53a50;
|
|
898
|
+
font-weight: 600;
|
|
899
|
+
.scribing {
|
|
900
|
+
display: inline-block;
|
|
901
|
+
color: #ccc;
|
|
902
|
+
text-decoration: line-through;
|
|
903
|
+
font-weight: normal;
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
.goodsBuy {
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
</style>
|