|
@@ -39,7 +39,11 @@ class SuperPasswordView(View):
|
|
|
response = ResponseObject()
|
|
|
tko = TokenObject(token)
|
|
|
if tko.code != 0:
|
|
|
- return response.json(tko.code)
|
|
|
+ tko = TokenObject(
|
|
|
+ request.META.get('HTTP_AUTHORIZATION'))
|
|
|
+ if tko.code != 0:
|
|
|
+ return response.json(tko.code)
|
|
|
+ response.lang = tko.lang
|
|
|
userID = tko.userID
|
|
|
if operation == 'getAuthorizationCode': # 用户提交请求
|
|
|
return self.getAuthorizationCode(request_dict, response, userID)
|
|
@@ -114,7 +118,6 @@ class SuperPasswordView(View):
|
|
|
if not device_super_password_qs.exists():
|
|
|
return response.json(173)
|
|
|
status = int(status)
|
|
|
- authcode = ''
|
|
|
if status == 1:
|
|
|
# 验证码生成
|
|
|
super_code = RandomStr(6, True)
|