HomeController.cs
1.42 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
using HHECS.Application.Service;
using HHECS.Model.ClassComparer;
using HHECS.Model.Entities;
using HHECS.Web.Models;
using HHECS.WebCommon.Http;
using HHECS.WebCommon.Json;
using HHECS.WebCommon.SystemHelp.Obj;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
namespace HHECS.Web.Controllers
{
//[Authorize]
public class HomeController : BaseController
{
private readonly PermissionService _permissionService;
public HomeController(PermissionService permissionService)
{
_permissionService = permissionService;
}
public IActionResult Index()
{
ResponseEnumJosn();
return View();
}
public ActionResult Welcome()
{
return View();
}
public IActionResult Privacy()
{
return View();
}
[HttpGet]
public string GetMenuList()
{
return _permissionService.GetMenuList(User);
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
}
}
}