\app\api\controllerBaseController

API基类.

Class BaseController

Summary

Methods
Properties
Constants
initialize()
checkLogin()
No public properties found
No constants found
get_param()
has_param()
error()
success()
response()
$token
$isLogin
$user
$input
$config
N/A
No private methods found
No private properties found
N/A

Properties

$token

$token : 

Type

$isLogin

$isLogin : 

Type

$user

$user : 

Type

$input

$input : 

Type

$config

$config : 

Type

Methods

initialize()

initialize() 

checkLogin()

checkLogin() 

get_param()

get_param(  $key) 

Parameters

$key

has_param()

has_param(  $key) 

Parameters

$key

error()

error(  $msg = '',   $code,   $data = '',   $wait = 3, array  $header = array()) 

Parameters

$msg
$code
$data
$wait
array $header

success()

success(  $data = '',   $code = 1,   $msg = '',   $wait = 3, array  $header = array()) 

Parameters

$data
$code
$msg
$wait
array $header

response()

response(  $data, integer  $code = 1, string  $msg = '') : \think\response\Json

ajax输出

Parameters

$data
integer $code
string $msg

Returns

\think\response\Json