|
@@ -95,10 +95,13 @@ class DetectControllerView(View):
|
|
|
auth = oss2.Auth('LTAIyMkGfEdogyL9', '71uIjpsqVOmF7DAITRyRuc259jHOjO')
|
|
|
bucket = oss2.Bucket(auth, 'oss-cn-shenzhen.aliyuncs.com', 'apg')
|
|
|
for p in qr:
|
|
|
- if p['is_st'] == '1':
|
|
|
- p['img'] = bucket.sign_url('GET',
|
|
|
- '{uid}/{channel}/{time}.jpeg'.format(uid=p['devUid'], channel=p['Channel'],
|
|
|
- time=p['eventTime']), 300)
|
|
|
+ if p['is_st'] == 1:
|
|
|
+ p['img'] = bucket.sign_url('GET','{uid}/{channel}/{time}.jpeg'.
|
|
|
+ format(uid=p['devUid'], channel=p['Channel'], time=p['eventTime']), 300)
|
|
|
+ elif p['is_st'] == 2:
|
|
|
+ # img_list = []
|
|
|
+
|
|
|
+ p['gif'] = []
|
|
|
uid_type_s = ''
|
|
|
if p['devUid'] in uid_type_dict.keys():
|
|
|
uid_type_s = uid_type_dict[p['devUid']]
|
|
@@ -226,7 +229,7 @@ class NotificationView(View):
|
|
|
# self.do_save_equipment_info(ua, n_time, channel, event_type, is_st)
|
|
|
# 需求不一样,所以这么做的
|
|
|
self.do_bulk_create_info(uaqs, n_time, channel, event_type, is_st)
|
|
|
- if is_st == '0':
|
|
|
+ if is_st == '0' or is_st == '2':
|
|
|
return JsonResponse(status=200, data={'code': 0, 'msg': 'success'})
|
|
|
else:
|
|
|
# Endpoint以杭州为例,其它Region请按实际情况填写。
|