完成主页框架
This commit is contained in:
		
							parent
							
								
									d5c5dd3bb8
								
							
						
					
					
						commit
						b8e59f524a
					
				
							
								
								
									
										25
									
								
								FAuth/Controllers/AppController.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								FAuth/Controllers/AppController.cs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,25 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Diagnostics;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Microsoft.AspNetCore.Mvc;
 | 
			
		||||
using Microsoft.Extensions.Logging;
 | 
			
		||||
using FAuth.Models;
 | 
			
		||||
 | 
			
		||||
namespace FAuth.Controllers
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// 用户控制器
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public class AppController:ControllerBase<AppController>
 | 
			
		||||
    {
 | 
			
		||||
        public AppController(ILogger<AppController> logger,IServiceProvider service) : base(logger,service) {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public IActionResult Index() {
 | 
			
		||||
            return PartialView();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -10,6 +10,7 @@ namespace FAuth.Controllers
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// 控制器类基类
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    //[Route("[Controller]/[Action]")]
 | 
			
		||||
    public abstract class ControllerBase<LoggerType>:Controller
 | 
			
		||||
    {
 | 
			
		||||
        /// <summary>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										25
									
								
								FAuth/Controllers/RoleController.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								FAuth/Controllers/RoleController.cs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,25 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Diagnostics;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Microsoft.AspNetCore.Mvc;
 | 
			
		||||
using Microsoft.Extensions.Logging;
 | 
			
		||||
using FAuth.Models;
 | 
			
		||||
 | 
			
		||||
namespace FAuth.Controllers
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// 角色
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public class RoleController:ControllerBase<RoleController>
 | 
			
		||||
    {
 | 
			
		||||
        public RoleController(ILogger<RoleController> logger,IServiceProvider service) : base(logger,service) {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public IActionResult Index() {
 | 
			
		||||
            return PartialView();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										25
									
								
								FAuth/Controllers/RoleGroupController.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								FAuth/Controllers/RoleGroupController.cs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,25 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Diagnostics;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Microsoft.AspNetCore.Mvc;
 | 
			
		||||
using Microsoft.Extensions.Logging;
 | 
			
		||||
using FAuth.Models;
 | 
			
		||||
 | 
			
		||||
namespace FAuth.Controllers
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// 角色组控制器
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public class RoleGroupController:ControllerBase<RoleGroupController>
 | 
			
		||||
    {
 | 
			
		||||
        public RoleGroupController(ILogger<RoleGroupController> logger,IServiceProvider service) : base(logger,service) {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public IActionResult Index() {
 | 
			
		||||
            return PartialView();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										25
									
								
								FAuth/Controllers/UserController.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								FAuth/Controllers/UserController.cs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,25 @@
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.Diagnostics;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using Microsoft.AspNetCore.Mvc;
 | 
			
		||||
using Microsoft.Extensions.Logging;
 | 
			
		||||
using FAuth.Models;
 | 
			
		||||
 | 
			
		||||
namespace FAuth.Controllers
 | 
			
		||||
{
 | 
			
		||||
    /// <summary>
 | 
			
		||||
    /// 用户控制器
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    public class UserController:ControllerBase<UserController>
 | 
			
		||||
    {
 | 
			
		||||
        public UserController(ILogger<UserController> logger,IServiceProvider service) : base(logger,service) {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public IActionResult Index() {
 | 
			
		||||
            return PartialView();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -105,20 +105,18 @@ namespace FAuth
 | 
			
		||||
            app.UseHttpsRedirection();
 | 
			
		||||
            app.UseStaticFiles();
 | 
			
		||||
 | 
			
		||||
            app.UseRouting();
 | 
			
		||||
 | 
			
		||||
            app.UseSwagger();
 | 
			
		||||
            app.UseSwaggerUI(c => {
 | 
			
		||||
                c.SwaggerEndpoint("/swagger/V1/swagger.json","½Ó¿ÚÎĵµ");
 | 
			
		||||
                c.RoutePrefix = "";
 | 
			
		||||
                c.RoutePrefix = "api";
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            app.UseAuthorization();
 | 
			
		||||
 | 
			
		||||
            app.UseRouting();
 | 
			
		||||
            app.UseEndpoints(endpoints => {
 | 
			
		||||
                endpoints.MapControllerRoute(
 | 
			
		||||
                    name: "default",
 | 
			
		||||
                    pattern: "{controller=Home}/{action=Index}/{id?}");
 | 
			
		||||
                    pattern: "{controller=Home}/{action=Index}");
 | 
			
		||||
            });
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										7
									
								
								FAuth/Views/App/Index.cshtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								FAuth/Views/App/Index.cshtml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,7 @@
 | 
			
		||||
 | 
			
		||||
@{
 | 
			
		||||
    ViewData["Title"] = "Index";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
<h1>AppController Index</h1>
 | 
			
		||||
 | 
			
		||||
@ -1,8 +1,7 @@
 | 
			
		||||
@{
 | 
			
		||||
    ViewData["Title"] = "Home Page";
 | 
			
		||||
    ViewBag.Title = "首页";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
<div class="text-center">
 | 
			
		||||
    <h1 class="display-4">Welcome</h1>
 | 
			
		||||
    <p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										7
									
								
								FAuth/Views/Role/Index.cshtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								FAuth/Views/Role/Index.cshtml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,7 @@
 | 
			
		||||
 | 
			
		||||
@{
 | 
			
		||||
    ViewData["Title"] = "Index";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
<h1>RoleController Index</h1>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										7
									
								
								FAuth/Views/RoleGroup/Index.cshtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								FAuth/Views/RoleGroup/Index.cshtml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,7 @@
 | 
			
		||||
 | 
			
		||||
@{
 | 
			
		||||
    ViewData["Title"] = "Index";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
<h1>RoleGroupController Index</h1>
 | 
			
		||||
 | 
			
		||||
@ -11,7 +11,7 @@
 | 
			
		||||
    <header>
 | 
			
		||||
        <nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
 | 
			
		||||
            <div class="container">
 | 
			
		||||
                <a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">FAuth</a>
 | 
			
		||||
                <a class="navbar-brand" asp-controller="Home" asp-action="Index">FAuth统一认证登录平台(SSO)</a>
 | 
			
		||||
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
 | 
			
		||||
                        aria-expanded="false" aria-label="Toggle navigation">
 | 
			
		||||
                    <span class="navbar-toggler-icon"></span>
 | 
			
		||||
@ -19,10 +19,16 @@
 | 
			
		||||
                <div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse">
 | 
			
		||||
                    <ul class="navbar-nav flex-grow-1">
 | 
			
		||||
                        <li class="nav-item">
 | 
			
		||||
                            <a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
 | 
			
		||||
                            <a class="nav-link text-dark" fajax-updata="main" asp-controller="App" asp-action="Index">应用管理</a>
 | 
			
		||||
                        </li>
 | 
			
		||||
                        <li class="nav-item">
 | 
			
		||||
                            <a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
 | 
			
		||||
                            <a class="nav-link text-dark" fajax-updata="main" asp-controller="RoleGroup" asp-action="Index">角色组管理</a>
 | 
			
		||||
                        </li>
 | 
			
		||||
                        <li class="nav-item">
 | 
			
		||||
                            <a class="nav-link text-dark" fajax-updata="main" asp-controller="Role" asp-action="Index">角色管理</a>
 | 
			
		||||
                        </li>
 | 
			
		||||
                        <li class="nav-item">
 | 
			
		||||
                            <a class="nav-link text-dark" fajax-updata="main" asp-controller="User" asp-action="Index">用户管理</a>
 | 
			
		||||
                        </li>
 | 
			
		||||
                    </ul>
 | 
			
		||||
                </div>
 | 
			
		||||
@ -37,13 +43,13 @@
 | 
			
		||||
 | 
			
		||||
    <footer class="border-top footer text-muted">
 | 
			
		||||
        <div class="container">
 | 
			
		||||
            © 2020 - FAuth - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
 | 
			
		||||
            © 2020 - FAuth - <a target="_blank" href="http://39.105.71.191/Falcon/FalconSSO/issues">技术支持</a>
 | 
			
		||||
        </div>
 | 
			
		||||
    </footer>
 | 
			
		||||
    <script src="~/lib/jquery/dist/jquery.min.js"></script>
 | 
			
		||||
    <script src="~/lib/jquery.unobtrusive-ajax/jquery.unobtrusive-ajax.min.js"></script>
 | 
			
		||||
    <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
 | 
			
		||||
    <script src="~/js/site.js" asp-append-version="true"></script>
 | 
			
		||||
    @RenderSection("Scripts", required: false)
 | 
			
		||||
    @RenderSection("Scripts",required: false)
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										7
									
								
								FAuth/Views/User/Index.cshtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								FAuth/Views/User/Index.cshtml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,7 @@
 | 
			
		||||
 | 
			
		||||
@{
 | 
			
		||||
    ViewData["Title"] = "Index";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
<h1>User Index</h1>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user