Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
开发团队
MVC5博客系统
提交
62ff1963
MVC5博客系统
项目概览
开发团队
/
MVC5博客系统
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MVC5博客系统
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
62ff1963
编写于
5月 19, 2022
作者:
大
大•虫
提交者:
weichunjie
5月 20, 2022
浏览文件
操作
浏览文件
下载
差异文件
Url格式化
上级
a8a6a2cc
21081b8a
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
30 addition
and
12 deletion
+30
-12
Blog.Web/App_Start/RouteConfig.cs
Blog.Web/App_Start/RouteConfig.cs
+5
-6
Blog.Web/Blog.Web.csproj
Blog.Web/Blog.Web.csproj
+3
-2
Blog.Web/Controllers/ArticleController.cs
Blog.Web/Controllers/ArticleController.cs
+1
-1
Blog.Web/Controllers/HomeController.cs
Blog.Web/Controllers/HomeController.cs
+5
-0
Blog.Web/Views/Article/Index.cshtml
Blog.Web/Views/Article/Index.cshtml
+0
-0
Blog.Web/Views/Home/Articles.cshtml
Blog.Web/Views/Home/Articles.cshtml
+8
-0
Blog.Web/Views/Shared/_Layout.cshtml
Blog.Web/Views/Shared/_Layout.cshtml
+5
-0
README.md
README.md
+3
-3
未找到文件。
Blog.Web/App_Start/RouteConfig.cs
浏览文件 @
62ff1963
...
...
@@ -14,17 +14,16 @@ namespace Blog.Web
routes
.
IgnoreRoute
(
"{resource}.axd/{*pathInfo}"
);
routes
.
MapRoute
(
name
:
"Articles"
,
url
:
"Articles/{action}/{id}"
,
defaults
:
new
{
controller
=
"Articles"
,
action
=
"Index"
,
id
=
UrlParameter
.
Optional
}
);
routes
.
MapRoute
(
name
:
"gl"
,
url
:
"gl/{action}/{id}"
,
defaults
:
new
{
controller
=
"Manger"
,
action
=
"Index"
,
id
=
UrlParameter
.
Optional
}
);
routes
.
MapRoute
(
name
:
"ArticleList"
,
url
:
"{Category}/Articles/{Page}"
,
defaults
:
new
{
controller
=
"Home"
,
action
=
"Articles"
,
Category
=
UrlParameter
.
Optional
,
Page
=
UrlParameter
.
Optional
}
);
routes
.
MapRoute
(
name
:
"Home"
,
url
:
"{action}/{id}"
,
...
...
Blog.Web/Blog.Web.csproj
浏览文件 @
62ff1963
...
...
@@ -181,7 +181,7 @@
<Compile
Include=
"App_Start\FilterConfig.cs"
/>
<Compile
Include=
"App_Start\RouteConfig.cs"
/>
<Compile
Include=
"App_Start\UnityConfig.cs"
/>
<Compile
Include=
"Controllers\Article
s
Controller.cs"
/>
<Compile
Include=
"Controllers\ArticleController.cs"
/>
<Compile
Include=
"Controllers\FileController.cs"
/>
<Compile
Include=
"Controllers\HomeController.cs"
/>
<Compile
Include=
"Controllers\LinkController.cs"
/>
...
...
@@ -223,7 +223,8 @@
<Content
Include=
"Views\Link\Index.cshtml"
/>
<Content
Include=
"Views\Tag\Index.cshtml"
/>
<Content
Include=
"Views\File\Index.cshtml"
/>
<Content
Include=
"Views\Articles\Index.cshtml"
/>
<Content
Include=
"Views\Article\Index.cshtml"
/>
<Content
Include=
"Views\Home\Articles.cshtml"
/>
</ItemGroup>
<ItemGroup>
<Folder
Include=
"App_Data\"
/>
...
...
Blog.Web/Controllers/Article
s
Controller.cs
→
Blog.Web/Controllers/ArticleController.cs
浏览文件 @
62ff1963
...
...
@@ -6,7 +6,7 @@ using System.Web.Mvc;
namespace
Blog.Web.Controllers
{
public
class
Article
s
Controller
:
Controller
public
class
ArticleController
:
Controller
{
// GET: Article
public
ActionResult
Index
()
...
...
Blog.Web/Controllers/HomeController.cs
浏览文件 @
62ff1963
...
...
@@ -21,6 +21,11 @@ namespace Blog.Web.Controllers
return
View
();
}
public
ActionResult
Articles
(
string
Category
,
int
Page
=
1
)
{
return
View
();
}
public
ActionResult
About
()
{
ViewBag
.
Message
=
"Your application description page."
;
...
...
Blog.Web/Views/Article
s
/Index.cshtml
→
Blog.Web/Views/Article/Index.cshtml
浏览文件 @
62ff1963
文件已移动
Blog.Web/Views/Home/Articles.cshtml
0 → 100644
浏览文件 @
62ff1963
@{
ViewBag.Title = "Articles";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>
Articles
</h2>
Blog.Web/Views/Shared/_Layout.cshtml
浏览文件 @
62ff1963
...
...
@@ -22,6 +22,11 @@
<div
class=
"navbar-collapse collapse"
>
<ul
class=
"nav navbar-nav"
>
<li>
@Html.ActionLink("首页", "Index", "Home")
</li>
<li>
@Html.ActionLink("生活日记", "Articles", new { Category = "Life" })
</li>
<li>
@Html.ActionLink("工作笔记", "Articles", new { Category = "Work" })
</li>
<li>
@Html.ActionLink("技术分享", "Articles", new { Category = "Tech" })
</li>
<li>
@Html.ActionLink("摄影相册", "Articles", new { Category = "Xc" })
</li>
<li>
@Html.ActionLink("软件工具", "Articles", new { Category = "Soft" })
</li>
<li>
@Html.ActionLink("关于", "About", "Home")
</li>
<li>
@Html.ActionLink("联系方式", "Contact", "Home")
</li>
</ul>
...
...
README.md
浏览文件 @
62ff1963
#MVC5ϵͳ
## Ŀܹ
### ASP.NETMVC5 +Unity +SugarSql
\ No newline at end of file
#MVC5博客系统
## 项目框架结构
### ASP.NETMVC5 +Unity +SugarSql
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录