diff --git a/src/views/rain/inspection/components/mapShow.vue b/src/views/rain/inspection/components/mapShow.vue index b7be972..d2eb0cc 100644 --- a/src/views/rain/inspection/components/mapShow.vue +++ b/src/views/rain/inspection/components/mapShow.vue @@ -61,6 +61,7 @@ this.map.clearOverLays(); this.map.centerAndZoom(new T.LngLat(120.63212, 31.26249), this.zoom) var imageURL = "/MapServerApi/arcgis/rest/services/szhd/ysxzgg/MapServer"; + console.log(imageURL) //创建自定义图层对象 var lay = new T.TileLayer(imageURL, {minZoom: 1, maxZoom: 18}); //将图层增加到地图上 diff --git a/vue.config.js b/vue.config.js index a4e50d9..d76096a 100644 --- a/vue.config.js +++ b/vue.config.js @@ -53,12 +53,12 @@ module.exports = { ['^' + process.env.VUE_APP_BASE_API]: '' } }, - ['^/MapServerApi']: { + '^/MapServerApi': { //target: 'http://patrol.115.langye.net/', - target: "http://192.168.60.22:6080",//'http://192.168.60.100:9001/', + target: "http://192.168.60.22:6080/",//'http://192.168.60.100:9001/', changeOrigin: true, //配置跨域 pathRewrite: { - ['^/MapServerApi']: '' + ['^/MapServerApi']: 'http://192.168.60.22:6080/' } } }