菜单列表不显示接口

This commit is contained in:
evoxwht 2023-05-06 15:17:15 +08:00
parent c2e367ccca
commit 4c364fddd0
2 changed files with 10 additions and 1 deletions

View File

@ -40,12 +40,19 @@ class SystemMenus extends AuthController
/**
* 菜单展示列表
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 吴汐
* @email 442384644@qq.com
* @date 2023/05/06
*/
public function index()
{
$where = $this->request->getMore([
['is_show', ''],
['keyword', ''],
['auth_type', ''],
]);
return app('json')->success($this->services->getList($where));
}

View File

@ -231,6 +231,8 @@ class SystemMenus extends BaseModel
*/
public function searchAuthTypeAttr($query, $value)
{
$query->where('auth_type', $value);
if ($value !== '') {
$query->where('auth_type', $value);
}
}
}