|
@@ -428,6 +428,8 @@ def showAllEquipmentVersion(userID, response):
|
|
return response.json(0, res)
|
|
return response.json(0, res)
|
|
|
|
|
|
|
|
|
|
|
|
+from Ansjer.config import SERVER_TYPE
|
|
|
|
+
|
|
# 检测ota更新包
|
|
# 检测ota更新包
|
|
@csrf_exempt
|
|
@csrf_exempt
|
|
def getNewVerInterface(request):
|
|
def getNewVerInterface(request):
|
|
@@ -462,10 +464,10 @@ def getNewVerInterface(request):
|
|
# 创建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})
|
|
-
|
|
|
|
- url = 'http://www.zositech.xyz/dlotapack/' + file_path
|
|
|
|
- # url = SERVER_DOMAIN + 'dlotapack/' + file_path
|
|
|
|
- # url = SERVER_DOMAIN + 'OTA/downloadsPack/' + file_path + '?time=' + str(time.time())
|
|
|
|
|
|
+ if SERVER_TYPE == 'Ansjer.formal_settings':
|
|
|
|
+ url = SERVER_DOMAIN + 'dlotapack/' + file_path
|
|
|
|
+ else:
|
|
|
|
+ url = 'http://www.zositech.xyz/dlotapack/' + file_path
|
|
return response.json(0, {
|
|
return response.json(0, {
|
|
'ver': ver,
|
|
'ver': ver,
|
|
'url': url,
|
|
'url': url,
|