fixed
This commit is contained in:
34
front/application/api/controller/BaseHttpApi.php
Normal file
34
front/application/api/controller/BaseHttpApi.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/*
|
||||
* description:
|
||||
* author:wh
|
||||
* email:
|
||||
* createTime:{2024/4/22} {11:52}
|
||||
*/
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
|
||||
use app\index\controller\BaseCommonController;
|
||||
use think\App;
|
||||
use think\Controller;
|
||||
use think\Exception;
|
||||
use wanghua\general_utility_tools_php\tool\Ip;
|
||||
|
||||
class BaseHttpApi extends BaseCommonController
|
||||
{
|
||||
/**
|
||||
http请求专用
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//ip校验
|
||||
//$ip = request()->ip();
|
||||
//$res = Ip::ip_is_china($ip,false);
|
||||
//if(!$res){
|
||||
// throw new Exception('ip不合法');
|
||||
//}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user