Pārlūkot izejas kodu

将dev合并到正式服务器

chanjunkai 5 gadi atpakaļ
vecāks
revīzija
834195dcaa

+ 2 - 2
Ansjer/urls.py

@@ -116,6 +116,7 @@ urlpatterns = [
     # 重置密码验证码校验
     url(r'^v2/authcode/verify$', UserController.verifyAuthcode.as_view()),
     url(r'^v2/account/logout$', UserController.V2LogoutView.as_view()),
+    url(r'^v2/account/login$', UserController.v3LoginView.as_view()),
     url(r'^v3/account/login$', UserController.v3LoginView.as_view()),
     # 新增
     url(r'^detect/detect_group_push$',DetectController.NotificationView.detect_group_push),
@@ -202,8 +203,7 @@ urlpatterns = [
     # url(r'^(?P<path>.*)/(?P<UID>.*)/lls$', Test.Test.as_view(), name=u'gg'),
     #testing....................
     re_path('(?P<path>.*)', LogManager.errorPath),
-    # test.....
-    # 111111111
+
 
 
 ]

+ 5 - 1
Controller/CloudStorage.py

@@ -217,6 +217,9 @@ class CloudStorageView(View):
             aws_secret_access_key=aws_secret_access_key,
             region_name=bucket__region
         )
+        '''
+            http://test.dvema.com/cloudstorage/signplaym3u8?uid=VVDHCVBYDKFMJRWA111A&channel=1&time=1586940120&sign=tktktktk
+        '''
         conn = session.client('s3')
         playlist_entries = []
         for i in range(fg):
@@ -237,7 +240,8 @@ class CloudStorageView(View):
                 'duration': 10,
             })
         playlist = PlaylistGenerator(playlist_entries).generate()
-        response = HttpResponse(playlist, content_type="application/octet-stream")
+        response = HttpResponse(playlist, content_type="application/vnd.apple.mpegurl")
+        # response = HttpResponse(playlist, content_type="application/octet-stream")
         return response
         return HttpResponse(status=200, content=playlist)
 

+ 1 - 1
Controller/DateController.py

@@ -422,7 +422,7 @@ class DateConView(View):
         {"dayStr": "20201231", "type": "0"}
         ]
 
-        srt=[{"dayStr": h, "type": "该不支持日期,只支持2020年"}]
+        srt=[{"dayStr": h, "type": "该日期不支持,只支持2020年"}]
         for i in day:
             if i['dayStr']==h:
                 print(i)

+ 5 - 0
Controller/UserController.py

@@ -2626,12 +2626,16 @@ class alexaUidView(TemplateView):
             uid_dict = {}
             uid_list = []
             for uid_q in uid_qs:
+                #追加
                 uid_list.append(uid_q['UID'])
+                #给uid_q['UID']赋值
                 uid_dict[uid_q['UID']] = {'nick': uid_q['NickName'], 'password': uid_q['View_Password']}
             us_qs = UidSetModel.objects.filter(uid__in=uid_list, is_alexa=2).values('uid', 'region_alexa')
+            # uid,password,region的列表
             uid_arr = []
             for us in us_qs:
                 uid = us['uid']
+                #设备alexa区域
                 region_alexa = us['region_alexa']
                 if region_alexa == '':
                     region_alexa = "en"
@@ -2640,6 +2644,7 @@ class alexaUidView(TemplateView):
                                 'region': region_alexa})
             res = {
                 'uid_arr': uid_arr
+
             }
             return response.json(0, res)
         else:

+ 2 - 0
Object/ResponseObject.py

@@ -143,6 +143,8 @@ class ResponseObject(object):
             message = msg[code]
         except Exception as e:
             message = '系统错误,code不存在'
+        print(self.lang == 'cn')
+        print(msg)
         return {'result_code': code, 'reason': message, 'result': res, 'error_code': code}
 
     def formal(self, code, res={}):