From f1637f3f8b6d6e7ff508b41b32e854178c3d6c7d Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sun, 09 May 2021 15:45:00 +0800
Subject: [PATCH] 小程序地图

---
 public/xcxh5map/popup/user.html |    7 ++-----
 public/xcxh5map/js/def.js       |    3 ++-
 public/xcxh5map/js/createMap.js |   10 +++++++---
 public/xcxh5map/xcxmap.html     |    0 
 4 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/public/xcxh5map/js/createMap.js b/public/xcxh5map/js/createMap.js
index f3d4d17..684cf27 100644
--- a/public/xcxh5map/js/createMap.js
+++ b/public/xcxh5map/js/createMap.js
@@ -63,28 +63,32 @@
 			//   extend: 'myskin/FlareClusterLayer.css'
 			// });
 			// layuiLayer.close(layuiLayer.index);
-
+			if (nowIndex != null) {
+				layuiLayer.close(nowIndex);
+			}
 			layuiLayer.open({
 				title: '',
+				anim: 2,
 				type: 2,
 				shadeClose: true,
 				shade: false,
 				skin: 'demo-class',
 				id: 'onelyTwo',
 				maxmin: false, //开启最大化最小化按钮
-				area: ['250px', '250px'],
+				area: ['100px', '100px'],
 				// area: 'auto',
 				//   offset: winSize,
 				offset: 'b',
 				skin: 'flare',
 				isOutAnim: false,
-				closeBtn: 2, //关闭按钮,可通过配置1和2来展示,0关闭
+				closeBtn: 1, //关闭按钮,可通过配置1和2来展示,0关闭
 				content: ['./popup/user.html'],
 				resize: false,
 				scrollbar: false,
 				// tipsMore: true, //允许多个tipe
 				// content: num,
 				success: function (layero, index) { //成功后添加全局点击关闭
+					nowIndex = index;
 					console.log(data, 53413541)
 					$("#layui-layer-iframe" + index).contents().find("#user").val(data);
 					// layuiLayer.close(index)
diff --git a/public/xcxh5map/js/def.js b/public/xcxh5map/js/def.js
index d7ff282..a920db4 100644
--- a/public/xcxh5map/js/def.js
+++ b/public/xcxh5map/js/def.js
@@ -1,4 +1,5 @@
 var map = null,
     getdata = null,
     marker = null,
-    layuiLayer = null;
\ No newline at end of file
+    layuiLayer = null,
+    nowIndex = null;
\ No newline at end of file
diff --git a/public/xcxh5map/popup/user.html b/public/xcxh5map/popup/user.html
index 0136125..5e131bc 100644
--- a/public/xcxh5map/popup/user.html
+++ b/public/xcxh5map/popup/user.html
@@ -12,7 +12,8 @@
     <div id="popup">
         <!-- 从layui传值给iframe 的占位input -->
         <input type="text" id="user" ref="user" style="display:none">
-        46476978---{{ourData}}
+        46476978--
+        -{{ourData.title}}
     </div>
     <script>
         var me = new Vue({
@@ -26,10 +27,6 @@
                     clearTimeout(this.oldtime);
                     this.ourData = JSON.parse(this.$refs.user.value);//json对象转js对象
                     console.log(this.ourData,2)
-
-                    // this.getUser(this.ourData.id);
-                    // console.log(this.ourData);
-                    // this.getdatas(this.ourData);
                 }, 100);
             }
         })
diff --git a/public/xcxh5map/map.html b/public/xcxh5map/xcxmap.html
similarity index 100%
rename from public/xcxh5map/map.html
rename to public/xcxh5map/xcxmap.html

--
Gitblit v1.9.3