From f2d17ebea5e10bbcb25fffdaca7aabebd7c128e9 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Fri, 27 May 2022 19:14:53 +0800 Subject: [PATCH] setter --- app/common.php | 3 --- app/controller/api/Spu.php | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/common.php b/app/common.php index fbc3247..8870e08 100644 --- a/app/common.php +++ b/app/common.php @@ -703,6 +703,3 @@ if (!function_exists('list_to_tree')){ return $tree; } } - - - diff --git a/app/controller/api/Spu.php b/app/controller/api/Spu.php index af8a8c7..d1301de 100644 --- a/app/controller/api/Spu.php +++ b/app/controller/api/Spu.php @@ -28,7 +28,8 @@ class Spu extends Base public function category(): Json { if(input("hasChildren/d",0)){ - $list = SpuRepository::getInstance()->categoryAll(["id,pid,title,cover"]); + $list = SpuRepository::getInstance()->categoryAll(["id,sort,pid,title,cover"]); + }else{ $list = SpuRepository::getInstance()->category(0,["id,pid,title,cover"])->toArray(); }