mirror of
				https://gitee.com/zoujingli/ThinkAdmin.git
				synced 2025-10-27 02:12:08 +08:00 
			
		
		
		
	[更新]增加接口测试类
This commit is contained in:
		
							parent
							
								
									68e48cafbf
								
							
						
					
					
						commit
						0ab17be394
					
				
							
								
								
									
										19
									
								
								application/index/controller/Test.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								application/index/controller/Test.php
									
									
									
									
									
										Normal 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 { | ||||
|      | ||||
| } | ||||
| @ -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())) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user