diff --git a/app/api/controller/Goods.php b/app/api/controller/Goods.php index a5c3bdb2a..257792006 100755 --- a/app/api/controller/Goods.php +++ b/app/api/controller/Goods.php @@ -160,10 +160,6 @@ class Goods extends Common // 开始处理 $params = $this->data_post; $ret = GoodsService::GoodsSpecType($params); - if($ret['code'] == 0) - { - $ret['data'] = $ret['data']['spec_type']; - } return ApiService::ApiDataReturn($ret); } @@ -180,10 +176,6 @@ class Goods extends Common // 开始处理 $params = $this->data_post; $ret = GoodsService::GoodsSpecDetail($params); - if($ret['code'] == 0) - { - $ret['data'] = $ret['data']['spec_base']; - } return ApiService::ApiDataReturn($ret); } @@ -200,10 +192,6 @@ class Goods extends Common // 开始处理 $params = $this->data_post; $ret = GoodsService::GoodsStock($params); - if($ret['code'] == 0) - { - $ret['data'] = $ret['data']['spec_base']; - } return ApiService::ApiDataReturn($ret); } diff --git a/public/static/index/default/js/goods.js b/public/static/index/default/js/goods.js index b334d429e..4bd7aeee7 100755 --- a/public/static/index/default/js/goods.js +++ b/public/static/index/default/js/goods.js @@ -83,10 +83,9 @@ function GoodsSelectedSpec() var spec_count = $('.sku-line.selected').length; if(spec_count >= sku_count) { - $('.iteminfo_parameter .sku-items').removeClass('sku-not-active'); $('.theme-signin-left .sku-items li.selected').each(function(k, v) { - spec.push({"type": $(this).data('type-value'), "value": $(this).data('value')}) + spec.push({"type": $(this).data('type-value'), "value": $(this).data('value')}); }); } } @@ -265,11 +264,7 @@ function GoodsSpecDetail() } // 获取规格值 - var spec = []; - $('.theme-signin-left .sku-items li.selected').each(function(k, v) - { - spec.push({"type": $(this).data('type-value'), "value": $(this).data('value')}) - }); + var spec = GoodsSelectedSpec(); // 已填写数量 var stock = parseInt($('#text_box').val()) || 1;