From 6b1d38b368a379eed95e8f578b2aba32566841a7 Mon Sep 17 00:00:00 2001 From: lzxue <120635640@qq.com> Date: Wed, 25 Oct 2023 14:03:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=AB=98=E5=BE=B7=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E5=AF=86=E9=92=A5=E5=88=9D=E5=A7=8B=E5=8C=96=E6=97=B6=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/maps/src/amap2/map.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/maps/src/amap2/map.ts b/packages/maps/src/amap2/map.ts index bcabf423de..e68c800fff 100644 --- a/packages/maps/src/amap2/map.ts +++ b/packages/maps/src/amap2/map.ts @@ -24,11 +24,6 @@ const DEFAULTMAPCENTER = [108.92361, 34.54083]; // @ts-ignore window.forceWebGL = true; -// @ts-ignore -window._AMapSecurityConfig = { - securityJsCode: '2653011adeb04230b3a26cc9a780a800', -}; - const AMAP_API_KEY: string = 'f59bcf249433f8b05caaee19f349b3d7'; // 'ff533602d57df6f8ab3b0fea226ae52f'; const AMAP_VERSION: string = '2.0'; @@ -317,6 +312,11 @@ export default class AMapService extends AMapBaseService { mapConstructorOptions.zoom += 1; } if (token === AMAP_API_KEY) { + // @ts-ignore + window._AMapSecurityConfig = { + securityJsCode: '2653011adeb04230b3a26cc9a780a800', + }; + console.warn( `%c${this.configService.getSceneWarninfo('MapToken')}!`, 'color: #873bf4;font-weigh:900;font-size: 16px;',