|
@@ -21,8 +21,10 @@ from django.http import JsonResponse
|
|
|
from django.views.generic.base import View
|
|
|
from pyfcm import FCMNotification
|
|
|
from Object.RedisObject import RedisObject
|
|
|
-from Ansjer.config import OSS_STS_ACCESS_KEY, OSS_STS_ACCESS_SECRET, DETECT_PUSH_DOMAIN_V2, JPUSH_CONFIG, \
|
|
|
- FCM_CONFIG, APNS_CONFIG, BASE_DIR, APNS_MODE
|
|
|
+from Ansjer.config import OSS_STS_ACCESS_KEY, OSS_STS_ACCESS_SECRET, DETECT_PUSH_DOMAIN, DETECT_PUSH_DOMAIN_V2, \
|
|
|
+ JPUSH_CONFIG, \
|
|
|
+ FCM_CONFIG, APNS_CONFIG, BASE_DIR, APNS_MODE, DETECT_PUSH_DOMAINS, DETECT_PUSH_DOMAIN_JIUAN, \
|
|
|
+ DETECT_PUSH_DOMAINS_JIUAN
|
|
|
from Model.models import Device_Info, VodHlsModel, Equipment_Info, UidSetModel, UidPushModel, CompanyModel
|
|
|
from Object.ETkObject import ETkObject
|
|
|
from Object.RedisObject import RedisObject
|
|
@@ -216,9 +218,18 @@ class DetectControllerViewV2(View):
|
|
|
# utko.generate(data={'uid': uid})
|
|
|
etkObj = ETkObject(etk='')
|
|
|
etk = etkObj.encrypt(uid)
|
|
|
- detectUrl = "{DETECT_PUSH_DOMAIN_V2}notifyV2/push?etk={etk}&company_secrete={company_secrete}". \
|
|
|
- format(etk=etk, company_secrete=company_secrete, DETECT_PUSH_DOMAIN_V2=DETECT_PUSH_DOMAIN_V2)
|
|
|
- return response.json(0, {'detectUrl': detectUrl})
|
|
|
+
|
|
|
+ if company_secrete == 'MTEyMTNB':
|
|
|
+ url = DETECT_PUSH_DOMAIN
|
|
|
+ urls = DETECT_PUSH_DOMAINS
|
|
|
+ else:
|
|
|
+ url = DETECT_PUSH_DOMAIN_JIUAN
|
|
|
+ urls = DETECT_PUSH_DOMAINS_JIUAN
|
|
|
+ detectUrl = "{DETECT_PUSH_DOMAIN}notifyV2/push?etk={etk}&company_secrete={company_secrete}". \
|
|
|
+ format(etk=etk, company_secrete=company_secrete, DETECT_PUSH_DOMAIN=url)
|
|
|
+ detectUrls = "{DETECT_PUSH_DOMAIN_V2}notifyV2/push?etk={etk}&company_secrete={company_secrete}". \
|
|
|
+ format(etk=etk, company_secrete=company_secrete, DETECT_PUSH_DOMAIN_V2=urls)
|
|
|
+ return response.json(0, {'detectUrl': detectUrl, 'detectUrls': detectUrls})
|
|
|
else:
|
|
|
return response.json(14)
|
|
|
|