public async Task <ActionResult> Index(string view) { var user = AbpSession.ToUserIdentifier(); Session.Dto.LoginInformationDto loginInfo; try { loginInfo = await _sessionAppService.GetCurrentLoginInformations(); var userModel = await _userManager.GetByIdAsync(user.UserId); if (userModel.GetData <string>("currentToken") != Request.Cookies["token"]) { throw new Exception("已在别处登录"); } } catch { Response.Cookies.Delete("token"); return(Redirect("/Account/Login")); } var appConfiguration = _env.GetAppConfiguration(); ViewData["softTitle"] = appConfiguration["System:SoftTitle"]; //默认首页 if (loginInfo.User.HomeUrl.IsNullOrEmpty()) { loginInfo.User.HomeUrl = "/Home/Default"; } //申报人、分公司科管、专业负责人、集团科管进入赛事实例页页面 if (AbpSession.IsReporter() || AbpSession.IsSubManager() || AbpSession.IsGroupManager() || AbpSession.IsMajorManager() ) { if (view == "resultsearch") { return(View("ResultSearch", loginInfo)); } return(View("Index_MatchInstance", loginInfo)); } if (AbpSession.IsExpert()) { return(View("Index_Review", loginInfo)); } if (AbpSession.IsProjectViewer()) { ViewData["MatchNames"] = await MatchManager.GetAll().Select(o => o.Name).ToListAsync(); return(View("ProjectView", loginInfo)); } return(View(loginInfo)); }