online_blue.py 319 B

1234567891011
  1. from flask import Blueprint, jsonify
  2. from mysql_db import MysqlDB
  3. online_blue = Blueprint('online_blue', __name__)
  4. @online_blue.route('/online', methods=['POST', 'GET'])
  5. def online():
  6. db = MysqlDB('linshi', 1)
  7. result = db.select('select * from report_push_customer_info limit 10')
  8. return jsonify(result)