Browse Source

1.定时每周重建一次索引库;
2.修正一些遗留bug
3.前端bug修复
4.增加分词库

懒得勤快 6 years ago
parent
commit
b48aa3399b

File diff suppressed because it is too large
+ 0 - 127
src/Masuit.MyBlogs.Core/App_Data/CustomKeywords.txt


+ 10 - 1
src/Masuit.MyBlogs.Core/Configs/HangfireJobInit.cs

@@ -10,7 +10,7 @@ namespace Masuit.MyBlogs.Core.Configs
     /// <summary>
     /// hangfire配置
     /// </summary>
-    public class HangfireJobInit
+    public static class HangfireJobInit
     {
         /// <summary>
         /// hangfire初始化
@@ -19,6 +19,7 @@ namespace Masuit.MyBlogs.Core.Configs
         {
             RecurringJob.AddOrUpdate(() => CheckLinks(), Cron.HourInterval(5)); //每5h检查友链
             RecurringJob.AddOrUpdate(() => EverydayJob(), Cron.Daily, TimeZoneInfo.Local); //每天的任务
+            RecurringJob.AddOrUpdate(() => EveryweekJob(), Cron.Weekly(DayOfWeek.Monday, 3), TimeZoneInfo.Local); //每周的任务
             using (RedisHelper redisHelper = RedisHelper.GetInstance())
             {
                 if (!redisHelper.KeyExists("ArticleViewToken"))
@@ -43,5 +44,13 @@ namespace Masuit.MyBlogs.Core.Configs
         {
             HangfireHelper.CreateJob(typeof(IHangfireBackJob), nameof(HangfireBackJob.EverydayJob), "default");
         }
+
+        /// <summary>
+        /// 每周任务
+        /// </summary>
+        public static void EveryweekJob()
+        {
+            HangfireHelper.CreateJob(typeof(IHangfireBackJob), nameof(HangfireBackJob.CreateLiceneIndex), "default");
+        }
     }
 }

+ 4 - 2
src/Masuit.MyBlogs.Core/Controllers/BugController.cs

@@ -11,6 +11,7 @@ using Masuit.Tools.Core.Net;
 using Masuit.Tools.Systems;
 using Microsoft.AspNetCore.Hosting;
 using Microsoft.AspNetCore.Mvc;
+using Microsoft.Net.Http.Headers;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -52,7 +53,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// bug首页
         /// </summary>
         /// <returns></returns>
-        [Route("bug")]
+        [Route("bug"), ResponseCache(Duration = 600, VaryByHeader = HeaderNames.Cookie)]
         public ActionResult Index()
         {
             return View();
@@ -101,7 +102,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// </summary>
         /// <param name="id"></param>
         /// <returns></returns>
-        [Route("bug/{id:int}")]
+        [Route("bug/{id:int}"), ResponseCache(Duration = 600, VaryByQueryKeys = new[] { "id" }, VaryByHeader = HeaderNames.Cookie)]
         public ActionResult Datails(int id)
         {
             Issue issue = IssueService.GetById(id);
@@ -171,6 +172,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// 获取问题级别
         /// </summary>
         /// <returns></returns>
+        [ResponseCache(Duration = 600)]
         public ActionResult GetBugLevels()
         {
             List<object> list = new List<object>();

+ 2 - 2
src/Masuit.MyBlogs.Core/Controllers/CategoryController.cs

@@ -5,7 +5,6 @@ using Masuit.MyBlogs.Core.Models.DTO;
 using Masuit.MyBlogs.Core.Models.Entity;
 using Masuit.MyBlogs.Core.Models.Enum;
 using Microsoft.AspNetCore.Mvc;
-using Microsoft.Net.Http.Headers;
 using System.Linq;
 
 namespace Masuit.MyBlogs.Core.Controllers
@@ -33,7 +32,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// 获取所有分类
         /// </summary>
         /// <returns></returns>
-        [ResponseCache(Duration = 600, VaryByHeader = HeaderNames.Cookie)]
+        [ResponseCache(Duration = 600)]
         public ActionResult GetCategories()
         {
             var list = CategoryService.LoadEntities<string, CategoryOutputDto>(c => c.Status == Status.Available, c => c.Name).Cacheable().ToList();
@@ -45,6 +44,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// </summary>
         /// <param name="id"></param>
         /// <returns></returns>
+        [ResponseCache(Duration = 600, VaryByQueryKeys = new[] { "id" })]
         public ActionResult Get(int id)
         {
             var model = CategoryService.GetById(id);

+ 1 - 0
src/Masuit.MyBlogs.Core/Controllers/CommentController.cs

@@ -29,6 +29,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         private IPostService PostService { get; }
         private IInternalMessageService MessageService { get; }
         private readonly IHostingEnvironment _hostingEnvironment;
+
         /// <summary>
         /// 评论管理
         /// </summary>

+ 2 - 3
src/Masuit.MyBlogs.Core/Controllers/ErrorController.cs

@@ -1,5 +1,4 @@
 using Microsoft.AspNetCore.Mvc;
-using Microsoft.Net.Http.Headers;
 
 namespace Masuit.MyBlogs.Core.Controllers
 {
@@ -13,7 +12,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// 404
         /// </summary>
         /// <returns></returns>
-        [Route("{*url}", Order = 99999), ResponseCache(Duration = 600, VaryByHeader = HeaderNames.Cookie)]
+        [Route("{*url}", Order = 99999), ResponseCache(Duration = 600)]
         public ActionResult Index()
         {
             Response.StatusCode = 404;
@@ -33,7 +32,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// 503
         /// </summary>
         /// <returns></returns>
-        [Route("ServiceUnavailable"), ResponseCache(Duration = 600, VaryByHeader = HeaderNames.Cookie)]
+        [Route("ServiceUnavailable"), ResponseCache(Duration = 600)]
         public ActionResult ServiceUnavailable()
         {
             Response.StatusCode = 503;

+ 5 - 3
src/Masuit.MyBlogs.Core/Controllers/HomeController.cs

@@ -8,6 +8,7 @@ using Masuit.MyBlogs.Core.Models.ViewModel;
 using Masuit.Tools;
 using Masuit.Tools.Core.Net;
 using Microsoft.AspNetCore.Mvc;
+using Microsoft.Net.Http.Headers;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -75,6 +76,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// </summary>
         /// <param name="orderBy"></param>
         /// <returns></returns>
+        [ResponseCache(Duration = 600, VaryByQueryKeys = new[] { "orderBy" }, VaryByHeader = HeaderNames.Cookie)]
         public ActionResult Index(OrderBy orderBy = OrderBy.ModifyDate)
         {
             ViewBag.Total = 0;
@@ -105,7 +107,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// <param name="size"></param>
         /// <param name="orderBy"></param>
         /// <returns></returns>
-        [Route("p/{page:int?}/{size:int?}/{orderBy:int?}")]
+        [Route("p/{page:int?}/{size:int?}/{orderBy:int?}"), ResponseCache(Duration = 600, VaryByQueryKeys = new[] { "page", "size", "orderBy" }, VaryByHeader = HeaderNames.Cookie)]
         public ActionResult Post(int page = 1, int size = 15, OrderBy orderBy = OrderBy.ModifyDate)
         {
             UserInfoOutputDto user = HttpContext.Session.GetByRedis<UserInfoOutputDto>(SessionKey.UserInfo) ?? new UserInfoOutputDto();
@@ -122,7 +124,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// <param name="size"></param>
         /// <param name="orderBy"></param>
         /// <returns></returns>
-        [Route("tag/{id}/{page:int?}/{size:int?}/{orderBy:int?}")]
+        [Route("tag/{id}/{page:int?}/{size:int?}/{orderBy:int?}"), ResponseCache(Duration = 600, VaryByQueryKeys = new[] { "id", "page", "size", "orderBy" }, VaryByHeader = HeaderNames.Cookie)]
         public ActionResult Tag(string id, int page = 1, int size = 15, OrderBy orderBy = OrderBy.ModifyDate)
         {
             IList<PostOutputDto> posts;
@@ -164,7 +166,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// <param name="size"></param>
         /// <param name="orderBy"></param>
         /// <returns></returns>
-        [Route("cat/{id:int}")]
+        [Route("cat/{id:int}"), ResponseCache(Duration = 600, VaryByQueryKeys = new[] { "id", "page", "size", "orderBy" }, VaryByHeader = HeaderNames.Cookie)]
         [Route("cat/{id:int}/{page:int?}/{size:int?}/{orderBy:int?}")]
         public async Task<ActionResult> Category(int id, int page = 1, int size = 15, OrderBy orderBy = OrderBy.ModifyDate)
         {

+ 2 - 1
src/Masuit.MyBlogs.Core/Controllers/LinksController.cs

@@ -7,6 +7,7 @@ using Masuit.MyBlogs.Core.Models.ViewModel;
 using Masuit.Tools;
 using Masuit.Tools.Core.Net;
 using Microsoft.AspNetCore.Mvc;
+using Microsoft.Net.Http.Headers;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -25,7 +26,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// 友情链接页
         /// </summary>
         /// <returns></returns>
-        [Route("links")]
+        [Route("links"), ResponseCache(Duration = 600, VaryByHeader = HeaderNames.Cookie)]
         public ActionResult Index()
         {
             UserInfoOutputDto user = HttpContext.Session.GetByRedis<UserInfoOutputDto>(SessionKey.UserInfo);

+ 4 - 3
src/Masuit.MyBlogs.Core/Controllers/MiscController.cs

@@ -9,6 +9,7 @@ using Masuit.Tools.Core.Net;
 using Masuit.Tools.Html;
 using Microsoft.AspNetCore.Hosting;
 using Microsoft.AspNetCore.Mvc;
+using Microsoft.Net.Http.Headers;
 using System;
 using System.IO;
 using System.Linq;
@@ -51,7 +52,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// </summary>
         /// <param name="id"></param>
         /// <returns></returns>
-        [Route("misc/{id:int}")]
+        [Route("misc/{id:int}"), ResponseCache(Duration = 600, VaryByQueryKeys = new[] { "id" }, VaryByHeader = HeaderNames.Cookie)]
         public ActionResult Index(int id)
         {
             Misc misc = MiscService.GetById(id);
@@ -103,7 +104,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// 关于
         /// </summary>
         /// <returns></returns>
-        [Route("about")]
+        [Route("about"), ResponseCache(Duration = 600, VaryByHeader = HeaderNames.Cookie)]
         public ActionResult About()
         {
             return View();
@@ -113,7 +114,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// 声明
         /// </summary>
         /// <returns></returns>
-        [Route("disclaimer")]
+        [Route("disclaimer"), ResponseCache(Duration = 600, VaryByHeader = HeaderNames.Cookie)]
         public ActionResult Disclaimer()
         {
             return View();

+ 1 - 1
src/Masuit.MyBlogs.Core/Controllers/MsgController.cs

@@ -54,7 +54,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// 留言板
         /// </summary>
         /// <returns></returns>
-        [ResponseCache(Duration = 600, VaryByQueryKeys = new[] { "cid" }, VaryByHeader = HeaderNames.Cookie), Route("msg")]
+        [ResponseCache(Duration = 600, VaryByHeader = HeaderNames.Cookie), Route("msg")]
         public ActionResult Index()
         {
             UserInfoOutputDto user = HttpContext.Session.GetByRedis<UserInfoOutputDto>(SessionKey.UserInfo) ?? new UserInfoOutputDto();

+ 3 - 3
src/Masuit.MyBlogs.Core/Controllers/PostController.cs

@@ -82,7 +82,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// <param name="id"></param>
         /// <param name="kw"></param>
         /// <returns></returns>
-        [Route("{id:int}/{kw}"), Route("{id:int}")]
+        [Route("{id:int}/{kw}"), Route("{id:int}"), ResponseCache(Duration = 600, VaryByQueryKeys = new[] { "id", "kw" }, VaryByHeader = HeaderNames.Cookie)]
         public ActionResult Details(int id, string kw)
         {
             Post post = PostService.GetById(id);
@@ -126,7 +126,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// <param name="page"></param>
         /// <param name="size"></param>
         /// <returns></returns>
-        [Route("{id:int}/history"), Route("{id:int}/history/{page:int}/{size:int}")]
+        [Route("{id:int}/history"), Route("{id:int}/history/{page:int}/{size:int}"), ResponseCache(Duration = 600, VaryByQueryKeys = new[] { "id", "page", "size" }, VaryByHeader = HeaderNames.Cookie)]
         public ActionResult History(int id, int page = 1, int size = 20)
         {
             var p = PostService.GetById(id).Mapper<PostOutputDto>();
@@ -426,7 +426,7 @@ namespace Masuit.MyBlogs.Core.Controllers
         /// </summary>
         /// <param name="email"></param>
         /// <returns></returns>
-        [HttpPost, ValidateAntiForgeryToken]
+        [HttpPost, ValidateAntiForgeryToken, ResponseCache(Duration = 600, VaryByQueryKeys = new[] { "email" })]
         public ActionResult GetViewToken(string email)
         {
             if (string.IsNullOrEmpty(email) && !email.MatchEmail())

+ 0 - 11
src/Masuit.MyBlogs.Core/Controllers/SearchController.cs

@@ -173,16 +173,5 @@ namespace Masuit.MyBlogs.Core.Controllers
             bool b = SearchDetailsService.DeleteByIdSaved(id);
             return ResultData(null, b, b ? "删除成功!" : "删除失败!");
         }
-
-        /// <summary>
-        /// 创建索引
-        /// </summary>
-        /// <returns></returns>
-        [HttpGet, Authority]
-        public IActionResult CreateIndex()
-        {
-            _searchEngine.CreateIndex(new List<string>() { nameof(Post) });
-            return ResultData(null, true, "索引库创建完成!");
-        }
     }
 }

+ 3 - 2
src/Masuit.MyBlogs.Core/Controllers/SubscribeController.cs

@@ -1,6 +1,7 @@
 using Common;
 using EFSecondLevelCache.Core;
 using Hangfire;
+using Masuit.LuceneEFCore.SearchEngine.Extensions;
 using Masuit.MyBlogs.Core.Configs;
 using Masuit.MyBlogs.Core.Extensions;
 using Masuit.MyBlogs.Core.Infrastructure.Services.Interface;
@@ -66,7 +67,7 @@ namespace Masuit.MyBlogs.Core.Controllers
                     Name = p.Author,
                     Email = p.Email
                 },
-                Body = p.Content,
+                Body = p.Content.RemoveHtmlTag(),
                 Categories = new List<string>()
                 {
                     p.Category.Name
@@ -80,7 +81,7 @@ namespace Masuit.MyBlogs.Core.Controllers
             {
                 Title = CommonHelper.SystemSettings["Title"],
                 Description = CommonHelper.SystemSettings["Description"],
-                Link = new Uri(scheme + "://" + host + "/rss"),
+                Link = new Uri(scheme + "://" + host),
                 Copyright = "(c) 2019"
             };
             feed.Items.AddRange(posts.ToArray());

+ 18 - 1
src/Masuit.MyBlogs.Core/Extensions/Hangfire/HangfireBackJob.cs

@@ -1,4 +1,6 @@
 using Common;
+using Masuit.LuceneEFCore.SearchEngine.Interfaces;
+using Masuit.MyBlogs.Core.Infrastructure.Application;
 using Masuit.MyBlogs.Core.Infrastructure.Services.Interface;
 using Masuit.MyBlogs.Core.Models.DTO;
 using Masuit.MyBlogs.Core.Models.Entity;
@@ -8,6 +10,7 @@ using Masuit.Tools.NoSQL;
 using Masuit.Tools.Systems;
 using Microsoft.AspNetCore.Hosting;
 using System;
+using System.Collections.Generic;
 using System.IO;
 using System.Linq;
 using System.Net.Http;
@@ -29,6 +32,7 @@ namespace Masuit.MyBlogs.Core.Extensions.Hangfire
         private readonly RedisHelper _redisHelper;
         private readonly IHttpClientFactory _httpClientFactory;
         private readonly IHostingEnvironment _hostingEnvironment;
+        private readonly ISearchEngine<DataContext> _searchEngine;
 
         /// <summary>
         /// hangfire后台任务
@@ -41,7 +45,8 @@ namespace Masuit.MyBlogs.Core.Extensions.Hangfire
         /// <param name="redisHelper"></param>
         /// <param name="httpClientFactory"></param>
         /// <param name="hostingEnvironment"></param>
-        public HangfireBackJob(IUserInfoService userInfoService, IPostService postService, ISystemSettingService settingService, ISearchDetailsService searchDetailsService, ILinksService linksService, RedisHelper redisHelper, IHttpClientFactory httpClientFactory, IHostingEnvironment hostingEnvironment)
+        /// <param name="searchEngine"></param>
+        public HangfireBackJob(IUserInfoService userInfoService, IPostService postService, ISystemSettingService settingService, ISearchDetailsService searchDetailsService, ILinksService linksService, RedisHelper redisHelper, IHttpClientFactory httpClientFactory, IHostingEnvironment hostingEnvironment, ISearchEngine<DataContext> searchEngine)
         {
             _userInfoService = userInfoService;
             _postService = postService;
@@ -51,6 +56,7 @@ namespace Masuit.MyBlogs.Core.Extensions.Hangfire
             _redisHelper = redisHelper;
             _httpClientFactory = httpClientFactory;
             _hostingEnvironment = hostingEnvironment;
+            _searchEngine = searchEngine;
         }
 
         /// <summary>
@@ -200,5 +206,16 @@ namespace Masuit.MyBlogs.Core.Extensions.Hangfire
             });
             _linksService.SaveChanges();
         }
+
+        /// <summary>
+        /// 重建Lucene索引库
+        /// </summary>
+        public void CreateLiceneIndex()
+        {
+            _searchEngine.CreateIndex(new List<string>()
+            {
+                nameof(DataContext.Post),nameof(DataContext.Issues),
+            });
+        }
     }
 }

+ 5 - 0
src/Masuit.MyBlogs.Core/Extensions/Hangfire/IHangfireBackJob.cs

@@ -38,5 +38,10 @@ namespace Masuit.MyBlogs.Core.Extensions.Hangfire
         /// 友链检查
         /// </summary>
         void CheckLinks();
+
+        /// <summary>
+        /// 重建Lucene索引库
+        /// </summary>
+        void CreateLiceneIndex();
     }
 }

+ 13 - 13
src/Masuit.MyBlogs.Core/Startup.cs

@@ -181,6 +181,7 @@ namespace Masuit.MyBlogs.Core
                 app.UseException();
             }
 
+            //db.Database.Migrate();
             #region 导词库
 
             Console.WriteLine("正在导入自定义词库...");
@@ -196,7 +197,18 @@ namespace Masuit.MyBlogs.Core
             Console.WriteLine($"导入自定义词库完成,耗时{time}s");
             #endregion
 
-            app.UseRewriter(new RewriteOptions().AddRedirectToNonWww());
+            string lucenePath = Path.Combine(env.ContentRootPath, luceneIndexerOptions.Path);
+            if (!Directory.Exists(lucenePath) || Directory.GetFiles(lucenePath).Length < 1)
+            {
+                Console.WriteLine(",索引库不存在,开始自动创建Lucene索引库...");
+                searchEngine.CreateIndex(new List<string>()
+                {
+                    nameof(DataContext.Post),nameof(DataContext.Issues)
+                });
+                Console.WriteLine("索引库创建完成!");
+            }
+
+            app.UseRewriter(new RewriteOptions().AddRedirectToNonWww());// URL重写
             app.UseStaticHttpContext(); //注入静态HttpContext对象
 
             app.UseSession(); //注入Session
@@ -212,20 +224,8 @@ namespace Masuit.MyBlogs.Core
             }).UseCookiePolicy();
 
             app.UseFirewall().UseRequestIntercept(); //启用网站防火墙
-            //db.Database.Migrate();
             CommonHelper.SystemSettings = db.SystemSetting.ToDictionary(s => s.Name, s => s.Value); //初始化系统设置参数
 
-            string lucenePath = Path.Combine(env.ContentRootPath, luceneIndexerOptions.Path);
-            if (!Directory.Exists(lucenePath) || Directory.GetFiles(lucenePath).Length < 1)
-            {
-                Console.WriteLine(",索引库不存在,开始自动创建Lucene索引库...");
-                searchEngine.CreateIndex(new List<string>()
-                {
-                    nameof(DataContext.Post),nameof(DataContext.Issues)
-                });
-                Console.WriteLine("索引库创建完成!");
-            }
-
             app.UseEFSecondLevelCache(); //启动EF二级缓存
             app.UseHangfireServer().UseHangfireDashboard("/taskcenter", new DashboardOptions()
             {

+ 6 - 7
src/Masuit.MyBlogs.Core/Views/Dashboard/Index.cshtml

@@ -15,7 +15,7 @@
     <meta http-equiv="Cache-control" content="no-cache">
     <meta http-equiv="Cache" content="no-cache">
     <title>博客管理后台</title>
-    <link href="https://cdn.bootcss.com/animate.css/3.7.0/animate.min.css" rel="stylesheet">
+    <link href="https://cdn.bootcss.com/animate.css/3.5.2/animate.min.css" rel="stylesheet">
     <link href="https://cdn.bootcss.com/material-design-iconic-font/2.2.0/css/material-design-iconic-font.min.css" rel="stylesheet">
     <link href="https://cdn.bootcss.com/angular-loading-bar/0.9.0/loading-bar.min.css" rel="stylesheet">
     <link href="https://cdn.bootcss.com/limonte-sweetalert2/6.6.9/sweetalert2.min.css" rel="stylesheet">
@@ -40,20 +40,19 @@
     <script src="https://img.highcharts.com.cn/highcharts/highcharts-more.js"></script>
     <script src="https://img.highcharts.com.cn/highcharts/modules/solid-gauge.js"></script>
     <script src="https://img.hcharts.cn/highcharts-plugins/highcharts-zh_CN.js"></script>
-    <script src="https://cdn.bootcss.com/angular.js/1.7.7/angular.min.js"></script>
-    <script src="https://cdn.bootcss.com/angular.js/1.7.7/angular-animate.min.js"></script>
-    <script src="https://cdn.bootcss.com/angular.js/1.7.7/angular-resource.min.js"></script>
+    <script src="https://cdn.bootcss.com/angular.js/1.6.9/angular.min.js"></script>
+    <script src="https://cdn.bootcss.com/angular.js/1.6.9/angular-animate.min.js"></script>
+    <script src="https://cdn.bootcss.com/angular.js/1.6.9/angular-resource.min.js"></script>
+    <script src="https://cdn.bootcss.com/angular.js/1.6.9/i18n/angular-locale_zh-cn.js"></script>
     <script src="https://cdn.bootcss.com/angular-ui-router/1.0.22/angular-ui-router.min.js"></script>
     <script src="https://cdn.bootcss.com/angular-loading-bar/0.9.0/loading-bar.min.js"></script>
     <script src="https://cdn.bootcss.com/oclazyload/1.1.0/ocLazyLoad.min.js"></script>
     <script src="https://cdn.bootcss.com/angular-ui-bootstrap/2.5.0/ui-bootstrap-tpls.min.js"></script>
-    <script src="https://cdn.bootcss.com/angular.js/1.7.7/i18n/angular-locale_zh-cn.js"></script>
     <script src="https://cdn.bootcss.com/notie/4.3.1/notie.min.js"></script>
     <script src="https://cdn.bootcss.com/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.concat.min.js"></script>
-    <script src="https://cdn.bootcss.com/limonte-sweetalert2/6.6.9/sweetalert2.min.js"></script>
+    <script src="https://cdn.bootcss.com/limonte-sweetalert2/6.6.10/sweetalert2.min.js"></script>
     <script src="https://cdn.bootcss.com/lodash.js/3.10.1/lodash.min.js"></script>
     <script src="https://cdn.bootcss.com/linq.js/2.2.0.2/linq.min.js"></script>
-    @*<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-signalr-hub/1.6.3/signalr-hub.min.js"></script>*@
     <script src="https://cdn.bootcss.com/angular-ui-tree/2.22.6/angular-ui-tree.min.js"></script>
     <script src="https://cdn.bootcss.com/ifvisible/1.0.6/ifvisible.min.js"></script>
     <script src="https://cdn.bootcss.com/jquery.form/4.2.2/jquery.form.min.js"></script>

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Post/Details.cshtml

@@ -169,7 +169,7 @@
                 <section class="wow padding-bot20 animated fadeIn">
                     <h3>版权声明:</h3>
                     <p class="text-danger size16">
-                        本文仅用于学习、研究和交流目的,欢迎非商业性质转载。本文链接:<a href="@(Context.Request.Host+Context.Request.Path)">@(HttpUtility.UrlDecode(Context.Request.Host + Context.Request.Path))</a>。
+                        本文仅用于学习、研究和交流目的,欢迎非商业性质转载。本文链接:<a href="@(Context.Request.Scheme + "://" +Context.Request.Host+Context.Request.Path)">@(HttpUtility.UrlDecode(Context.Request.Scheme + "://" + Context.Request.Host + Context.Request.Path))</a>。
                         @Html.Raw(CommonHelper.SystemSettings["Disclaimer"])
                     </p>
                 </section>

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Post/Details_Admin.cshtml

@@ -143,7 +143,7 @@
                 <section class="wow padding-bot20 animated fadeIn">
                     <h3>版权声明:</h3>
                     <p class="text-danger size16">
-                        本文仅用于学习、研究和交流目的,欢迎非商业性质转载。本文链接:<a href="@(Context.Request.Host+Context.Request.Path)">@(HttpUtility.UrlDecode(Context.Request.Host + Context.Request.Path))</a>。
+                        本文仅用于学习、研究和交流目的,欢迎非商业性质转载。本文链接:<a href="@(Context.Request.Scheme + "://" +Context.Request.Host+Context.Request.Path)">@(HttpUtility.UrlDecode(Context.Request.Scheme + "://" + Context.Request.Host + Context.Request.Path))</a>。
                         @Html.Raw(CommonHelper.SystemSettings["Disclaimer"])
                     </p>
                 </section>

Some files were not shown because too many files changed in this diff