diff --git a/applications/view/system/rights.py b/applications/view/system/rights.py index c1a107f..2087da4 100644 --- a/applications/view/system/rights.py +++ b/applications/view/system/rights.py @@ -4,6 +4,7 @@ from collections import OrderedDict from flask import jsonify, current_app, Blueprint, render_template from flask_login import login_required, current_user +from ...common.utils.http import table_api from ...models import Power from ...schemas import PowerOutSchema @@ -85,10 +86,118 @@ def configs(): "keepLoad": 0, # 布局顶部主题 "autoHead": False - }, header=False) + }, header={ + 'message': '/system/rights/message' + }) return jsonify(config) +# 消息 +@bp.get('/message') +@login_required +def message(): + return dict(code=200, + data=[ + { + "id": 1, + "title": "通知", + "children": [ + { + "id": 11, + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png", + "title": "你收到了 14 份新周报", + "context": "这是消息内容。", + "form": "就眠仪式", + "time": "刚刚" + }, + { + "id": 12, + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png", + "title": "曲妮妮 已通过第三轮面试", + "context": "这是消息内容。", + "form": "就眠仪式", + "time": "刚刚" + }, + { + "id": 11, + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/kISTdvpyTAhtGxpovNWd.png", + "title": "可以区分多种通知类型", + "context": "这是消息内容。", + "form": "就眠仪式", + "time": "刚刚" + }, + { + "id": 12, + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png", + "title": "左侧图标用于区分不同的类型", + "context": "这是消息内容。", + "form": "就眠仪式", + "time": "刚刚" + }, + { + "id": 11, + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png", + "title": "内容不要超过两行字", + "context": "这是消息内容。", + "form": "就眠仪式", + "time": "刚刚" + } + ] + }, + { + "id": 2, + "title": "消息", + "children": [ + { + "id": 11, + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png", + "title": "你收到了 14 份新周报", + "context": "这是消息内容。", + "form": "就眠仪式", + "time": "刚刚" + }, + { + "id": 12, + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png", + "title": "曲妮妮 已通过第三轮面试", + "context": "这是消息内容。", + "form": "就眠仪式", + "time": "刚刚" + }, + { + "id": 11, + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/kISTdvpyTAhtGxpovNWd.png", + "title": "可以区分多种通知类型", + "context": "这是消息内容。", + "form": "就眠仪式", + "time": "刚刚" + }, + { + "id": 12, + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/GvqBnKhFgObvnSGkDsje.png", + "title": "左侧图标用于区分不同的类型", + "context": "这是消息内容。", + "form": "就眠仪式", + "time": "刚刚" + }, + { + "id": 11, + "avatar": "https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png", + "title": "内容不要超过两行字", + "context": "这是消息内容。", + "form": "就眠仪式", + "time": "刚刚" + } + ] + }, + { + "id": 3, + "title": "代办", + "children": [] + } + ]) + + # 菜单 @bp.get('/menu') @login_required @@ -148,6 +257,7 @@ def menu(): menu_dict[_dict['parent_id']].append(_dict) return jsonify(sorted(menu_dict.get(0), key=lambda item: item['sort'])) + # 控制台页面 @bp.get('/welcome') @login_required