zhangdongming 1 жил өмнө
parent
commit
1ccf77e0e8

+ 3 - 2
Controller/CloudVod.py

@@ -43,7 +43,8 @@ class CloudVodView(View):
         return self.validation(request.POST, request, operation)
 
     def validation(self, request_dict, request, operation):
-        response = ResponseObject()
+        lang = request_dict.get('lang', 'en')
+        response = ResponseObject(lang)
         if operation is None:
             return response.json(444, 'error path')
         if operation == 'getSts':
@@ -61,7 +62,7 @@ class CloudVodView(View):
             token = request_dict.get('token', None)
             # 设备主键uid
             tko = TokenObject(token)
-            response.lang = tko.lang
+            response.lang = lang if lang else tko.lang
             if tko.code != 0:
                 return response.json(tko.code)
             userID = tko.userID