Authored by Aiden Xu

商品详情

@@ -47,6 +47,7 @@ @@ -47,6 +47,7 @@
47 max-height: 60px; 47 max-height: 60px;
48 font-weight: 300; 48 font-weight: 300;
49 } 49 }
  50 +
50 h4 { 51 h4 {
51 color: #b0b0b0; 52 color: #b0b0b0;
52 font-weight: 200; 53 font-weight: 200;
@@ -54,16 +55,19 @@ @@ -54,16 +55,19 @@
54 margin-top: 32px; 55 margin-top: 32px;
55 margin-bottom: 0; 56 margin-bottom: 0;
56 } 57 }
  58 +
57 .image-box { 59 .image-box {
58 width: 90px; 60 width: 90px;
59 height: 120px; 61 height: 120px;
60 display: inline-block; 62 display: inline-block;
61 } 63 }
  64 +
62 .text-box { 65 .text-box {
63 display: inline-block; 66 display: inline-block;
64 margin-left: 24px; 67 margin-left: 24px;
65 max-width: 512px; 68 max-width: 512px;
66 } 69 }
  70 +
67 } 71 }
68 72
69 hr { 73 hr {
@@ -88,12 +92,14 @@ @@ -88,12 +92,14 @@
88 } 92 }
89 93
90 section { 94 section {
  95 +
91 h4 { 96 h4 {
92 margin: 0; 97 margin: 0;
93 font-size: 25px; 98 font-size: 25px;
94 line-height: 80px; 99 line-height: 80px;
95 display: inline-block; 100 display: inline-block;
96 } 101 }
  102 +
97 } 103 }
98 104
99 .add-to-cart { 105 .add-to-cart {
@@ -105,6 +111,7 @@ @@ -105,6 +111,7 @@
105 &.slide-in { 111 &.slide-in {
106 transform: translate3d(0, 0, 0); 112 transform: translate3d(0, 0, 0);
107 } 113 }
  114 +
108 } 115 }
109 </style> 116 </style>
110 <script> 117 <script>
@@ -190,7 +197,8 @@ @@ -190,7 +197,8 @@
190 return { 197 return {
191 text: size.sizeName, 198 text: size.sizeName,
192 value: size.goodsSizeSkuId, 199 value: size.goodsSizeSkuId,
193 - disabled: size.goodsSizeStorageNum === 0 200 + disabled: size.goodsSizeStorageNum === 0,
  201 + goodsId: size.goodsId
194 }; 202 };
195 }); 203 });
196 204
@@ -300,10 +308,28 @@ @@ -300,10 +308,28 @@
300 this.onAddToCart(this.selection, this.entity.pid); 308 this.onAddToCart(this.selection, this.entity.pid);
301 }, 309 },
302 310
303 - getSelection() {  
304 - // this.sizes =  
305 - return {  
306 311
  312 + getFullSelection() {
  313 + let size;
  314 +
  315 + this.sizes.forEach((item)=> {
  316 + if (item.value === this.selection.size) {
  317 + size = item;
  318 + }
  319 + });
  320 +
  321 + let color;
  322 +
  323 + this.colors.indexOf((item)=> {
  324 + if (item.value === this.selection.color) {
  325 + color = item;
  326 + }
  327 + });
  328 +
  329 + return {
  330 + size: size,
  331 + color: color,
  332 + productId: this.entity.id
307 }; 333 };
308 } 334 }
309 } 335 }