From 0f0aa99c0dba6ffe8a2545b9f3243c8acddb0b42 Mon Sep 17 00:00:00 2001 From: wangsiyuan <2392948297@qq.com> Date: Mon, 25 Dec 2023 17:35:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20views.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/views.py b/app/views.py index 2ab199d..35fd0f3 100644 --- a/app/views.py +++ b/app/views.py @@ -81,5 +81,18 @@ def logout(): return redirect('/login') +@app.route('/api/menu') +def get_menu(): + # 根据用户角色或其他逻辑获取菜单项 + menu_items = [ + {"name": "课程信息", "link": "#"}, + {"name": "课程签到", "link": "#"}, + {"name": "公告信息", "link": "#"}, + {"name": "签到提醒", "link": "#"}, + # ... 其他菜单项 + ] + return jsonify(menu_items) + + if __name__ == '__main__': app.run(debug=True)