chenjunkai 6 년 전
부모
커밋
e016fc46d5
2개의 변경된 파일2개의 추가작업 그리고 24개의 파일을 삭제
  1. 2 2
      Ansjer/config.py
  2. 0 22
      Service/MiscellService.py

+ 2 - 2
Ansjer/config.py

@@ -49,8 +49,8 @@ if SERVER_TYPE == 'local':
     RTMP_PUSH_URL = 'rtmp://192.168.136.45:1935/hls'
 elif SERVER_TYPE == 'test':
     NGINX_RTMP_STAT = 'http://13.56.215.252:82/stat'
-    SERVER_DOMAIN = 'http://www.dvema.com:82'
-    DOMAIN_HOST = 'www.dvema.com'
+    SERVER_DOMAIN = 'http://test.dvema.com/'
+    DOMAIN_HOST = 'test.dvema.com'
     DATABASE_DATA = 'AnsjerTest'
     SERVER_HOST = 'localhost'
     RTMP_PUSH_URL = 'http://13.56.215.252:8091/hls'

+ 0 - 22
Service/MiscellService.py

@@ -100,28 +100,6 @@ class MiscellService():
             col = "log_access"
             mdb.insert_one(col=col, data=add_data)
 
-    # 获取所有设备ip地址的xy经纬度
-    @staticmethod
-    def getAreaJson(ip_list):
-        area = {}
-        # ip_list = ["120.237.157.183", "123.123.123.1", "123456", "190.9.194.216"]
-        for ip in ip_list:
-            data = {'ip': ip}
-            URL = 'http://ip.taobao.com/service/getIpInfo.php'
-            try:
-                r = requests.get(URL, params=data, timeout=3)
-            except requests.RequestException as e:
-                print(e)
-            else:
-                json_data = r.json()
-                if json_data['code'] == 0:
-                    country = json_data['data']['country']
-                    if country != '':
-                        if country in area:
-                            area[country] += 1
-                        else:
-                            area[country] = 1
-        return area
 
     # 获取所有设备ip地址的指向的国家
     @staticmethod