Commit 2f2f4a7e authored by 郭铭瑶's avatar 郭铭瑶 🤘

地图替换域名为ip

parent 6e9bc41f
......@@ -70,6 +70,19 @@ export default async function useInitMap(el: HTMLElement, camera: any) {
esriConfig.request.useIdentity = false
esriConfig.request.interceptors.push({
urls: 'https://changsanjiao.shsmi.com/',
/*
* 在请求发出去之前,把请求中的机器名改成ip
* */
before: function (params: any) {
params.url = params.url.replace(
'https://changsanjiao.shsmi.com',
'http://10.108.3.48',
)
},
})
esriConfig.request.interceptors.push({
urls: 'https://changsanjiao.shsmi.com/',
......
......@@ -29,5 +29,8 @@ export default defineConfig({
},
},
},
base: '/statics/huamu_party_building_3d/',
base:
process.env.NODE_ENV === 'production'
? '/statics/huamu_party_building_3d/'
: './',
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment