master
wangxinglong 2022-08-08 14:12:55 +08:00
parent 81d6fcf7a0
commit 1ede4f685b
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ class SpuRepository extends Repository
$fields = $params['fields'] ?? ['id', 'name', 'price', 'original_price', 'cover', 'activity_type']; $fields = $params['fields'] ?? ['id', 'name', 'price', 'original_price', 'cover', 'activity_type'];
if (empty($order)) { if (empty($order)) {
$order = ['published_at' => 'desc']; $order = ['sort'=>"desc",'published_at' => 'desc'];
} }
$list = Spu::findList($searchMap, $fields, $page, $size, $callback, $order); $list = Spu::findList($searchMap, $fields, $page, $size, $callback, $order);