From 40537ea8b6e7e2dbefe6c31f0e8494ee7b504d3d Mon Sep 17 00:00:00 2001
From: agan <agan@yazhai.co>
Date: Mon, 11 Oct 2021 14:20:55 +0800
Subject: [PATCH] 添加ip提示

---
 b/content.html   |  9 ++++++++-
 b/download.html  |  2 +-
 b2/content.html  |  9 ++++++++-
 b2/download.html |  2 +-
 content.html     |  9 ++++++++-
 5 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/b/content.html b/b/content.html
index 3d3e470..038ac3c 100644
--- a/b/content.html
+++ b/b/content.html
@@ -19,13 +19,20 @@
 <div class="errorpPage-box">
     <h1>对不起!发生了一些意想不到的错误。</h1>
     <h2>Sorry, the site now can not be accessed. </h2>
+    <p id="userIp"></p>
     <p>请联系系统管理员进行处理,我们会尽快修复。您可以:</p>
     <div class="errorpPage-operate">
         <a href="javascript:window.location.reload()" class="operateBtn" title="刷新试试">刷新试试</a>
         <a href="http://www.baidu.com" class="operateBtn" title="返回首页">返回首页</a>
     </div>
 </div>
-
+<script>
+    var userIp = window.location.search.split('?ip=')[1]
+    if(userIp){
+        var dom = document.getElementById('userIp')
+        dom.innerHTML = "您当前的ip是" + userIp
+    }
+</script>
 
 </body>
 
diff --git a/b/download.html b/b/download.html
index 909f969..ca7224f 100644
--- a/b/download.html
+++ b/b/download.html
@@ -18,7 +18,7 @@
         province =  ['北京', '天津', '河北', '山西', '内蒙古', '辽宁', '吉林','深圳','广州','杭州','苏州', '黑龙江', '上海', '江苏', '浙江', '安徽', '福建', '江西', '山东 ', '河南', '湖北', '湖南', '广东', '广西', '海南 ', '重庆', '四川', '贵州', '云南', '西藏', '陕西', '甘肃', '青海', '宁夏', '新疆', 'CHINA']
         for(var i=0;i<province.length;i++){
             if(returnCitySN["cname"].indexOf(province[i])!=-1){
-                window.location.href='content.html'
+                window.location.href='content.html?ip=' + returnCitySN["cip"]
             }
         }
     </script>
diff --git a/b2/content.html b/b2/content.html
index 3d3e470..038ac3c 100644
--- a/b2/content.html
+++ b/b2/content.html
@@ -19,13 +19,20 @@
 <div class="errorpPage-box">
     <h1>对不起!发生了一些意想不到的错误。</h1>
     <h2>Sorry, the site now can not be accessed. </h2>
+    <p id="userIp"></p>
     <p>请联系系统管理员进行处理,我们会尽快修复。您可以:</p>
     <div class="errorpPage-operate">
         <a href="javascript:window.location.reload()" class="operateBtn" title="刷新试试">刷新试试</a>
         <a href="http://www.baidu.com" class="operateBtn" title="返回首页">返回首页</a>
     </div>
 </div>
-
+<script>
+    var userIp = window.location.search.split('?ip=')[1]
+    if(userIp){
+        var dom = document.getElementById('userIp')
+        dom.innerHTML = "您当前的ip是" + userIp
+    }
+</script>
 
 </body>
 
diff --git a/b2/download.html b/b2/download.html
index 11cc158..f324894 100644
--- a/b2/download.html
+++ b/b2/download.html
@@ -18,7 +18,7 @@
         province =  ['北京', '天津', '河北', '山西', '内蒙古', '辽宁', '吉林','深圳','广州','杭州','苏州', '黑龙江', '上海', '江苏', '浙江', '安徽', '福建', '江西', '山东 ', '河南', '湖北', '湖南', '广东', '广西', '海南 ', '重庆', '四川', '贵州', '云南', '西藏', '陕西', '甘肃', '青海', '宁夏', '新疆', 'CHINA']
         for(var i=0;i<province.length;i++){
             if(returnCitySN["cname"].indexOf(province[i])!=-1){
-                window.location.href='content.html'
+                window.location.href='content.html?ip=' + returnCitySN["cip"]
             }
         }
     </script>
diff --git a/content.html b/content.html
index 3d3e470..038ac3c 100644
--- a/content.html
+++ b/content.html
@@ -19,13 +19,20 @@
 <div class="errorpPage-box">
     <h1>对不起!发生了一些意想不到的错误。</h1>
     <h2>Sorry, the site now can not be accessed. </h2>
+    <p id="userIp"></p>
     <p>请联系系统管理员进行处理,我们会尽快修复。您可以:</p>
     <div class="errorpPage-operate">
         <a href="javascript:window.location.reload()" class="operateBtn" title="刷新试试">刷新试试</a>
         <a href="http://www.baidu.com" class="operateBtn" title="返回首页">返回首页</a>
     </div>
 </div>
-
+<script>
+    var userIp = window.location.search.split('?ip=')[1]
+    if(userIp){
+        var dom = document.getElementById('userIp')
+        dom.innerHTML = "您当前的ip是" + userIp
+    }
+</script>
 
 </body>
 
--
libgit2 0.25.0