()
return jsonify({'data': _data, 'status': 1})
返回待编辑任务信息
返回待编辑任务信息
返回待编辑任务信息
def edit_task():
    """ 返回待编辑任务信息 """
    data = request.json
    task_id = data.get('id')
    c = Task.query.filter_by(id=task_id).first()
    _data = {'num': c.num, 'task_name': c.task_name, 'task_config_time': c.task_config_time, 'task_type': c.task_type,
             'set_ids': json.loads(c.set_id), 'case_ids': json.loads(c.case_id),
             'task_to_email_address': c.task_to_email_address, 'task_send_email_address': c.task_send_email_address,
             'password': c.email_password, 'send_email_status': c.send_email_status}

    return jsonify({'data': _data, 'status': 1})
def edit_task ( ) : data = request . json task_id = data . get ( 'id' ) c = Task . query . filter_by ( id = task_id ) . first ( ) _data = { 'num' : c . num , 'task_name' : c . task_name , 'task_config_time' : c . task_config_time , 'task_type' : c . task_type , 'set_ids' : json . loads ( c . set_id ) , 'case_ids' : json . loads ( c . case_id ) , 'task_to_email_address' : c . task_to_email_address , 'task_send_email_address' : c . task_send_email_address , 'password' : c . email_password , 'send_email_status' : c . send_email_status } return jsonify ( { 'data' : _data , 'status' : 1 } )