...
|
...
|
@@ -35,12 +35,16 @@ class Cart extends Model |
|
|
])->order('createtime desc')->select();
|
|
|
|
|
|
// 删除失效数据
|
|
|
$newCartData = [];
|
|
|
foreach ($cartData as $v){
|
|
|
if(!$v->goods || !$v->sku_price){
|
|
|
$v->delete();
|
|
|
}else{
|
|
|
$v['sku_price'] = \addons\shopro\model\Goods::operActivitySkuPrice($v['goods'], [$v['sku_price']])['sku_price'][0];
|
|
|
$newCartData[] = $v;
|
|
|
}
|
|
|
}
|
|
|
return $cartData;
|
|
|
return $newCartData;
|
|
|
}
|
|
|
|
|
|
public static function add($goodsList)
|
...
|
...
|
|