AyaWo.Web/Controllers/loginController.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using AyaWo.Business;
using AyaWo.Util;
using AyaWo.Util.Cache;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace AyaWo.Web.Controllers
{
    [HandlerLogin(FilterMode.Ignore)]
    public class loginController : MvcControllerBase
    {
        // GET: login
        public ActionResult Index(string backUrl)
        {
            if(backUrl.IsNullOrWhiteSpace())
                backUrl= "/Home";
            ViewData["backUrl"] = backUrl;
            return View();
        }

        /// <summary>
        /// 生成验证码
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public ActionResult VerifyCode()
        {
            return File(new VerifyCode().GetVerifyCode(), @"image/Gif");
        }


        /// <summary>
        /// 安全退出
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        [AjaxOnly]
        [HandlerLogin(FilterMode.Enforce)]
        public ActionResult OutLogin()
        {
            var userInfo = Operator.GetUserInfo();
            LogInfo logEntity = new LogInfo();
            logEntity.CategoryId = 1;

            logEntity.OperateType = "退出登陆";
            logEntity.OperateAccount = userInfo.Account + "(" + userInfo.NickName + ")";
            logEntity.OperateUserId = userInfo.UserID;
            logEntity.ExecuteResult = 1;
            logEntity.ExecuteResultJson = "退出系统";
            logEntity.Module = "登陆模块";
            logEntity.WriteLog();
            Session.Abandon();                                          //清除当前会话
            Session.Clear();                                            //清除当前浏览器所有Session
            Operator.OutLog();
            return Success("退出系统");
        }

后面还有 64 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。