diff --git a/script/linedata/auto_format.php b/script/linedata/auto_format.php index f8fbe10..892c62a 100644 --- a/script/linedata/auto_format.php +++ b/script/linedata/auto_format.php @@ -215,7 +215,12 @@ function format_product($file_path, $dns = '') $data['status'] = $info[8] ?? ''; if ($dns != 'shihui') { $ip = explode('.', ($info[9] ?? '')); - $data['nasname'] = $ip[0] ? ip_repeat($record, $ip[0]) . '.' . $dns : ''; + + if (count($ip) == 4) { + $data['nasname'] = $info[9]; + } else { + $data['nasname'] = $ip[0] ? ip_repeat($record, $ip[0]) . '.' . $dns : ''; + } } else { $data['nasname'] = $info[9] ?? ''; } diff --git a/script/linedata/display.php b/script/linedata/display.php index 268b238..413fcb5 100755 --- a/script/linedata/display.php +++ b/script/linedata/display.php @@ -5,7 +5,7 @@ * @Author: kangkang * @Date: 2020-11-06 14:32:57 * @LastEditors: Please set LastEditors - * @LastEditTime: 2020-11-27 10:32:41 + * @LastEditTime: 2022-04-14 17:50:48 */ header('Access-Control-Allow-Origin: *'); header("Access-Control-Allow-Methods: *"); @@ -58,6 +58,10 @@ switch ($id) { case 19: get_product(__DIR__ . '/data/download/huohu.csv'); break; + + case 22: + get_product(__DIR__ . '/data/download/huohu.csv'); + break; } function get_all_product($file_path)