1
|
<template>
|
1
|
<template>
|
2
|
<div class="layout">
|
2
|
<div class="layout">
|
3
|
<LayoutHeader class="layout-header" :show-back="true">
|
3
|
<LayoutHeader class="layout-header" :show-back="true">
|
4
|
- <template>
|
|
|
5
|
- <transition name="fade">
|
|
|
6
|
- <img-size v-show="headThumbnailVisible" class="title-thumbnail" :src="imageList && imageList[0] && imageList[0].image_url" :width="300" :height="300"/>
|
|
|
7
|
- </transition>
|
|
|
8
|
- </template>
|
|
|
9
|
-
|
|
|
10
|
- <template #opts>
|
|
|
11
|
- <cube-button class="icon-fav" :light="true" v-if="productDetail.isFav" @click="_toggleFav(false)">
|
|
|
12
|
- <svg id="icon-heart" style="width: 1rem; height: 1rem;" viewBox="0 0 28 28">
|
|
|
13
|
- <title>heart</title>
|
|
|
14
|
- <path d="M14 26c-0.25 0-0.5-0.094-0.688-0.281l-9.75-9.406c-0.125-0.109-3.563-3.25-3.563-7 0-4.578 2.797-7.313 7.469-7.313 2.734 0 5.297 2.156 6.531 3.375 1.234-1.219 3.797-3.375 6.531-3.375 4.672 0 7.469 2.734 7.469 7.313 0 3.75-3.437 6.891-3.578 7.031l-9.734 9.375c-0.187 0.187-0.438 0.281-0.688 0.281z"></path>
|
|
|
15
|
- </svg>
|
|
|
16
|
- </cube-button>
|
|
|
17
|
- <cube-button class="icon-fav" :light="true" v-else @click="_toggleFav(true)">
|
|
|
18
|
- <svg id="icon-heart-o" style="width: 1rem; height: 1rem;" viewBox="0 0 28 28">
|
|
|
19
|
- <title>heart-o</title>
|
|
|
20
|
- <path d="M26 9.312c0-4.391-2.969-5.313-5.469-5.313-2.328 0-4.953 2.516-5.766 3.484-0.375 0.453-1.156 0.453-1.531 0-0.812-0.969-3.437-3.484-5.766-3.484-2.5 0-5.469 0.922-5.469 5.313 0 2.859 2.891 5.516 2.922 5.547l9.078 8.75 9.063-8.734c0.047-0.047 2.938-2.703 2.938-5.563zM28 9.312c0 3.75-3.437 6.891-3.578 7.031l-9.734 9.375c-0.187 0.187-0.438 0.281-0.688 0.281s-0.5-0.094-0.688-0.281l-9.75-9.406c-0.125-0.109-3.563-3.25-3.563-7 0-4.578 2.797-7.313 7.469-7.313 2.734 0 5.297 2.156 6.531 3.375 1.234-1.219 3.797-3.375 6.531-3.375 4.672 0 7.469 2.734 7.469 7.313z"></path>
|
|
|
21
|
- </svg>
|
|
|
22
|
- </cube-button>
|
|
|
23
|
- </template>
|
4
|
+ <transition name="fade">
|
|
|
5
|
+ <img-size v-show="headThumbnailVisible" class="title-thumbnail" :src="imageList && imageList[0] && imageList[0].image_url" :width="300" :height="300"/>
|
|
|
6
|
+ </transition>
|
24
|
</LayoutHeader>
|
7
|
</LayoutHeader>
|
25
|
<div class="layout-context fixscroll">
|
8
|
<div class="layout-context fixscroll">
|
26
|
<cube-scroll
|
9
|
<cube-scroll
|
|
@@ -43,9 +26,11 @@ |
|
@@ -43,9 +26,11 @@ |
43
|
<div class="info">
|
26
|
<div class="info">
|
44
|
<div class="info-price">¥{{productDetail.least_price||''}}</div>
|
27
|
<div class="info-price">¥{{productDetail.least_price||''}}</div>
|
45
|
<div class="info-name">{{productDetail.product_name}}</div>
|
28
|
<div class="info-name">{{productDetail.product_name}}</div>
|
|
|
29
|
+ </div>
|
46
|
<a class="banner" v-if="resource" :href="resource.url">
|
30
|
<a class="banner" v-if="resource" :href="resource.url">
|
47
|
<img-size :src="sizeImg(resource.src)" :width="300" :height="60"/>
|
31
|
<img-size :src="sizeImg(resource.src)" :width="300" :height="60"/>
|
48
|
</a>
|
32
|
</a>
|
|
|
33
|
+ <div class="info">
|
49
|
<div class="info-list">
|
34
|
<div class="info-list">
|
50
|
<div class="info-list-item" v-if="activity && activity.length !== 0" @click="showActivity">
|
35
|
<div class="info-list-item" v-if="activity && activity.length !== 0" @click="showActivity">
|
51
|
<div class="info-list-name">促销</div>
|
36
|
<div class="info-list-name">促销</div>
|
|
@@ -71,8 +56,23 @@ |
|
@@ -71,8 +56,23 @@ |
71
|
</cube-scroll>
|
56
|
</cube-scroll>
|
72
|
</div>
|
57
|
</div>
|
73
|
<div class="footer">
|
58
|
<div class="footer">
|
|
|
59
|
+ <div class="heart">
|
|
|
60
|
+ <div class="icon-fav" v-if="productDetail.isFav" @click="_toggleFav(false)">
|
|
|
61
|
+ <svg id="icon-heart" style="width: 1rem; height: 1rem;" viewBox="0 0 28 28">
|
|
|
62
|
+ <title>heart</title>
|
|
|
63
|
+ <path d="M14 26c-0.25 0-0.5-0.094-0.688-0.281l-9.75-9.406c-0.125-0.109-3.563-3.25-3.563-7 0-4.578 2.797-7.313 7.469-7.313 2.734 0 5.297 2.156 6.531 3.375 1.234-1.219 3.797-3.375 6.531-3.375 4.672 0 7.469 2.734 7.469 7.313 0 3.75-3.437 6.891-3.578 7.031l-9.734 9.375c-0.187 0.187-0.438 0.281-0.688 0.281z"></path>
|
|
|
64
|
+ </svg>
|
|
|
65
|
+ </div>
|
|
|
66
|
+ <div class="icon-fav" v-else @click="_toggleFav(true)">
|
|
|
67
|
+ <svg id="icon-heart-o" style="width: 1rem; height: 1rem;" viewBox="0 0 28 28">
|
|
|
68
|
+ <title>heart-o</title>
|
|
|
69
|
+ <path d="M26 9.312c0-4.391-2.969-5.313-5.469-5.313-2.328 0-4.953 2.516-5.766 3.484-0.375 0.453-1.156 0.453-1.531 0-0.812-0.969-3.437-3.484-5.766-3.484-2.5 0-5.469 0.922-5.469 5.313 0 2.859 2.891 5.516 2.922 5.547l9.078 8.75 9.063-8.734c0.047-0.047 2.938-2.703 2.938-5.563zM28 9.312c0 3.75-3.437 6.891-3.578 7.031l-9.734 9.375c-0.187 0.187-0.438 0.281-0.688 0.281s-0.5-0.094-0.688-0.281l-9.75-9.406c-0.125-0.109-3.563-3.25-3.563-7 0-4.578 2.797-7.313 7.469-7.313 2.734 0 5.297 2.156 6.531 3.375 1.234-1.219 3.797-3.375 6.531-3.375 4.672 0 7.469 2.734 7.469 7.313z"></path>
|
|
|
70
|
+ </svg>
|
|
|
71
|
+ </div>
|
|
|
72
|
+ 收藏
|
|
|
73
|
+ </div>
|
74
|
<cube-button class="sell" @click="sell">出售</cube-button>
|
74
|
<cube-button class="sell" @click="sell">出售</cube-button>
|
75
|
- <cube-button class="buy" @click="buy">购买 <span>¥{{ productDetail.least_price || '-' }}</span></cube-button>
|
75
|
+ <cube-button class="buy active" @click="buy">购买</cube-button>
|
76
|
</div>
|
76
|
</div>
|
77
|
<activity-list-sheet v-if="showActivitySheet" :list="activity" @hidden="onActivitySheetHidden"/>
|
77
|
<activity-list-sheet v-if="showActivitySheet" :list="activity" @hidden="onActivitySheetHidden"/>
|
78
|
<size-select-sheet v-if="showSizeSelectSheet"
|
78
|
<size-select-sheet v-if="showSizeSelectSheet"
|
|
@@ -334,6 +334,7 @@ export default { |
|
@@ -334,6 +334,7 @@ export default { |
334
|
margin: 0 auto;
|
334
|
margin: 0 auto;
|
335
|
}
|
335
|
}
|
336
|
}
|
336
|
}
|
|
|
337
|
+
|
337
|
.banner {
|
338
|
.banner {
|
338
|
padding: 20px 0 0;
|
339
|
padding: 20px 0 0;
|
339
|
display: block;
|
340
|
display: block;
|
|
@@ -372,17 +373,26 @@ export default { |
|
@@ -372,17 +373,26 @@ export default { |
372
|
}
|
373
|
}
|
373
|
|
374
|
|
374
|
.info {
|
375
|
.info {
|
375
|
- padding: 0 40px;
|
376
|
+ padding: 14px 40px;
|
376
|
|
377
|
|
377
|
&-price {
|
378
|
&-price {
|
378
|
- color: #08304b;
|
|
|
379
|
- font-size: 40px;
|
379
|
+ color: #d0021b;
|
|
|
380
|
+ font-size: 48px;
|
380
|
font-weight: bold;
|
381
|
font-weight: bold;
|
|
|
382
|
+ text-align: center;
|
|
|
383
|
+
|
|
|
384
|
+ i {
|
|
|
385
|
+ font-style: normal;
|
|
|
386
|
+ font-size: 36px;
|
|
|
387
|
+ vertical-align: text-bottom;
|
|
|
388
|
+ }
|
381
|
}
|
389
|
}
|
382
|
|
390
|
|
383
|
&-name {
|
391
|
&-name {
|
384
|
- font-size: 30px;
|
|
|
385
|
- line-height: 1.4;
|
392
|
+ font-size: 28px;
|
|
|
393
|
+ color: #999;
|
|
|
394
|
+ text-align: center;
|
|
|
395
|
+ line-height: 32px;
|
386
|
}
|
396
|
}
|
387
|
|
397
|
|
388
|
&-list {
|
398
|
&-list {
|
|
@@ -393,34 +403,43 @@ export default { |
|
@@ -393,34 +403,43 @@ export default { |
393
|
display: flex;
|
403
|
display: flex;
|
394
|
justify-content: space-between;
|
404
|
justify-content: space-between;
|
395
|
border-bottom: 1px solid #eee;
|
405
|
border-bottom: 1px solid #eee;
|
396
|
-
|
|
|
397
|
- &:last-child {
|
|
|
398
|
- border-bottom: 0;
|
|
|
399
|
- }
|
406
|
+ font-size: 28px;
|
|
|
407
|
+ box-sizing: border-box;
|
400
|
}
|
408
|
}
|
401
|
|
409
|
|
402
|
&-name {
|
410
|
&-name {
|
403
|
/* font-family: PingFang-SC-Regular; */
|
411
|
/* font-family: PingFang-SC-Regular; */
|
404
|
- font-size: 28px;
|
|
|
405
|
color: #999;
|
412
|
color: #999;
|
406
|
- letter-spacing: 0;
|
|
|
407
|
}
|
413
|
}
|
408
|
|
414
|
|
409
|
&-value {
|
415
|
&-value {
|
410
|
/* font-family: SFProText-Medium; */
|
416
|
/* font-family: SFProText-Medium; */
|
411
|
- font-size: 28px;
|
|
|
412
|
color: #000;
|
417
|
color: #000;
|
413
|
letter-spacing: 0;
|
418
|
letter-spacing: 0;
|
414
|
- text-align: right;
|
|
|
415
|
font-weight: bold;
|
419
|
font-weight: bold;
|
416
|
}
|
420
|
}
|
417
|
}
|
421
|
}
|
|
|
422
|
+
|
|
|
423
|
+ .ref-img {
|
|
|
424
|
+ margin-top: 40px;
|
|
|
425
|
+ }
|
418
|
}
|
426
|
}
|
419
|
|
427
|
|
420
|
.ref-img {
|
428
|
.ref-img {
|
421
|
width: 100%;
|
429
|
width: 100%;
|
422
|
}
|
430
|
}
|
423
|
|
431
|
|
|
|
432
|
+ .recommend {
|
|
|
433
|
+ margin-top: 20px;
|
|
|
434
|
+
|
|
|
435
|
+ h2 {
|
|
|
436
|
+ font-size: 36px;
|
|
|
437
|
+ line-height: 50px;
|
|
|
438
|
+ padding: 20px 0;
|
|
|
439
|
+ margin: 0 40px;
|
|
|
440
|
+ }
|
|
|
441
|
+ }
|
|
|
442
|
+
|
424
|
.title-thumbnail {
|
443
|
.title-thumbnail {
|
425
|
height: 100%;
|
444
|
height: 100%;
|
426
|
}
|
445
|
}
|
|
@@ -428,42 +447,31 @@ export default { |
|
@@ -428,42 +447,31 @@ export default { |
428
|
.footer {
|
447
|
.footer {
|
429
|
display: flex;
|
448
|
display: flex;
|
430
|
text-align: center;
|
449
|
text-align: center;
|
|
|
450
|
+ padding: 16px 30px;
|
431
|
|
451
|
|
432
|
- .sell,
|
|
|
433
|
- .buy {
|
|
|
434
|
- flex-basis: auto;
|
|
|
435
|
- border-top: 1px solid $primary-color;
|
|
|
436
|
- line-height: 60px;
|
|
|
437
|
- font-size: 28px;
|
|
|
438
|
- }
|
452
|
+ @include cube-ufo-btn;
|
439
|
|
453
|
|
440
|
- .sell {
|
|
|
441
|
- flex: 1;
|
|
|
442
|
- color: $primary-color;
|
|
|
443
|
- background: #fff;
|
454
|
+ .heart {
|
|
|
455
|
+ margin-right: auto;
|
|
|
456
|
+ text-align: center;
|
|
|
457
|
+ width: 3em;
|
|
|
458
|
+ color: #888;
|
|
|
459
|
+ font-size: 22px;
|
|
|
460
|
+ line-height: 32px;
|
|
|
461
|
+
|
|
|
462
|
+ svg {
|
|
|
463
|
+ width: 48px;
|
|
|
464
|
+ height: 48px;
|
|
|
465
|
+ color: #888;
|
|
|
466
|
+ fill: currentColor;
|
|
|
467
|
+ stroke: currentColor;
|
|
|
468
|
+ }
|
444
|
}
|
469
|
}
|
445
|
|
470
|
|
|
|
471
|
+ .sell,
|
446
|
.buy {
|
472
|
.buy {
|
447
|
- border-left: 1px solid $primary-color;
|
|
|
448
|
- color: #fff;
|
|
|
449
|
- flex: 2;
|
|
|
450
|
- background-color: $primary-color;
|
|
|
451
|
-
|
|
|
452
|
- span {
|
|
|
453
|
- color: $sub-color;
|
|
|
454
|
- }
|
473
|
+ flex: 0 0 6em;
|
455
|
}
|
474
|
}
|
456
|
}
|
475
|
}
|
457
|
|
476
|
|
458
|
- .associated-products {
|
|
|
459
|
- margin: 40px 0;
|
|
|
460
|
- }
|
|
|
461
|
- .recommend {
|
|
|
462
|
- h2 {
|
|
|
463
|
- font-size: 40px;
|
|
|
464
|
- line-height: 56px;
|
|
|
465
|
- padding: 32px 0;
|
|
|
466
|
- text-align: center;
|
|
|
467
|
- }
|
|
|
468
|
- }
|
|
|
469
|
</style> |
477
|
</style> |