From 3c4377915b9ca4313f2cffb76e0f20aa9fd8fe79 Mon Sep 17 00:00:00 2001 From: wojiaoyishang Date: Fri, 24 Jan 2025 18:44:53 +0800 Subject: [PATCH] =?UTF-8?q?Update:=20=E5=A2=9E=E5=8A=A0=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- applications/view/system/rights.py | 112 ++++++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 1 deletion(-) 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