From 838ab86d918a219b7ab569804e63107582068164 Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期三, 24 十二月 2025 15:39:29 +0800
Subject: [PATCH] feat: 修改支付页面

---
 src/components/page/leaderShow/leaderIndex.vue |   55 +++++++++++++++++++++++++++++++------------------------
 1 files changed, 31 insertions(+), 24 deletions(-)

diff --git a/src/components/page/leaderShow/leaderIndex.vue b/src/components/page/leaderShow/leaderIndex.vue
index 41bb6b5..a16f264 100644
--- a/src/components/page/leaderShow/leaderIndex.vue
+++ b/src/components/page/leaderShow/leaderIndex.vue
@@ -296,7 +296,8 @@
             BaiduMap.init()
                 .then((BMap) => {
                   console.log('鍦板浘鍒濆鍖�')
-                  this.inits()
+                //   this.inits()
+                    this.createMap(BMap)
                 })
             this.newTimes()
             this.userName = this.getStore('userinfo')
@@ -442,30 +443,36 @@
                    this.$refs.zhipaiForm.initData()
                })
             },
-            createMap(){  // // 鏂规硶 - 鍒涘缓鍦板浘
+            createMap(BMap){  // // 鏂规硶 - 鍒涘缓鍦板浘
                 // 鍦ㄧ櫨搴﹀湴鍥惧鍣ㄤ腑鍒涘缓鍦板浘瀹炰緥
-                let map = new BMap.Map("container");
-                // 灏唌ap鍙橀噺瀛樺偍鍦ㄥ叏灞�
-                this.map = map;
-                // let goodsData = require('../../../assets/custom_map_config.json')
-                // 璁惧畾鍦板浘鐨勪腑蹇冪偣鍜屽潗鏍�
-                let point = new BMap.Point(this.centerLng, this.centerLat);
-                // let marker = new BMap.Marker(point) // 鍒涘缓鏍囨敞
-                // 璁剧疆涓績鐐瑰潗鏍囧拰鍦板浘绾у埆
-                this.map.centerAndZoom(point, 1);
-                // 娣诲姞鑷畾涔夎鐩栫墿
-                // this.map.addOverlay(marker) // 灏嗘爣娉ㄦ坊鍔犲埌鍦板浘涓�
-                // 鍏佽婊氳疆缂╂斁
-                this.map.enableScrollWheelZoom(point, 15);
-                // 璁剧疆鍦板浘榛樿缂╂斁姣斾緥
-                this.map.setZoom(15);
-                this.map.setMapStyle({
-                       style:'midnight'
-                            // styleJson:goodsData
-                 });
-                this.addHeatMap(this.map)
-                this.addMarker(this.map,point)
-
+                let map = new BMap.Map('container');
+                this.$nextTick(() => {
+                    // 灏唌ap鍙橀噺瀛樺偍鍦ㄥ叏灞�
+                    this.map = map;
+                    //  let goodsData = require('../../../assets/custom_map_config.json')
+                    // 璁惧畾鍦板浘鐨勪腑蹇冪偣鍜屽潗鏍�
+                    let point = new BMap.Point(this.centerLng, this.centerLat);
+                    let marker = new BMap.Marker(point) // 鍒涘缓鏍囨敞
+                    // 璁剧疆涓績鐐瑰潗鏍囧拰鍦板浘绾у埆
+                    this.map.centerAndZoom(point, 1);
+                    // 娣诲姞鑷畾涔夎鐩栫墿
+                    this.map.addOverlay(marker) // 灏嗘爣娉ㄦ坊鍔犲埌鍦板浘涓�
+                    // 鍏佽婊氳疆缂╂斁
+                    this.map.enableScrollWheelZoom(point, 15);
+                    // 璁剧疆鍦板浘榛樿缂╂斁姣斾緥
+                    this.map.setZoom(15);
+                    this.map.setMapStyle({
+                        // style:'midnight',
+                        styleJson:goodsData
+                    });
+                    
+                    this.map.addEventListener("tilesloaded", () => {
+                        this.addHeatMap(this.map); // 纭繚鍦� tilesloaded 浜嬩欢鍚庤皟鐢�
+                    });
+    
+                    // this.addHeatMap(this.map)
+                    this.addMarker(this.map,point)
+                })
             },
             addHeatMap(map) {  //鐑姏鍥�
                 this.$byutil.postData(this,this.pageConfig.getLogoUrl,null,res => {

--
Gitblit v1.9.1