diff --git a/app/common.php b/app/common.php index 7b0919a..a66ed7d 100644 --- a/app/common.php +++ b/app/common.php @@ -783,22 +783,25 @@ function highlightKeywords($title, $searchTitle) /** * 判断是哪个网盘 - * @return array - */ + * @return int 网盘类型 + */ function determineIsType($url) { - // 判断 $url 中包含的域名并返回对应的 is_type - if (strpos($url, 'alipan.com') !== false) { - return 1; - } elseif (strpos($url, 'baidu.com') !== false) { - return 2; - } elseif (strpos($url, 'uc.cn') !== false) { - return 3; - } elseif (strpos($url, 'xunlei.com') !== false) { - return 4; - } else { - // 默认值是夸克网盘,返回 0 - return 0; + $domains = [ + 'alipan.com' => 1, + 'aliyundrive.com' => 1, + 'baidu.com' => 2, + 'uc.cn' => 3, + 'xunlei.com' => 4 + ]; + + foreach ($domains as $domain => $type) { + if (strpos($url, $domain) !== false) { + return $type; + } } + + // 默认值是夸克网盘,返回 0 + return 0; } /** diff --git a/extend/netdisk/Transfer.php b/extend/netdisk/Transfer.php index 3a01a66..ae68119 100644 --- a/extend/netdisk/Transfer.php +++ b/extend/netdisk/Transfer.php @@ -64,6 +64,7 @@ class Transfer 'www.aliyundrive.com' => 1, 'pan.baidu.com' => 2, 'drive.uc.cn' => 3, + 'fast.uc.cn' => 3, // 'pan.xunlei.com' => 4, ]; diff --git a/public/install/templates/3.php b/public/install/templates/3.php index 145c4de..4716982 100644 --- a/public/install/templates/3.php +++ b/public/install/templates/3.php @@ -30,7 +30,7 @@
- + 数据库名: