Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -8,8 +8,10 @@ use think\Log;
|
|||||||
|
|
||||||
class Ceshi extends Controller
|
class Ceshi extends Controller
|
||||||
{
|
{
|
||||||
//测试 发送各种消息
|
//设置白名单ip访问本类接口
|
||||||
|
protected $allowIp = [
|
||||||
|
'113.201.181.82'
|
||||||
|
];
|
||||||
|
|
||||||
//发送群组系统消息
|
//发送群组系统消息
|
||||||
public function send_group_system_notification()
|
public function send_group_system_notification()
|
||||||
@@ -150,6 +152,13 @@ class Ceshi extends Controller
|
|||||||
//清空数据 禁用 慎用 !!!!!!
|
//清空数据 禁用 慎用 !!!!!!
|
||||||
public function clear_data()
|
public function clear_data()
|
||||||
{
|
{
|
||||||
|
//ip
|
||||||
|
$ip = request()->ip();
|
||||||
|
//白名单
|
||||||
|
$white_list = $this -> allowIp;
|
||||||
|
if (!in_array($ip, $white_list)) {
|
||||||
|
return V(301, '非法访问!');
|
||||||
|
}
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$res = [];
|
$res = [];
|
||||||
//开启事务
|
//开启事务
|
||||||
|
|||||||
Reference in New Issue
Block a user