Преглед на файлове

根据ip 解析地址返回状态 - 限定中山

linhaohong преди 1 година
родител
ревизия
862d9d5e93
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      Controller/AppSetController.py

+ 2 - 1
Controller/AppSetController.py

@@ -287,7 +287,8 @@ class AppSetView(View):
             # 这里加sdStatus过滤条件条件
             ip = CommonService.get_ip_address(request)
             splashAdStatus = 0
-            ip_addr_qs = IPAddr.objects.filter(ip=ip, is_geoip2=False).values('district', 'city')
+            ip_addr_qs = IPAddr.objects.filter(ip=ip, is_geoip2=False).values('country_code', 'city', 'region',
+                                                                              'district')
             if ip_addr_qs.exists():
                 ip_country_code = ip_addr_qs[0]['country_code']
                 ip_region = ip_addr_qs[0]['region']