diff --git a/application/api/controller/Ota.php b/application/api/controller/Ota.php index 96e81ef..af5bf85 100644 --- a/application/api/controller/Ota.php +++ b/application/api/controller/Ota.php @@ -112,7 +112,7 @@ class Ota extends Api * * 客户端要求必须使用 HTTPS 协议,此处强制转换为 HTTPS。 * - * @param string $relativePath 相对路径 + * @param string $relativePath 相对路径(FastAdmin 已含 /uploads/ 前缀) * @return string 完整 HTTPS URL */ private function buildApkUrl($relativePath) @@ -120,7 +120,8 @@ class Ota extends Api $domain = request()->domain(); // 强制使用 HTTPS,客户端要求 downloadUrl 必须以 https:// 开头 $domain = preg_replace('/^http:\/\//i', 'https://', $domain); - return rtrim($domain, '/') . '/uploads/' . ltrim($relativePath, '/'); + // FastAdmin 存储的路径已含 /uploads/ 前缀,直接拼接即可 + return rtrim($domain, '/') . '/' . ltrim($relativePath, '/'); } /**