|
|
@@ -47,6 +47,11 @@ class AuthLogin extends Middleware
|
|
|
// 判断用户未登录就跳转至登录页面
|
|
|
// 在这里可以定制你想要的返回格式, 亦或者是 JSON 编码格式
|
|
|
return response()->json(message("请登录", false, null, 10001));
|
|
|
+ }else if ($controller == 'TaskController'){
|
|
|
+ $key = request()->get('key');
|
|
|
+ if($key != config('weixin.taskKey','')){
|
|
|
+ return response()->json(message("非法请求", false, null, 10001));
|
|
|
+ }
|
|
|
}
|
|
|
//如果已登录则执行正常的请求
|
|
|
return $response;
|