Fix: 修正名片资产格子在部分环境下垂直堆叠的BUG改为Flex布局,并修复省市所在地因为缓存匹配不上导致不显示的问题

This commit is contained in:
2026-02-27 12:05:57 +08:00
parent 006da4f5d6
commit 1834a8e9ff
2 changed files with 6 additions and 5 deletions
+2 -1
View File
@@ -74,7 +74,8 @@ class UserController extends Controller
try {
$position = Location::get($ipToLookup);
if ($position) {
$data['location'] = ($position->countryName === '中国' || $position->countryName === 'Local') ?
$isChinaOrLocal = in_array($position->countryCode ?? $position->isoCode ?? '', ['CN', 'TW', 'HK', 'MO']) || $position->countryName === 'Local';
$data['location'] = $isChinaOrLocal ?
trim(($position->regionName ?? '') . ' ' . ($position->cityName ?? '')) :
($position->countryName ?? '未知区域');