def get(self, id): article = query_article(id) if article is None: return jsonify(falseReturn("该文章不存在")) data = [] data.append(Article.get_article(article)) history("article", article.title, id) return jsonify(true_data_Return(data, "", "获取数据成功"))
def get_article(aid): res = Article.get_article(aid) return jsonify(res)