...
|
...
|
@@ -58,8 +58,8 @@ class Goods extends Api |
|
|
}
|
|
|
$goods = $goodsmodel::get($goods_id);
|
|
|
$goods_spec = Db::name('litestore_goods_spec')->where('goods_id', $goods['goods_id'])->find();
|
|
|
$goods['price'] = round($goods_spec['goods_price'], 2);
|
|
|
$goods['line_price'] = round($goods_spec['line_price'], 2);
|
|
|
$goods['price'] = $goods_spec['goods_price'];
|
|
|
$goods['line_price'] = $goods_spec['line_price'];
|
|
|
//判断是否打折
|
|
|
$goods['is_discount'] = 'is';
|
|
|
if ($goods_spec['goods_price'] == $goods_spec['line_price']) {
|
...
|
...
|
@@ -150,8 +150,6 @@ class Goods extends Api |
|
|
}
|
|
|
$goods_spec = GoodsSpec::all(['goods_id' => $goods_id]);
|
|
|
foreach ($goods_spec as &$value) {
|
|
|
$value['goods_price'] = round($value['goods_price'], 2);
|
|
|
$value['line_price'] = round($value['line_price'], 2);
|
|
|
//判断是否打折
|
|
|
$value['is_discount'] = 'is';
|
|
|
if ($value['goods_price'] == $value['line_price']) {
|
...
|
...
|
|