request->params([ [ 'status', 1 ], [ 'is_tree', 1 ], [ 'is_button', 1 ] ]); return success(( new AuthService() )->getAuthMenuList($data[ 'status' ], $data[ 'is_tree' ], $data[ 'is_button' ])); } /** * 获取登录用户信息 * @return Response */ public function get() { return success(( new AuthService() )->getAuthInfo()); } /** * 修改登录用户信息 * @param $field * @return Response */ public function modify($field) { $data = $this->request->params([ [ 'value', '' ], [ 'field', $field ] ]); // $this->validate($data, 'app\validate\sys\User.modify'); ( new AuthService() )->modifyAuth($field, $data[ 'value' ]); return success('MODIFY_SUCCESS'); } /** * 更新用户 */ public function edit() { $data = $this->request->params([ [ 'real_name', '' ], [ 'head_img', '' ], [ 'password', '' ], [ 'original_password', '' ] ]); ( new AuthService() )->editAuth($data); return success('MODIFY_SUCCESS'); } }