请求管道,登录前的验证,否则重定向到登录页面. # coding: utf8 from flask import render_template, request, g, session, redirect, url_for, jsonify from pycode import app from master.menu import get_master_menu @app.before_request def before_request(): g.menu1 = [('index', 'W