Bladeren bron

no message

kuaifan 5 jaren geleden
bovenliggende
commit
3686822146
3 gewijzigde bestanden met toevoegingen van 8482 en 2 verwijderingen
  1. 1 1
      app/Module/Base.php
  2. 8469 0
      app/Module/ip/all_cn.txt
  3. 12 1
      resources/assets/js/main/App.vue

+ 1 - 1
app/Module/Base.php

@@ -1636,7 +1636,7 @@ class Base
         }
         $cacheKey = "getIpInfo::" . md5($ip);
         $result = Cache::rememberForever($cacheKey, function() use ($ip) {
-            return Ihttp::ihttp_request("http://ip.taobao.com/service/getIpInfo.php?ip=" . $ip, [], [], 8);
+            return Ihttp::ihttp_request("http://ip.taobao.com/service/getIpInfo.php?accessKey=alibaba-inc&ip=" . $ip, [], [], 8);
         });
         if (Base::isError($result)) {
             return $result;

File diff suppressed because it is too large
+ 8469 - 0
app/Module/ip/all_cn.txt


+ 12 - 1
resources/assets/js/main/App.vue

@@ -163,13 +163,24 @@
                             $A.triggerUserInfoListener({});
                             //
                             let content = $A.jsonParse(msgDetail.content)
+                            let id = 'inip_' + Math.round(Math.random() * 10000);
+                            let ip = content.ip;
+                            let ip2 = ip.substring(0, ip.lastIndexOf('.')) + '.*';
                             this.$Modal.warning({
                                 title: this.$L("系统提示"),
-                                content: this.$L('您的帐号在其他地方(%)登录,您被迫退出,如果这不是您本人的操作,请注意帐号安全!', content.ip),
+                                content: this.$L('您的帐号在其他地方(%)登录,您被迫退出,如果这不是您本人的操作,请注意帐号安全!', '<span id="' + id + '">' + ip2 + '</span>'),
                                 onOk: () => {
                                     this.goForward({path: '/'}, true);
                                 }
                             });
+                            this.$nextTick(() => {
+                                $A.getIpInfo(ip, (res) => {
+                                    if (res.ret === 1) {
+                                        $A("span#" + id).text(res.data.textSmall);
+                                        $A("span#" + id).attr("title", ip2);
+                                    }
+                                });
+                            });
                             return;
                         } else if (msgDetail.messageType != 'send') {
                             return;