Browse Source

隐藏初始化接口的IP地址功能

tanghongbin 4 years ago
parent
commit
ef9702ec08
1 changed files with 10 additions and 9 deletions
  1. 10 9
      Controller/UserController.py

+ 10 - 9
Controller/UserController.py

@@ -1859,15 +1859,16 @@ class InitInfoView(View):
                     update(**update_dict)
             if appBundleId:
                 user_ex_qs = UserExModel.objects.filter(userID_id=userID)
-                redisObject = RedisObject(db=6)
-                ip = CommonService.get_ip_address(request)
-                key = 'ip_country_{ip}'.format(ip=ip)
-                data = redisObject.get_data(key=key)
-                if data:
-                    country = data
-                else:
-                    country = CommonService.getAddr(ip)
-                    redisObject.set_data(key=key, val=country, expire=3600)
+                # redisObject = RedisObject(db=6)
+                # ip = CommonService.get_ip_address(request)
+                # key = 'ip_country_{ip}'.format(ip=ip)
+                # data = redisObject.get_data(key=key)
+                # if data:
+                #     country = data
+                # else:
+                #     country = CommonService.getAddr(ip)
+                #     redisObject.set_data(key=key, val=country, expire=3600)
+                country = ''
                 if user_ex_qs.exists():
                     update_dict = {
                         'updTime': now_time,