Properties

$adminInfo

$adminInfo : 

当前登陆管理员信息

Type

$adminId

$adminId : 

当前登陆管理员ID

Type

$auth

$auth : array

当前管理员权限

Type

array

$skipLogController

$skipLogController : 

Type

$view

$view : \think\View

Type

\think\View — 视图类实例

$request

$request : \think\Request

Type

\think\Request — Request实例

$failException

$failException : 

Type

$batchValidate

$batchValidate : 

Type

$beforeActionList

$beforeActionList : array

前置操作方法列表

Type

array

Methods

__construct()

__construct(\think\Request  $request = null) 

构造方法

Parameters

\think\Request $request

Request对象

_initialize()

_initialize() 

checkAuth()

checkAuth(  $action = null,   $controller = null,   $module = null, array  $route = array()) 

Parameters

$action
$controller
$module
array $route

failedNotice()

failedNotice(string  $msg = '操作失败', string  $backUrl,   $info = '', integer  $duration = 3) : mixed

操作失败提示框

Parameters

string $msg

提示信息

string $backUrl

跳转地址

$info
integer $duration

持续时间

Returns

mixed

failedNoticeLast()

failedNoticeLast(  $msg = '操作失败', integer  $backUrl,   $info = '') : mixed

失败提示一直持续

Parameters

$msg
integer $backUrl
$info

Returns

mixed

successfulNotice()

successfulNotice(string  $msg = '操作成功', string  $backUrl,   $info = '', integer  $duration = 3) : mixed

操作成功提示框

Parameters

string $msg

提示信息

string $backUrl

跳转地址

$info
integer $duration

持续时间

Returns

mixed

successfulNoticeLast()

successfulNoticeLast(  $msg = '操作成功', integer  $backUrl,   $info = '') : mixed

成功提示一直持续

Parameters

$msg
integer $backUrl
$info

Returns

mixed

failed()

failed(string  $msg = '哎呀…亲…您访问的页面出现错误', integer  $url) 

错误提醒页面

Parameters

string $msg
integer $url

successful()

successful(string  $msg, integer  $url) 

成功提醒页面

Parameters

string $msg
integer $url

exception()

exception(  $msg = '无法打开页面') 

Parameters

$msg

beforeAction()

beforeAction(string  $method, array  $options = array()) 

前置操作

Parameters

string $method

前置操作方法名

array $options

调用参数 ['only'=>[...]] 或者['except'=>[...]]

fetch()

fetch(string  $template = '', array  $vars = array(), array  $replace = array(), array  $config = array()) : mixed

加载模板输出

Parameters

string $template

模板文件名

array $vars

模板输出变量

array $replace

模板替换

array $config

模板参数

Returns

mixed

display()

display(string  $content = '', array  $vars = array(), array  $replace = array(), array  $config = array()) : mixed

渲染内容输出

Parameters

string $content

模板内容

array $vars

模板输出变量

array $replace

替换内容

array $config

模板参数

Returns

mixed

assign()

assign(mixed  $name, mixed  $value = '') : void

模板变量赋值

Parameters

mixed $name

要显示的模板变量

mixed $value

变量的值

engine()

engine(array|string  $engine) : void

初始化模板引擎

Parameters

array|string $engine

引擎参数

validateFailException()

validateFailException(boolean  $fail = true) : $this

设置验证失败后是否抛出异常

Parameters

boolean $fail

是否抛出异常

Returns

$this

validate()

validate(array  $data, string|array  $validate, array  $message = array(), boolean  $batch = false, mixed  $callback = null) : array|string|true

验证数据

Parameters

array $data

数据

string|array $validate

验证器名或者验证规则数组

array $message

提示信息

boolean $batch

是否批量验证

mixed $callback

回调方法(闭包)

Throws

\think\exception\ValidateException

Returns

array|string|true

success()

success(mixed  $msg = '', string  $url = null, mixed  $data = '', integer  $wait = 3, array  $header = array()) : void

操作成功跳转的快捷方法

Parameters

mixed $msg

提示信息

string $url

跳转的URL地址

mixed $data

返回的数据

integer $wait

跳转等待时间

array $header

发送的Header信息

error()

error(mixed  $msg = '', string  $url = null, mixed  $data = '', integer  $wait = 3, array  $header = array()) : void

操作错误跳转的快捷方法

Parameters

mixed $msg

提示信息

string $url

跳转的URL地址

mixed $data

返回的数据

integer $wait

跳转等待时间

array $header

发送的Header信息

result()

result(mixed  $data, integer  $code, mixed  $msg = '', string  $type = '', array  $header = array()) : void

返回封装后的API数据到客户端

Parameters

mixed $data

要返回的数据

integer $code

返回的code

mixed $msg

提示信息

string $type

返回数据格式

array $header

发送的Header信息

redirect()

redirect(string  $url, array|integer  $params = array(), integer  $code = 302, array  $with = array()) : void

URL重定向

Parameters

string $url

跳转的URL表达式

array|integer $params

其它URL参数

integer $code

http code

array $with

隐式传参

getResponseType()

getResponseType() : string

获取当前的response 输出类型

Returns

string