Authored by biao

优化skn获取代码

@@ -11,7 +11,7 @@ var $ = require('jquery'), @@ -11,7 +11,7 @@ var $ = require('jquery'),
11 11
12 var productId = $('#productId').val(); 12 var productId = $('#productId').val();
13 13
14 -var skn = $('#preferenceUrl').val().split('?')[1].split('&')[0].split('=')[1], 14 +var skn = $('#productSkn').val(),
15 productCode = $('#limitProductCode').val(); 15 productCode = $('#limitProductCode').val();
16 16
17 $('#likeBtn').on('touchstart', function() { 17 $('#likeBtn').on('touchstart', function() {
@@ -177,6 +177,8 @@ @@ -177,6 +177,8 @@
177 <input id="preferenceUrl" type="hidden" value="{{preferenceUrl}}"> 177 <input id="preferenceUrl" type="hidden" value="{{preferenceUrl}}">
178 {{/if}} 178 {{/if}}
179 179
  180 + <input id="productSkn" type="hidden" value="{{productSkn}}">
  181 +
180 {{#loginUrl}} 182 {{#loginUrl}}
181 <input type="hidden" name="loginUrl" id="loginUrl" value="{{.}}"> 183 <input type="hidden" name="loginUrl" id="loginUrl" value="{{.}}">
182 {{/loginUrl}} 184 {{/loginUrl}}
@@ -169,6 +169,8 @@ class DetailModel @@ -169,6 +169,8 @@ class DetailModel
169 $result['preferenceUrl'] = Helpers::url('/product/detail/preference', array('productSkn' => $baseInfo['erpProductId'], 'brandId' => $baseInfo['brand']['id']), ''); 169 $result['preferenceUrl'] = Helpers::url('/product/detail/preference', array('productSkn' => $baseInfo['erpProductId'], 'brandId' => $baseInfo['brand']['id']), '');
170 } 170 }
171 171
  172 + $result['productSkn'] = $baseInfo['erpProductId'];
  173 +
172 // 商品信息 174 // 商品信息
173 if (!empty($baseInfo['goodsList'])) { 175 if (!empty($baseInfo['goodsList'])) {
174 $colorGroup = array(); 176 $colorGroup = array();