wupengfei 1 year ago
parent
commit
88e906b8ab
2 changed files with 15 additions and 18 deletions
  1. 1 1
      .idea/workspace.xml
  2. 14 17
      application/operate/view/recruit/form2.html

+ 1 - 1
.idea/workspace.xml

@@ -397,7 +397,7 @@
       <workItem from="1691801870842" duration="22026000" />
       <workItem from="1691974595544" duration="15534000" />
       <workItem from="1692060688799" duration="12436000" />
-      <workItem from="1692146877063" duration="5080000" />
+      <workItem from="1692146877063" duration="5699000" />
     </task>
     <servers />
   </component>

+ 14 - 17
application/operate/view/recruit/form2.html

@@ -1,7 +1,5 @@
 {extend name='admin@main'}
-
 {block name="content"}
-
 {include file='mall@store_goods/form_style'}
 <header>
     <meta charset="utf-8">
@@ -61,9 +59,7 @@
 
     </style>
 </header>
-
 <form onsubmit="return false;" id="GoodsForm" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">
-
     <div class="layui-card-body think-box-shadow padding-left-40">
         <div class="layui-tab">
             <ul class="layui-tab-title">
@@ -276,19 +272,20 @@
         }
 
 
-        //输入提示
-        var autoOptions = {
-            input: "tipinput"
-        };
-        var auto = new AMap.Autocomplete(autoOptions);
-        var placeSearch = new AMap.PlaceSearch({
-            map: map
-        });  //构造地点查询类
-        AMap.event.addListener(auto, "select", select);//注册监听,当选中某条记录时会触发
-        function select(e) {
-            placeSearch.setCity(e.poi.adcode);
-            placeSearch.search(e.poi.name);  //关键字查询查询
-        }
+        AMap.service(["AMap.PlaceSearch"], function() {
+            //构造地点查询类
+            var placeSearch = new AMap.PlaceSearch({
+                pageSize: 5, // 单页显示结果条数
+                pageIndex: 1, // 页码
+                city: "010", // 兴趣点城市
+                citylimit: true,  //是否强制限制在设置的城市内搜索
+                map: map, // 展现结果的地图实例
+                panel: "panel", // 结果列表将在此容器中进行展示。
+                autoFitView: true // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围
+            });
+            //关键字查询
+            placeSearch.search('北京');
+        });
 
 
     }