文档服务地址:http://47.92.0.57:3000/ 周报索引地址:http://47.92.0.57:3000/s/NruNXRYmV

Commit 979eea8e by 李景熙

后端返回数据单列表格式改动

parent 97f1c524
...@@ -27,7 +27,7 @@ app.register_blueprint(image) ...@@ -27,7 +27,7 @@ app.register_blueprint(image)
app.register_blueprint(dataset) app.register_blueprint(dataset)
if __name__ == '__main__': if __name__ == '__main__':
app.run(debug=True, host='47.92.1.107', port=9100) app.run(debug=True, host='localhost', port=9100)
@app.route('/') @app.route('/')
......
...@@ -23,14 +23,14 @@ def get_data_list(): ...@@ -23,14 +23,14 @@ def get_data_list():
index = 0 index = 0
while index < resLen: while index < resLen:
list.append({ list.append({
'id': result[index]['_id'], 'id': str(result[index]['_id']),
'time': result[index]['date'], 'time': str(result[index]['date']),
'num': len(result[index]['data_list']) 'num': len(result[index]['data_list'])
}) })
index += 1 index += 1
res = { res = {
'code': 1, 'code': 1,
'message': "success", 'message': "success",
'data': str(list) 'data': list
} }
return json.dumps(res) return json.dumps(res)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment