黄宗昌 %!s(int64=2) %!d(string=hai) anos
pai
achega
287dbf3b46
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      app/Http/Controllers/V1/ProductController.php

+ 2 - 0
app/Http/Controllers/V1/ProductController.php

xqd xqd
@@ -48,6 +48,7 @@ class ProductController extends Controller
           ->where('status',1)
           ->where($map)
           ->orWhere($maps)
+          ->orderByDesc("sort")
           ->get();
       $data = [];
       foreach ($list as $v){
@@ -89,6 +90,7 @@ class ProductController extends Controller
             ->where('status',1)
             ->where($map)
             ->orWhere($maps)
+            ->orderByDesc("sort")
             ->get();
         $data = [];
         foreach ($list as $v){