Browse Source

1、安全防护-域名访问涉及调整

zjz 3 weeks ago
parent
commit
ced8afeb9c
3 changed files with 34 additions and 8 deletions
  1. 4 4
      public/config.js
  2. 12 4
      public/envConfig/evn.pro.js
  3. 18 0
      vue.config.js

+ 4 - 4
public/config.js

@@ -33,28 +33,28 @@ export const appconfig = {
                 'groupname': '天地图在线矢量服务',
                 'type': 'webTiled',
                 'config': [
-                    { 'name': '矢量地图', 'url': 'http://{subDomain}.tianditu.com/DataServer?T=vec_c&x={col}&y={row}&l={level}&tk=' }
+                    { 'name': '矢量地图', 'url': 'http://{subDomain}.tianditu.gov.cn/DataServer?T=vec_c&x={col}&y={row}&l={level}&tk=' }
                 ]
             },
             'tian_online_raster': {
                 'groupname': '天地图在线影像服务',
                 'type': 'webTiled',
                 'config': [
-                    { 'name': '影像地图', 'url': 'http://{subDomain}.tianditu.com/DataServer?T=img_c&x={col}&y={row}&l={level}&tk=' }
+                    { 'name': '影像地图', 'url': 'http://{subDomain}.tianditu.gov.cn/DataServer?T=img_c&x={col}&y={row}&l={level}&tk=' }
                 ]
             },
             'tian_online_vector_label': {
                 'groupname': '天地图在线矢量标注服务',
                 'type': 'webTiled',
                 'config': [
-                    { 'name': '矢量标注图', 'url': 'http://{subDomain}.tianditu.com/DataServer?T=cva_c&x={col}&y={row}&l={level}&tk=' }
+                    { 'name': '矢量标注图', 'url': 'http://{subDomain}.tianditu.gov.cn/DataServer?T=cva_c&x={col}&y={row}&l={level}&tk=' }
                 ]
             },
             'tian_online_raster_label': {
                 'groupname': '天地图在线影像标注服务',
                 'type': 'webTiled',
                 'config': [
-                    { 'name': '影像标注图', 'url': 'http://{subDomain}.tianditu.com/DataServer?T=cia_c&x={col}&y={row}&l={level}&tk=' }
+                    { 'name': '影像标注图', 'url': 'http://{subDomain}.tianditu.gov.cn/DataServer?T=cia_c&x={col}&y={row}&l={level}&tk=' }
                 ]
             },
 

+ 12 - 4
public/envConfig/evn.pro.js

@@ -1,6 +1,14 @@
-/**生产地址配置 */
+// /**生产地址配置 */
+// export default {
+//     BASE_URL: 'http://125.64.42.165:1111',
+//     ESRI_COBFIG_URL: 'http://125.64.42.165:8038',
+//     MAP_SERVICE_URL: 'http://125.64.42.165:6080',
+// }
+
+
+/**生产地址配置 (域名版本) */
 export default {
-    BASE_URL: 'http://125.64.42.165:1111',
-    ESRI_COBFIG_URL: 'http://125.64.42.165:8038',
-    MAP_SERVICE_URL: 'http://125.64.42.165:6080',
+    BASE_URL: 'https://mabianwater.com.cn/javaapi',
+    ESRI_COBFIG_URL: 'https://mabianwater.com.cn',
+    MAP_SERVICE_URL: 'https://mabianwater.com.cn/arcgisapi',
 }

+ 18 - 0
vue.config.js

@@ -42,6 +42,24 @@ module.exports = {
         pathRewrite: {
           '^/backstage': ''
         }
+      },
+      '/javaapi': {
+        // target: 'http://192.168.2.231:1111', // 修改后台接口地址
+        // target: 'http://xrty.vipgz4.idcfengye.com',
+        target: 'http://125.64.42.165:1111',
+        changeOrigin: true,
+        pathRewrite: {
+          '^/javaapi': ''
+        }
+      },
+      '/arcgisapi': {
+        // target: 'http://192.168.2.231:1111', // 修改后台接口地址
+        // target: 'http://xrty.vipgz4.idcfengye.com',
+        target: 'http://125.64.42.165:6080',
+        changeOrigin: true,
+        pathRewrite: {
+          '^/arcgisapi': ''
+        }
       }
       // '/omsweb': { // 自定义 接口前缀
       //   target: 'http://58.17.241.6:1212', // 这里可以跟随项目实际部署服务器来