懒得勤快 5 years ago
parent
commit
7768778d9b

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

@@ -18,6 +18,7 @@ using Microsoft.Net.Http.Headers;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations;
+using System.IO;
 using System.Linq;
 using System.Text.RegularExpressions;
 using System.Threading.Tasks;

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

@@ -17,6 +17,7 @@ using Microsoft.Net.Http.Headers;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations;
+using System.IO;
 using System.Linq;
 using System.Text.RegularExpressions;
 

+ 1 - 1
src/Masuit.MyBlogs.Core/Views/Search/Search.cshtml

@@ -50,7 +50,7 @@
                         <div class="hr-line-dashed"></div>
                         @if (Model.Results.Any())
                         {
-                            var rnd = new Random().Next(Model.Results.Count > 2 ? 2 : 0, Model.Results.Count);
+                            var rnd = new Random().Next(Model.Results.Count > 2 ? 2 : 1, Model.Results.Count);
                             for (var i = 0; i < Model.Results.Count; i++)
                             {
                                 if (rnd == i && ad != null)