新增后台

This commit is contained in:
mzl@hnxinyouhe.com
2025-08-12 15:26:17 +08:00
parent 20239dfb6f
commit 360aeec0e1
11 changed files with 372 additions and 167 deletions
+19
View File
@@ -2,6 +2,7 @@
namespace app\common\service;
use app\common\logic\ResourceLogic;
use app\common\validate\ResourceValidate;
use app\common\traits\crud\CrudServiceTrait;
use app\common\model\Resource;
@@ -50,6 +51,11 @@ class ResourceService
$config['order']['sort'] = 'asc';
$config['order']['id'] = 'asc';
break;
case 'menuTreeList':
$config['where']['status'] = 1;
$config['order']['sort'] = 'asc';
$config['order']['id'] = 'asc';
break;
case 'index':
$config['where']['status'] = 1;
$config['order']['sort'] = 'asc';
@@ -79,6 +85,13 @@ class ResourceService
return $this->postProcess('MenuList', $result);
}
public function serviceMenuTreeList(Request $request)
{
$config = $this->buildQueryConfig($request, 'menuTreeList');
$result = (new ResourceLogic())->logicListAllResources($request, $config);
return $this->postProcess('MenuTreeList', $result);
}
protected function afterServiceListAll($data)
{
@@ -91,4 +104,10 @@ class ResourceService
$data = Tree::buildWithReference($data->toArray());
return $data;
}
protected function afterServiceMenuTreeList($data)
{
$data = Tree::buildWithReference($data->toArray());
return $data;
}
}