541469799@qq.com 1 year ago
parent
commit
bd6e4a3535
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/index/service/Cart.php

+ 2 - 1
app/index/service/Cart.php

@@ -68,9 +68,10 @@ class Cart extends BaseService
         if (empty($userId))return [];
 
         $model = new CartModel;
-        $model->where('user_id', '=', $userId)
+        $carts = $model->where('user_id', '=', $userId)
             ->where('is_delete', '=', 0)
             ->select();
+        return array_column($carts,'id');
     }
 
     /**