You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.7 KiB
35 lines
1.7 KiB
1 month ago
|
from flask import Flask, jsonify, send_from_directory
|
||
|
|
||
|
app = Flask(__name__, static_folder="public", static_url_path="")
|
||
|
|
||
|
# 根路径返回 index.html
|
||
|
@app.route("/")
|
||
|
def serve_index():
|
||
|
return send_from_directory(app.static_folder, "index.html")
|
||
|
|
||
|
# API 子路径,提供 WPS 表格处理知识点复习资料
|
||
|
@app.route("/api/wps-review")
|
||
|
def api_wps_review():
|
||
|
wps_review_data = {
|
||
|
"message": "WPS 表格处理知识点复习资料",
|
||
|
"data": {
|
||
|
"introduction": "WPS 表格是计算机二级考试的重要内容,掌握基本操作和高级技巧是关键。",
|
||
|
"key_topics": [
|
||
|
{"topic": "基础操作", "content": "创建和保存表格、输入数据、调整行高列宽、格式化单元格。"},
|
||
|
{"topic": "公式与函数", "content": "SUM、AVERAGE、MAX、MIN 等常用函数的使用,相对引用与绝对引用。"},
|
||
|
{"topic": "数据排序与筛选", "content": "升序、降序排序,自动筛选和高级筛选的使用。"},
|
||
|
{"topic": "数据透视表", "content": "创建数据透视表,进行数据汇总与分析。"},
|
||
|
{"topic": "图表制作", "content": "柱状图、折线图、饼图的创建与美化。"}
|
||
|
],
|
||
|
"tips": [
|
||
|
"多练习实际操作,熟悉快捷键。",
|
||
|
"理解公式和函数的逻辑,多用实例练习。",
|
||
|
"掌握数据透视表的创建和应用,这是高频考点。",
|
||
|
"图表制作要注重细节,确保美观且准确。"
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
return jsonify(wps_review_data)
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
app.run(debug=True,host="0.0.0.0", port=80)
|