Ver Fonte

修复旧添加设备接口问题

locky há 3 anos atrás
pai
commit
35f4ca5cdd
1 ficheiros alterados com 3 adições e 4 exclusões
  1. 3 4
      Controller/EquipmentManager.py

+ 3 - 4
Controller/EquipmentManager.py

@@ -256,7 +256,7 @@ def modifyUserEquipmentInterface(request):
             if deviceData.__contains__('NickName') and us_qs[0].is_alexa == 1:
                 encrypt_pwd = ''
                 if deviceData.__contains__('View_Password'):
-                    encrypt_pwd = ModelService.encrypt_pwd(deviceData['View_Password'])
+                    encrypt_pwd = deviceData['View_Password']
                 # 请求Alexa服务器更新事件网关
                 url = 'https://www.zositech.xyz/deviceStatus/addOrUpdateV2'
                 data_list = [{'userID': userID, 'UID': uid, 'uid_nick': nickname, 'password': encrypt_pwd}]
@@ -378,7 +378,6 @@ def addInterface(request):
     version = request_dict.get('version', '')
     isCheckMainUser = request_dict.get('isCheckMainUser', None)
     isMainUserExists = False
-    encrypt_password = ModelService.encrypt_pwd(View_Password)
     if all([UID, NickName, View_Account, Type, ChannelIndex]):
         tko = TokenObject(token)
         response.lang = tko.lang
@@ -506,9 +505,9 @@ def addInterface(request):
                                 for uid_channel_set in uid_channel_set_qs:
                                     data_list.append(
                                         {'userID': userID, 'UID': UID, 'uid_nick': uid_channel_set['channel_name'],
-                                         'channel': uid_channel_set['channel'], 'password': encrypt_password})
+                                         'channel': uid_channel_set['channel'], 'password': View_Password})
                         else:
-                            data_list = [{'userID': userID, 'UID': UID, 'uid_nick': NickName, 'password': encrypt_password}]
+                            data_list = [{'userID': userID, 'UID': UID, 'uid_nick': NickName, 'password': View_Password}]
 
                         # 请求Alexa服务器更新事件网关
                         data_list = json.dumps(data_list)