作者 何书鹏

购物车排序

... ... @@ -32,7 +32,7 @@ class Cart extends Model
$user = User::info();
$cartData = self::with('goods,sku_price')->where([
'user_id' => $user->id
])->select();
])->order('createtime desc')->select();
// 删除失效数据
foreach ($cartData as $v){
... ...