dever 3 lat temu
rodzic
commit
f9f21bd7ba
2 zmienionych plików z 37 dodań i 0 usunięć
  1. 28 0
      assets/layadmin/html/map.html
  2. 9 0
      src/Api.php

+ 28 - 0
assets/layadmin/html/map.html

@@ -0,0 +1,28 @@
+<!doctype html>
+<html>
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
+    <title>关键字检索</title>
+    <link rel="stylesheet" href="https://cache.amap.com/lbs/static/main1119.css"/>
+    <style type="text/css">
+        #panel {
+            position: absolute;
+            background-color: white;
+            max-height: 90%;
+            overflow-y: auto;
+            top: 10px;
+            right: 10px;
+            width: 280px;
+        }
+    </style>
+    <script id="map" type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.8&key={key}"></script>
+    <script type="text/javascript" src="https://cache.amap.com/lbs/static/addToolbar.js"></script>
+</head>
+<body>
+<div id="container"></div>
+<div id="panel"></div>
+<script type="text/javascript" src="../script/lib/map/gaode.js"></script>
+</body>
+</html>

+ 9 - 0
src/Api.php

@@ -378,6 +378,15 @@ class Api
                     $v['desc'] = $tbody;
                 }
 
+                if (!$v['desc']) {
+                    $v['desc'] = '无';
+                }
+
+                if (strstr($v['desc'], 'array:')) {
+                    $v['type'] = 'array';
+                    //$v['desc'] = str_replace('array:', '', $v['desc']);
+                }
+
                 $v['name'] = '<span class="edit" data-col="name" data-url="'.$url.'" data-id="'.$v['id'].'" data-type="'.$api.'" >' . $v['name'] . '</span>';
 
                 $v['type'] = '<span class="edit" data-col="type" data-url="'.$url.'" data-id="'.$v['id'].'" data-type="'.$api.'" >' . $v['type'] . '</span>';