|
@@ -14,7 +14,6 @@ from Object.TokenObject import TokenObject
|
|
from Object.UrlTokenObject import UrlTokenObject
|
|
from Object.UrlTokenObject import UrlTokenObject
|
|
from Service.CommonService import CommonService
|
|
from Service.CommonService import CommonService
|
|
from Service.ModelService import ModelService
|
|
from Service.ModelService import ModelService
|
|
-from Object.base64Object import base64Object
|
|
|
|
|
|
|
|
'''
|
|
'''
|
|
http://192.168.136.45:8077/equipment/OTA?token=test&operation=query&page=1&line=10
|
|
http://192.168.136.45:8077/equipment/OTA?token=test&operation=query&page=1&line=10
|
|
@@ -231,9 +230,6 @@ class EquipmentVersionView(View):
|
|
file_path = eqs[0].filePath
|
|
file_path = eqs[0].filePath
|
|
if file_path.find('static/Upgrade/') != -1:
|
|
if file_path.find('static/Upgrade/') != -1:
|
|
path = file_path.replace('static/Upgrade/', '').replace('\\', '/')
|
|
path = file_path.replace('static/Upgrade/', '').replace('\\', '/')
|
|
- # base64Object加密
|
|
|
|
- # path = base64Object.generate_token(key="ansjer/"+CommonService.RandomStr(6) +"/"+path)
|
|
|
|
-
|
|
|
|
# 创建url的token
|
|
# 创建url的token
|
|
tko = UrlTokenObject()
|
|
tko = UrlTokenObject()
|
|
path = tko.generate(data={'Url': "ansjer/"+CommonService.RandomStr(6) +"/"+ file_path})
|
|
path = tko.generate(data={'Url': "ansjer/"+CommonService.RandomStr(6) +"/"+ file_path})
|
|
@@ -241,9 +237,6 @@ class EquipmentVersionView(View):
|
|
url = SERVER_DOMAIN + 'OTA/downloads/' + path
|
|
url = SERVER_DOMAIN + 'OTA/downloads/' + path
|
|
elif file_path.find('static/otapack') != -1:
|
|
elif file_path.find('static/otapack') != -1:
|
|
file_path = file_path
|
|
file_path = file_path
|
|
- # base64Object加密
|
|
|
|
- # file_path = base64Object.generate_token(key= "ansjer/"+CommonService.RandomStr(6) +"/"+ file_path)
|
|
|
|
-
|
|
|
|
# 创建url的token
|
|
# 创建url的token
|
|
tko = UrlTokenObject()
|
|
tko = UrlTokenObject()
|
|
file_path = tko.generate(data={'Url': "ansjer/"+CommonService.RandomStr(6) +"/"+ file_path})
|
|
file_path = tko.generate(data={'Url': "ansjer/"+CommonService.RandomStr(6) +"/"+ file_path})
|
|
@@ -251,6 +244,7 @@ class EquipmentVersionView(View):
|
|
url = SERVER_DOMAIN + 'dlotapack/' +file_path
|
|
url = SERVER_DOMAIN + 'dlotapack/' +file_path
|
|
else:
|
|
else:
|
|
return response.json(900, '2')
|
|
return response.json(900, '2')
|
|
|
|
+ # http: // 192.168.136.39:8000 / EquipmentVersion / checkVer?code = 20D20410010
|
|
|
|
|
|
|
|
|
|
res = {
|
|
res = {
|