buildSearchParams() buildSearchParams() : array 生成查询条件 post方式传递了search_param参数,就说明是进行筛选搜索 search_param格式: search_param : { 数据库字段 : { value : 值, condition : 搜索条件 } } Returns array
add() add() : \think\response\Json 添加,同时添加lt_plugin_core_role和lt_plugin_core_role_menu两个表的数据 Returns \think\response\Json
edit() edit() : boolean|\think\response\Json 编辑,同时编辑lt_plugin_core_role和lt_plugin_core_role_menu两个表的数据 Returns boolean|\think\response\Json
trueDel() trueDel() : \think\response\Json 真实删除 lt_admin_role、lt_admin_menu_role、lt_admin_role_user三表数据都要真实删除 Returns \think\response\Json
success() success(string $msg = '', null $data = null) : false|string|\think\response\Json 操作成功返回数据 Parameters string $msg null $data Returns false|string|\think\response\Json
error() error(string $msg = '', integer $code = 1, array $data = null) : \think\response\Json 操作失败返回数据 Parameters string $msg integer $code 错误码,为0表示没有错误,为1表示常规错误,前端仅需提示msg,其他值有具体含义,比如10401为未登录,前端需要跳转至登录界面 array $data Returns \think\response\Json
exceptionError() exceptionError( $e) : \think\response\Json 捕获异常后返回数据 Parameters $e Returns \think\response\Json
getMenuIds() getMenuIds() : false|string|\think\response\Json 获取编辑页面权限设置应该选中的菜单id 只能获取最低级别的菜单id,有子菜单的菜单id不能返回 原因:比如tree.setChecked('auth_node',1);会选中整棵树,因为layui的树组件,模拟点击了树的首节点 Throws \think\db\exception\DataNotFoundException \think\db\exception\DbException \think\db\exception\ModelNotFoundException Returns false|string|\think\response\Json