...
|
...
|
@@ -17,7 +17,7 @@ use think\Db; |
|
|
*/
|
|
|
class Classification extends Api
|
|
|
{
|
|
|
protected $noNeedLogin = ['*'];
|
|
|
protected $noNeedLogin = ['sort'];
|
|
|
protected $noNeedRight = ['*'];
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -99,6 +99,10 @@ class Classification extends Api |
|
|
$goods_spec = Db::name('litestore_goods_spec')
|
|
|
->where('goods_id',$item['goods_id'])
|
|
|
->find();
|
|
|
$item['cart_number'] = Db::name('cart')
|
|
|
->where('user_id',$this->auth->id)
|
|
|
->where('goods_id',$item['goods_id'])
|
|
|
->sum('number');
|
|
|
$item['price'] = $goods_spec['goods_price'];
|
|
|
$item['line_price'] = $goods_spec['line_price'];
|
|
|
});
|
...
|
...
|
@@ -110,6 +114,10 @@ class Classification extends Api |
|
|
$goods_spec = Db::name('litestore_goods_spec')
|
|
|
->where('goods_id',$item['goods_id'])
|
|
|
->find();
|
|
|
$item['cart_number'] = Db::name('cart')
|
|
|
->where('user_id',$this->auth->id)
|
|
|
->where('goods_id',$item['goods_id'])
|
|
|
->sum('number');
|
|
|
$item['price'] = $goods_spec['goods_price'];
|
|
|
$item['line_price'] = $goods_spec['line_price'];
|
|
|
});
|
...
|
...
|
|