|
...
|
...
|
@@ -42,12 +42,11 @@ class SelfSiteController extends BaseController |
|
|
|
}
|
|
|
|
|
|
|
|
//判断token是否有效
|
|
|
|
$project_model = new Project();
|
|
|
|
$project_info = $project_model->read(['site_token' => $token]);
|
|
|
|
$project_info = Project::with('domainInfo')->where('site_token',$token)->first();
|
|
|
|
if (!$project_info) {
|
|
|
|
return $this->error('token无效', 401);
|
|
|
|
}
|
|
|
|
if (($project_info['domainInfo']['domain'] ?? '') != $domain) {
|
|
|
|
if (($project_info->domainInfo->domain ?? '') != $domain) {
|
|
|
|
return $this->error('token无效', 401);
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|