懒得勤快 5 anni fa
parent
commit
c59663e701
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3 2
      src/Masuit.MyBlogs.Core/Controllers/ToolsController.cs

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

@@ -4,6 +4,7 @@ using Masuit.Tools.Core.Net;
 using Masuit.Tools.Models;
 using Microsoft.AspNetCore.Mvc;
 using Newtonsoft.Json;
+using System;
 using System.Net.Http;
 using System.Threading.Tasks;
 
@@ -39,11 +40,11 @@ namespace Masuit.MyBlogs.Core.Controllers
             }
             ViewBag.IP = ip;
             PhysicsAddress address = await ip.GetPhysicsAddressInfo();
-            if (address != null && address.Status != 0)
+            if (address != null && address.Status == 0)
             {
                 address.AddressResult.Pois.Add(new Pois()
                 {
-                    AddressDetail = ip.GetIPLocation()
+                    AddressDetail = ip.GetIPLocation() + "(本地数据库)"
                 });
             }
             if (Request.Method.ToLower().Equals("get"))