细节优化
parent
b71398bf08
commit
b15e437f3e
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue