[更新]增加接口测试类

This commit is contained in:
Anyon 2017-04-26 17:11:45 +08:00
parent 68e48cafbf
commit 0ab17be394
2 changed files with 19 additions and 2 deletions

View File

@ -0,0 +1,19 @@
<?php
// +----------------------------------------------------------------------
// | Think.Admin
// +----------------------------------------------------------------------
// | 版权所有 2016~2017 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
// +----------------------------------------------------------------------
// | 官方网站: http://think.ctolog.com
// +----------------------------------------------------------------------
// | 开源协议 ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | github开源项目https://github.com/zoujingli/Think.Admin
// +----------------------------------------------------------------------
namespace app\index\controller;
class Test extends \controller\BasicApi {
}

View File

@ -6,7 +6,6 @@ use service\ToolsService;
use think\Cache;
use think\Request;
use think\Response;
use Wechat\Lib\Tools;
/**
* 数据接口通用控制器
@ -39,7 +38,6 @@ class BasicApi {
if (in_array(strtolower($this->request->action()), ['response', 'setcache', 'getcache', 'delcache', '_empty'])) {
exit($this->response('禁止访问接口安全方法!', 'ACCESS_NOT_ALLOWED')->send());
}
// 访问 Token 检测处理
$this->token = $this->request->param('token', $this->request->header('token', false));
if (empty($this->token) && !method_exists($this, $this->request->action())) {