fix(系统设置): 地图设置,天地图添加sk配置

This commit is contained in:
jianneng-fit2cloud
2026-01-08 13:14:03 +08:00
committed by jianneng-fit2cloud
parent 9f5038c301
commit 37f79b279b
2 changed files with 3 additions and 1 deletions

View File

@@ -54,6 +54,7 @@
<OnlineMapTdt
v-if="!mapLoading && mapLoaded && mapEditor.key && mapEditor.mapType === 'tianditu'"
:map-key="mapEditor.key"
:security-code="mapEditor.securityCode"
/>
<OnlineMapQQ
v-if="!mapLoading && mapLoaded && mapEditor.key && mapEditor.mapType === 'qq'"

View File

@@ -24,7 +24,8 @@ const loadMap = () => {
return
}
const mykey = props.mapKey
const url = `https://api.tianditu.gov.cn/api?v=4.0&tk=${mykey}`
const securityCode = props.securityCode ? '&sk=' + props.securityCode : ''
const url = `https://api.tianditu.gov.cn/api?v=4.0&tk=${mykey}${securityCode}`
loadScript(url)
.then(() => {