|
@@ -1,4 +1,3 @@
|
|
|
-
|
|
|
from zlib import crc32
|
|
|
from django.core import serializers
|
|
|
from wsgiref.util import FileWrapper
|
|
@@ -430,6 +429,7 @@ def showAllEquipmentVersion(userID, response):
|
|
|
|
|
|
from Ansjer.config import SERVER_TYPE
|
|
|
|
|
|
+
|
|
|
# 检测ota更新包
|
|
|
@csrf_exempt
|
|
|
def getNewVerInterface(request):
|
|
@@ -467,7 +467,10 @@ def getNewVerInterface(request):
|
|
|
if SERVER_TYPE == 'Ansjer.formal_settings':
|
|
|
url = SERVER_DOMAIN + 'dlotapack/' + file_path
|
|
|
else:
|
|
|
- url = 'http://www.zositech.xyz/dlotapack/' + file_path
|
|
|
+ if code == '18E201200CA' or code == '18E201200CZ':
|
|
|
+ url = 'http://www.zositech.xyz/dlotapack/' + file_path
|
|
|
+ else:
|
|
|
+ url = SERVER_DOMAIN + 'dlotapack/' + file_path
|
|
|
return response.json(0, {
|
|
|
'ver': ver,
|
|
|
'url': url,
|
|
@@ -573,6 +576,8 @@ def downloadOTAInterface(request, fullPath, *callback_args, **callback_kwargs):
|
|
|
return res.json(907)
|
|
|
else:
|
|
|
return res.json(444, 'fullPath')
|
|
|
+
|
|
|
+
|
|
|
# ota包下载
|
|
|
@csrf_exempt
|
|
|
def downloadOTAInterfaceV2(request, fullPath, *callback_args, **callback_kwargs):
|
|
@@ -581,11 +586,11 @@ def downloadOTAInterfaceV2(request, fullPath, *callback_args, **callback_kwargs)
|
|
|
print(fullPath)
|
|
|
# 解密url的token
|
|
|
url_token = UrlTokenObject(fullPath)
|
|
|
- if ( '' == url_token.Url):
|
|
|
+ if ('' == url_token.Url):
|
|
|
print('过期了')
|
|
|
return res.json(907)
|
|
|
else:
|
|
|
- print (url_token.Url)
|
|
|
+ print(url_token.Url)
|
|
|
fp = url_token.Url
|
|
|
fullPath = fp[14:]
|
|
|
if fullPath:
|