Authored by Rock Zhang

添加购物车商品链接地址

@@ -576,30 +576,31 @@ class Helpers @@ -576,30 +576,31 @@ class Helpers
576 $oneGoods['thumb'] = !empty($value['goods_images']) ? Images::getImageUrl($value['goods_images'], 90, 100) : ''; 576 $oneGoods['thumb'] = !empty($value['goods_images']) ? Images::getImageUrl($value['goods_images'], 90, 100) : '';
577 $oneGoods['color'] = $value['color_name']; 577 $oneGoods['color'] = $value['color_name'];
578 $oneGoods['size'] = $value['size_name']; 578 $oneGoods['size'] = $value['size_name'];
579 - $oneGoods['isSelected'] = $value['selected'] === 'Y'; 579 + $oneGoods['checked'] = $value['selected'] === 'Y';
580 $oneGoods['price'] = self::transPrice($value['sales_price']); 580 $oneGoods['price'] = self::transPrice($value['sales_price']);
581 $oneGoods['count'] = $value['buy_number']; 581 $oneGoods['count'] = $value['buy_number'];
582 582
583 - if ($isValid) { 583 + if ($isValid) { // 库存不足
584 $oneGoods['lowStocks'] = ($value['buy_number'] > $value['storage_number']); 584 $oneGoods['lowStocks'] = ($value['buy_number'] > $value['storage_number']);
585 } 585 }
586 586
587 //gift=>是否赠品,advanceBuy=>是否加价购,soldOut=>失效商品; 587 //gift=>是否赠品,advanceBuy=>是否加价购,soldOut=>失效商品;
588 if (!isset($value['goods_type'])) { 588 if (!isset($value['goods_type'])) {
589 - $oneGoods['isSoldOut'] = true; 589 + $oneGoods['inValid'] = true;
590 } elseif ($value['goods_type'] == 'gift' && !isset($value['isAdvanceBuy'])) { 590 } elseif ($value['goods_type'] == 'gift' && !isset($value['isAdvanceBuy'])) {
591 $oneGoods['isGift'] = true; 591 $oneGoods['isGift'] = true;
592 } elseif ($value['goods_type'] == 'price_gift') { 592 } elseif ($value['goods_type'] == 'price_gift') {
593 $oneGoods['isAdvanceBuy'] = true; 593 $oneGoods['isAdvanceBuy'] = true;
  594 + } else {
  595 + $oneGoods['showCheckbox'] = true;
594 } 596 }
  597 +
595 // 上市期 598 // 上市期
596 if ($isAdvanceCart && !empty($value['expect_arrival_time'])) { 599 if ($isAdvanceCart && !empty($value['expect_arrival_time'])) {
597 $oneGoods['appearDate'] = $value['expect_arrival_time']; 600 $oneGoods['appearDate'] = $value['expect_arrival_time'];
598 } 601 }
599 // 商品链接 602 // 商品链接
600 - if (isset($value['cn_alphabet'])) {  
601 - $oneGoods['url'] = self::url('/product/pro_' . $value['product_id'] . '_' . $value['goods_id'] . '/' . $value['cn_alphabet'] . '.html');  
602 - } 603 + $oneGoods['link'] = self::url('/product/show_' . $value['product_skn'] . '.html');
603 604
604 $arr[$key] = $oneGoods; 605 $arr[$key] = $oneGoods;
605 } 606 }
@@ -4,11 +4,13 @@ @@ -4,11 +4,13 @@
4 {{/if}} 4 {{/if}}
5 5
6 {{#if showCheckbox}} 6 {{#if showCheckbox}}
7 - <span class="checkbox{{#if checked}} icon-cb-checked{{^}} icon-checkbox{{/if}}iconfont"></span> 7 + <span class="checkbox{{#if checked}} icon-cb-checked{{^}} icon-checkbox{{/if}} iconfont"></span>
8 {{/if}} 8 {{/if}}
9 9
10 <div class="info"> 10 <div class="info">
11 - <img class="thumb lazy" data-original="{{thumb}}"> 11 + <a href="{{link}}">
  12 + <img class="thumb lazy" data-original="{{thumb}}">
  13 + </a>
12 {{#if isAdvanceBuy}} 14 {{#if isAdvanceBuy}}
13 <p class="few-tag plus-tag">加价购</p> 15 <p class="few-tag plus-tag">加价购</p>
14 {{/if}} 16 {{/if}}
@@ -17,7 +19,7 @@ @@ -17,7 +19,7 @@
17 {{/if}} 19 {{/if}}
18 20
19 <div class="deps show"> 21 <div class="deps show">
20 - <p class="name row">{{name}}</p> 22 + <a href="{{link}}" class="name row">{{name}}</a>
21 <span class="count"> 23 <span class="count">
22 ×{{count}} 24 ×{{count}}
23 </span> 25 </span>