初始化项目
This commit is contained in:
34
UI/App_Start/BundleConfig.cs
Normal file
34
UI/App_Start/BundleConfig.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Web;
|
||||
using System.Web.Optimization;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class BundleConfig
|
||||
{
|
||||
// 有关捆绑的详细信息,请访问 https://go.microsoft.com/fwlink/?LinkId=301862
|
||||
public static void RegisterBundles(BundleCollection bundles)
|
||||
{
|
||||
// 将项目中的多个js文件捆绑为一个clientfeaturesscripts.js文件
|
||||
bundles.Add(new ScriptBundle("~/bundles/clientfeaturesscripts")
|
||||
.Include("~/Lib/plugins/jquery/jquery.min.js",
|
||||
"~/Lib/plugins/bootstrap/js/bootstrap.bundle.min.js",
|
||||
"~/Lib/plugins/sweetalert2/sweetalert2.min.js",
|
||||
"~/Lib/plugins/bs-custom-file-input/bs-custom-file-input.min.js",
|
||||
"~/Lib/dist/js/adminlte.min.js",
|
||||
"~/Lib/plugins/datatables/jquery.dataTables.min.js",
|
||||
"~/Lib/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js",
|
||||
"~/Lib/plugins/daterangepicker/daterangepicker.js"
|
||||
));
|
||||
bundles.Add(new StyleBundle("~/Lib/dist/css/distcss"
|
||||
).Include("~/Lib/dist/css/google.css?family=Source+Sans+Pro:300,400,400i,700&display=fallback",
|
||||
"~/Lib/dist/css/adminlte.min.css.map",
|
||||
"~/Lib/dist/css/adminlte.min.css"));
|
||||
bundles.Add(new StyleBundle("~/Lib/plugins/pluginscss"
|
||||
).Include(
|
||||
"~/Lib/plugins/toastr/toastr.min.css",
|
||||
"~/Lib/plugins/daterangepicker/daterangepicker.css",
|
||||
"~/Lib/plugins/sweetalert2-theme-bootstrap-4/bootstrap-4.min.css",
|
||||
"~/Lib/plugins/toastr/toastr.min.css"));
|
||||
}
|
||||
}
|
||||
}
|
||||
13
UI/App_Start/FilterConfig.cs
Normal file
13
UI/App_Start/FilterConfig.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class FilterConfig
|
||||
{
|
||||
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
|
||||
{
|
||||
filters.Add(new HandleErrorAttribute());
|
||||
}
|
||||
}
|
||||
}
|
||||
23
UI/App_Start/RouteConfig.cs
Normal file
23
UI/App_Start/RouteConfig.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class RouteConfig
|
||||
{
|
||||
public static void RegisterRoutes(RouteCollection routes)
|
||||
{
|
||||
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
|
||||
routes.MapMvcAttributeRoutes();
|
||||
routes.MapRoute(
|
||||
name: "Default",
|
||||
url: "{controller}/{action}/{id}",
|
||||
defaults: new { controller = "Home", action = "IndexInfo", id = UrlParameter.Optional }
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
21
UI/App_Start/WebApiConfig.cs
Normal file
21
UI/App_Start/WebApiConfig.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public static class WebApiConfig
|
||||
{
|
||||
public static void Register(HttpConfiguration config)
|
||||
{
|
||||
config.MapHttpAttributeRoutes();
|
||||
|
||||
config.Routes.MapHttpRoute(
|
||||
name: "DefaultApi",
|
||||
routeTemplate: "api/{controller}/{action}/{id}",
|
||||
defaults: new { id = RouteParameter.Optional }
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user