Преглед на файлове

线上地图代码配置,打包部署时请使用线上地图代码

lidongxue преди 6 месеца
родител
ревизия
f6483095a5
променени са 4 файла, в които са добавени 9 реда и са изтрити 5 реда
  1. 1 1
      src/components/map/map.vue
  2. 1 1
      src/components/map/signal_map.vue
  3. 3 1
      src/config/website.js
  4. 4 2
      src/map.js

+ 1 - 1
src/components/map/map.vue

@@ -172,7 +172,7 @@ export default {
       maps.then(() => {
         var draw;
         BM = window.BM;
-        BM.Config.HTTP_URL = 'http://127.0.0.1:9000';
+        BM.Config.HTTP_URL = website.mapserver;
         this.map = BM.map('map', website.mapkey, {
           //renderer: BM.canvas(),
           crs: BM.CRS.Baidu,

+ 1 - 1
src/components/map/signal_map.vue

@@ -69,7 +69,7 @@ export default {
       maps.then(() => {
         var draw;
         BM = window.BM;
-        BM.Config.HTTP_URL = 'http://127.0.0.1:9000';
+        BM.Config.HTTP_URL = website.mapserver;
         this.map = BM.map('map', website.mapkey, {
           //renderer: BM.canvas(),
           crs: BM.CRS.Baidu,

+ 3 - 1
src/config/website.js

@@ -48,6 +48,8 @@ export default {
   ssoUrl: 'http://localhost:8100/oauth/authorize?client_id=saber&response_type=code&redirect_uri=',
   // 单点登录回调地址(Saber服务的地址)
   redirectUri: 'http://localhost:1888',
-  mapkey:'bigemap.5gprxljw'
+  // mapkey:'bigemap.5gprxljw'
+  mapkey:'bigemap.bfm5huim',
+  mapserver:'https://135.48.15.221:3000', // 公安网
   // mapkey:'bigemap.b9i5xdic'
 }

+ 4 - 2
src/map.js

@@ -2,7 +2,8 @@
 // 换成本地的服务器js文件即可
 // console.log(window.location.origin)
 let script = [
-    'http://127.0.0.1:9000/bigemap.js/v2.1.0/bigemap.js',
+    // 'http://127.0.0.1:9000/bigemap.js/v2.1.0/bigemap.js',
+    'https://135.48.15.221:3000/bigemap.js/v2.1.0/bigemap.js',
     //如果有更多的JS要引用 ,也一起放到这个数组中
     //window.location.origin+'/bigemap-gl.js/v1.1.0/bigemap-gl.js',
     //window.location.origin+':3000/bigemap.js/v2.1.0/bigemap.js',
@@ -24,7 +25,8 @@ export default new Promise(resolve => {
     link.rel = "stylesheet";
     link.async = false;
     // 换成本地的服务器css文件即可
-    link.href = "http://127.0.0.1:9000/bigemap.js/v2.1.0/bigemap.css";
+    // link.href = "http://127.0.0.1:9000/bigemap.js/v2.1.0/bigemap.css";
+    link.href = "https://135.48.15.221:3000/bigemap.js/v2.1.0/bigemap.css"; // 公安网
     //link.href =window.location.origin+":3000/bigemap.js/v2.1.0/bigemap.css";
     //document.head.appendChild(link);
     //link.href = "http://localhost:9000/bigemap-gl.js/v1.1.0/Widgets/widgets.css";