From 69fcda36dca00ebfbeb86d5a3cd31279db37ce79 Mon Sep 17 00:00:00 2001 From: xuhongjie <1943105267@qq.com> Date: Wed, 9 Apr 2025 16:26:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E4=BD=8D=E5=9B=BE=E7=89=87=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.js | 1 + src/views/components/map/marsMap.vue | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 1e59417..4cd1b92 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -21,6 +21,7 @@ const useUserStore = defineStore( const password = userInfo.password const code = userInfo.code const uuid = userInfo.uuid + return new Promise((resolve, reject) => { login(username, password, code, uuid).then(res => { setToken(res.token) diff --git a/src/views/components/map/marsMap.vue b/src/views/components/map/marsMap.vue index 7ba9ad2..fe1ceef 100644 --- a/src/views/components/map/marsMap.vue +++ b/src/views/components/map/marsMap.vue @@ -8,6 +8,10 @@ import PointJson from "./point.json"; import { onMounted, ref, reactive, watch, onUnmounted } from "vue"; import moment from "moment"; import useUavStore from "@/store/modules/uav"; +import markerTypePark from "@/assets/images/marker-park.png" +import markerTypeSchool from "@/assets/images/marker-school.png" +import markerTypeUav from "@/assets/images/marker-uav.png" + const uavStore = useUavStore(); const { proxy } = getCurrentInstance(); @@ -78,10 +82,7 @@ let animationFrameId; let gamepad = reactive({}); -// 使用 import.meta.glob 动态导入本地图片 -const imageModules = import.meta.glob("@/assets/images/*.png", { eager: true }); -// 获取图片路径 -const imageUrls = Object.values(imageModules).map((module) => module.default); + let map = null; let list = []; @@ -405,10 +406,10 @@ const lablePoint = (item, index) => { } ">${item.name} `,