AcsMonitorController.cs
1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using Infrastructure;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
using System.Text;
using WebApp;
using WebRepository;
namespace WebMvc
{
/// <summary>
/// AcsMonitor
/// </summary>
[Area("monitor")]
public class AcsMonitorController : BaseController
{
private readonly string _appKey = "hhweb";
private IUnitWork _unitWork;
private IAuth _myauthUtil;
public AcsMonitorController(IUnitWork unitWork, IAuth authUtil) : base(authUtil)
{
_unitWork = unitWork;
_myauthUtil = authUtil;
}
#region 视图功能
/// <summary>
/// 默认Action
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 全屏Action
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult Full()
{
SysInfo sysInfo = _unitWork.FindSingle<SysInfo>(u => u.AppKey.Equals(_appKey));
ViewBag.CopyRight = sysInfo.Copyright;
ViewBag.SystemNameCn = sysInfo.Title;
ViewBag.SystemNameUs = sysInfo.TitleUs;
ViewBag.IndexLogo = sysInfo.IndexLogo;
AuthStrategyContext authStrategyContext = _myauthUtil.GetCurrentUser();
if (authStrategyContext != null)
{
ViewBag.Account = authStrategyContext.User.Account;
ViewBag.Name = authStrategyContext.User.Name;
}
return View();
}
#endregion
}
}