Browse Source

外部资源由http转化为https

napier 3 years ago
parent
commit
5e09bfb4eb
2 changed files with 7 additions and 5 deletions
  1. 5 3
      src/components/map.vue
  2. 2 2
      static/js/axios-config.js

+ 5 - 3
src/components/map.vue

@@ -244,7 +244,7 @@ export default {
             class: 'basemap',
             title: 'tiandi',
             source: new XYZ({
-              url: 'http://t3.tianditu.com/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=a7baca459fe5be059d34849072e84fd0'
+              url: 'https://t3.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=a7baca459fe5be059d34849072e84fd0'
             }),
             visible: true
             // nameCN: '在线地图'
@@ -254,7 +254,7 @@ export default {
             class: 'basemap',
             title: 'tiandi',
             source: new XYZ({
-              url: 'http://t3.tianditu.com/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=a7baca459fe5be059d34849072e84fd0'
+              url: 'https://t3.tianditu.gov.cn/DataServer?T=cva_w&x={x}&y={y}&l={z}&tk=a7baca459fe5be059d34849072e84fd0'
             }),
             visible: true
             // nameCN: '天地图标注'
@@ -265,7 +265,9 @@ export default {
             title: 'cdut',
             source: new TileSource({
               // url: 'http://cn-cd-ali-1.natfrp.cloud:10265/geoserver/CDUT/wms',
-              url: 'http://113.125.147.162:8081/geoserver/CDUT/wms',
+              // url: 'http://113.125.147.162:8081/geoserver/CDUT/wms',
+              // url: 'http://139.155.247.43/geoserver/CDUT/wms',
+              url: 'https://geo.itopmap.com/geoserver/CDUT/wms',
               crossOrigin: 'anonymous',
               params: {
                 LAYERS: 'cdut_920',

+ 2 - 2
static/js/axios-config.js

@@ -11,7 +11,8 @@ export default {
     // Vue.prototype.$axios.defaults.baseURL = 'http://127.0.0.1:300'
     // Vue.prototype.$axios.defaults.baseURL = 'http://42.193.189.65:300'
     // test
-    Vue.prototype.$axios.defaults.baseURL = 'http://203.189.213.228:300'
+    // Vue.prototype.$axios.defaults.baseURL = 'http://139.155.20.56:300'
+    Vue.prototype.$axios.defaults.baseURL = 'https://server.itopmap.com'
 
     // 设置超时时间
     Vue.prototype.$axios.defaults.timeout = 10000
@@ -22,7 +23,6 @@ export default {
         method: method,
         headers: header || {
           'Accept': 'application/json'
-          // 'Content-Type':'multipart/form-data'
         },
         data: method === 'post' ? JSON.stringify(data) : {},
         params: method === 'get' ? data : {}