Răsfoiți Sursa

解决查找国家名异常

tanghongbin 4 ani în urmă
părinte
comite
60521aef09
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      Controller/UserController.py

+ 2 - 1
Controller/UserController.py

@@ -3641,7 +3641,8 @@ def updateUserCountry(request):
             if data:
                 country = data
             else:
-                country = CommonService.getAddr(country_ip['ip'])
+                country = CommonService.getIpIpInfo(country_ip['ip'], lang='CN')
+                country = country['country_name']
                 redisObject.set_data(key=key, val=country, expire=3600)
 
             country_ip['country'] = country