\controllerBasicApi

基础接口类 Class BasicApi

Summary

Methods
Properties
Constants
__construct()
No public properties found
No constants found
success()
error()
$request
N/A
No private methods found
No private properties found
N/A

Properties

$request

$request : \think\Request

当前请求对象

Type

\think\Request

Methods

__construct()

__construct() 

构造方法 BasicApi constructor.

success()

success(mixed  $msg, array  $data = array(), integer  $code = 1) 

返回成功的操作

Parameters

mixed $msg

消息内容

array $data

返回数据

integer $code

返回代码

error()

error(mixed  $msg, array  $data = array(), integer  $code) 

返回失败的请求

Parameters

mixed $msg

消息内容

array $data

返回数据

integer $code

返回代码