提交 b15e437f 编写于 作者: D Devil

细节优化

上级 b71398bf
......@@ -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);
}
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册