From 1cdcd53d8a6ccc99263320bac4c2c127a2501b65 Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Wed, 12 Apr 2023 11:14:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/piniaIndex.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/store/piniaIndex.js b/src/store/piniaIndex.js index 6be6362..9b712dd 100644 --- a/src/store/piniaIndex.js +++ b/src/store/piniaIndex.js @@ -27,6 +27,7 @@ const instance = defineStore('user', { actions: { getPosition() { + if (this.position.latitude && this.position.longitude) return initAMap().then(() => { let AMap = Vue.prototype.$AMap let geolocation = new AMap.Geolocation({