Skip to content

Commit

Permalink
Merge pull request #132 from wonder-game/develop
Browse files Browse the repository at this point in the history
fix: 第二级仍要保留港澳台
  • Loading branch information
linkunyuan authored Nov 25, 2024
2 parents e119cb3 + 86022ef commit 9ba57df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/function.php
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ function geo($ip = '', $num = 'all')

$arr = explode("\t", $region);
// 业务需求,港澳台跟大陆一样保持在第一级
$str = str_replace(['中国–台湾', '中国–香港', '中国–澳门'], ['中国台湾', '中国香港', '中国澳门'], $arr[0]);
$str = str_replace(['中国–台湾', '中国–香港', '中国–澳门'], ['中国台湾–台湾', '中国香港–香港', '中国澳门–澳门'], $arr[0]);
$arr = explode('', $str);

return is_numeric($num) ? $arr[$num] : $arr;
Expand Down

0 comments on commit 9ba57df

Please sign in to comment.