Merge branch 'pdf' into dev

This commit is contained in:
2026-01-15 10:54:27 +08:00
+1 -8
View File
@@ -395,16 +395,9 @@ class UsedCarController extends BaseController
if (!file_exists($publicFile)) {
copy($filePath, $publicFile);
}
// 从连接中获取协议(最可靠)
$connection = $request->connection;
$protocol = 'https';
if ($connection && property_exists($connection, 'transport')) {
$protocol = $connection->transport === 'ssl' ? 'https' : 'http';
}
// 返回访问地址
$baseUrl = $protocol.'://' . request()->header('host');
$baseUrl = 'https://' . request()->header('host');
$url = $baseUrl . '/pdf/' . $raw['pdf_src'];
return $this->success([