fix: 修复地图资源路径拼写错误的问题

(cherry picked from commit ec486fe930)
This commit is contained in:
chenjinsong
2023-02-03 11:08:35 +08:00
committed by 陈劲松
parent ab146b5b15
commit 8bf7b85c2e

View File

@@ -318,11 +318,12 @@ export async function getI18n () {
/* 获得原始的3611-2 json字符串数据 */ /* 获得原始的3611-2 json字符串数据 */
export async function getIso36112JsonData (suffix) { export async function getIso36112JsonData (suffix) {
const url = `${window.location.protocol}//${window.location.host}/geojson/${suffix}.json`
const request = new Promise(resolve => { const request = new Promise(resolve => {
axios({ axios({ url }).then(response => {
url: `${window.location.protocol}//${window.location.host}:${window.location.port}/geojson/${suffix}.json`
}).then(response => {
resolve(response.data || response || null) resolve(response.data || response || null)
}).catch(err => {
console.error(err)
}) })
}) })
return await request return await request