增加后台基础功能,调整前端菜单返回
This commit is contained in:
@@ -62,6 +62,7 @@ trait CrudControllerTrait
|
||||
$res = $this->service->serviceStore($request, $data);
|
||||
return $this->success($res, '创建成功');
|
||||
} catch (\Throwable $e) {
|
||||
dpr($e);
|
||||
return $this->error($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace app\common\traits\crud;
|
||||
|
||||
use support\exception\BusinessException;
|
||||
use support\Request;
|
||||
|
||||
/**
|
||||
@@ -48,7 +49,7 @@ trait CrudServiceTrait
|
||||
$config = $this->buildQueryConfig($request, 'default');
|
||||
$result = $this->logicListAll($config);
|
||||
}
|
||||
return $this->postProcess('List', $result);
|
||||
return $this->postProcess('ListAll', $result);
|
||||
}
|
||||
|
||||
/** 查看单条 */
|
||||
@@ -188,6 +189,6 @@ trait CrudServiceTrait
|
||||
*/
|
||||
// protected function complexQuery(array $params): array
|
||||
// {
|
||||
// throw new \LogicException('请在子类实现 complexQuery');
|
||||
// throw new BusinessException('请在子类实现 complexQuery');
|
||||
// }
|
||||
}
|
||||
Reference in New Issue
Block a user