def para_query(): data = getJson.get_test_data_json() if request.method == 'POST': print('post') if request.method == 'GET': return jsonify(data)
def query(): data = getJson.get_test_data_json(Fileway) if request.method == 'POST': print('post') if request.method == 'GET': info = request.values limit = info.get('limit', 10) # 每页显示的条数 offset = info.get('offset', 0) # 分片数,(页码-1)*limit,它表示一段数据的起点 print('get', limit) print('get offset', offset) return jsonify(data)
def query(): data = getJson.get_test_data_json() if request.method == 'POST': print('post') if request.method == 'GET': info = request.values limit = info.get('limit', 10) # 每页显示的条数 offset = info.get('offset', 0) # 分片数,(页码-1)*limit,它表示一段数据的起点 print('get', limit) print('get offset', offset) #return jsonify({'total': len(data), 'rows': data[int(offset):(int(offset) + int(limit))]}) return jsonify(data)