Exemplo n.º 1
0
def send(message):
    message = Utils.decrypt(message)
    """ {c:'控制',a:'行为',Authorization:'行为',data:'JSON数据‘} """
    if 'data' in message.keys():
        if 'Authorization' in message.keys():
            message['data']['Authorization'] = message['Authorization']
        return getattr(globals()[message['c']],message['a'])(message['data'])
    else:
        return getattr(globals()[message['c']],message['a'])(message)
Exemplo n.º 2
0
def send(message):
    # 这里增加判断文件不加密
    if isinstance(message, dict):
        if'UploadService' in message.values():
            pass
    else:
        message = Utils.decrypt(message)
    """ {c:'控制',a:'行为',Authorization:'行为',data:'JSON数据‘} """
    if 'data' in message.keys():
        if 'Authorization' in message.keys():
            message['data']['Authorization'] = message['Authorization']
        return getattr(globals()[message['c']], message['a'])(message['data'])
    else:
        return getattr(globals()[message['c']], message['a'])(message)
Exemplo n.º 3
0
 def inner_wrapper(*args, **kwargs):
     args = Utils.decrypt(args[0])
     return func(args)