更新 views.py
This commit is contained in:
13
app/views.py
13
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)
|
||||
|
||||
Reference in New Issue
Block a user