''' 用户业务 ''' from flask import Blueprint, request, render_template, jsonify, redirect import adminProcess admin = Blueprint("admin",__name__) ''' 后台登录处理 ''' @admin.route("/admin/login",methods=['POST']) def adminlogin(): username = request.form['name'] userpwd = request.form['password'] print(username,userpwd) if adminProcess.login(username,userpwd): return redirect("/admin/index") else: return redirect('/admin')