懒得勤快 5 年之前
父节点
当前提交
c59663e701
共有 1 个文件被更改,包括 3 次插入2 次删除
  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"))