master
wangxinglong 2022-05-27 19:14:53 +08:00
parent 12c7d2ef34
commit f2d17ebea5
2 changed files with 2 additions and 4 deletions

View File

@ -703,6 +703,3 @@ if (!function_exists('list_to_tree')){
return $tree;
}
}

View File

@ -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();
}