正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
| @@ -5,6 +5,7 @@ | @@ -5,6 +5,7 @@ | ||
| 5 | * Date: 2025/02/26 | 5 | * Date: 2025/02/26 |
| 6 | * Time: 10:14 | 6 | * Time: 10:14 |
| 7 | */ | 7 | */ |
| 8 | + | ||
| 8 | namespace App\Console\Commands\Inquiry; | 9 | namespace App\Console\Commands\Inquiry; |
| 9 | 10 | ||
| 10 | use App\Models\Inquiry\InquiryInfo; | 11 | use App\Models\Inquiry\InquiryInfo; |
| @@ -116,7 +117,7 @@ class PostInquiryForward extends Command | @@ -116,7 +117,7 @@ class PostInquiryForward extends Command | ||
| 116 | 117 | ||
| 117 | public function visit(InquiryRelayDetail $detail, InquiryRelayDetailLog $log) | 118 | public function visit(InquiryRelayDetail $detail, InquiryRelayDetailLog $log) |
| 118 | { | 119 | { |
| 119 | - $website = $detail['website']; | 120 | + $website = 'https://' . $detail['website'] . '/'; |
| 120 | if ($detail['is_v6']) { | 121 | if ($detail['is_v6']) { |
| 121 | $data = [ | 122 | $data = [ |
| 122 | 'ip' => $detail['ip'], | 123 | 'ip' => $detail['ip'], |
| @@ -136,7 +137,7 @@ class PostInquiryForward extends Command | @@ -136,7 +137,7 @@ class PostInquiryForward extends Command | ||
| 136 | } | 137 | } |
| 137 | } else { | 138 | } else { |
| 138 | //v4 v5分离项目 往测试链接推 | 139 | //v4 v5分离项目 往测试链接推 |
| 139 | - $project_info = InquiryProject::select(['is_split', 'test_domain'])->where('domain', $website)->first(); | 140 | + $project_info = InquiryProject::select(['is_split', 'test_domain'])->where('domain', 'like', '%' . $detail['website'] . '%')->first(); |
| 140 | if (!$project_info) { | 141 | if (!$project_info) { |
| 141 | $log->status = InquiryRelayDetailLog::STATUS_FAIL; | 142 | $log->status = InquiryRelayDetailLog::STATUS_FAIL; |
| 142 | $log->remark = '获取域名对应项目失败'; | 143 | $log->remark = '获取域名对应项目失败'; |
| @@ -194,7 +195,7 @@ class PostInquiryForward extends Command | @@ -194,7 +195,7 @@ class PostInquiryForward extends Command | ||
| 194 | 195 | ||
| 195 | public function v6Inquiry($detail, $log) | 196 | public function v6Inquiry($detail, $log) |
| 196 | { | 197 | { |
| 197 | - $website = $detail['website']; | 198 | + $website = 'https://' . $detail['website'] . '/'; |
| 198 | $data = [ | 199 | $data = [ |
| 199 | 'name' => $detail['name'], | 200 | 'name' => $detail['name'], |
| 200 | 'phone' => $detail['phone'], | 201 | 'phone' => $detail['phone'], |
| @@ -231,7 +232,6 @@ class PostInquiryForward extends Command | @@ -231,7 +232,6 @@ class PostInquiryForward extends Command | ||
| 231 | 'submit_time' => date('Y-m-d H:i:s'), | 232 | 'submit_time' => date('Y-m-d H:i:s'), |
| 232 | 'source' => 5, | 233 | 'source' => 5, |
| 233 | ]; | 234 | ]; |
| 234 | - | ||
| 235 | $result = Http::withoutVerifying()->timeout(30)->post('https://www.globalso.site/api/external-interface/add/fa043f9cbec6b38f', $data); | 235 | $result = Http::withoutVerifying()->timeout(30)->post('https://www.globalso.site/api/external-interface/add/fa043f9cbec6b38f', $data); |
| 236 | $res['data'][0]['status'] = 'success'; | 236 | $res['data'][0]['status'] = 'success'; |
| 237 | //兼容接口返回格式 | 237 | //兼容接口返回格式 |
-
请 注册 或 登录 后发表评论