Browse Source

产品 结束

cqpCow 1 year ago
parent
commit
ae7d0f4516
2 changed files with 2 additions and 2 deletions
  1. 1 1
      app/Http/Controllers/Api/ProductController.php
  2. 1 1
      app/Service/ProductService.php

+ 1 - 1
app/Http/Controllers/Api/ProductController.php

@@ -51,7 +51,7 @@ class ProductController extends BaseController
     {
         $service = new ProductService();
         $user = $request->userData->toArray();
-        list($status,$data) = $service->productCategoryList($request->all());
+        list($status,$data) = $service->productCategoryList($request->all(),$user);
 
         if($status){
             return $this->json_return(200,'',$data);

+ 1 - 1
app/Service/ProductService.php

@@ -59,7 +59,7 @@ class ProductService extends Service
     public function productCategoryList($data,$user){
         $model = ProductCategory::where('del_time',0)
             ->select('title','id','parent_id')
-            ->orderby('id','asc');
+            ->orderby('id','desc');
         if(! empty($data['title'])) $model->where('title', 'LIKE', '%'.$data['title'].'%');
 
         $list = $model->get()->toArray();