更新页面,对接接口

This commit is contained in:
2026-04-23 19:58:52 +08:00
parent 76819af5ad
commit 5766bfaff5
8 changed files with 216 additions and 244 deletions

View File

@ -9,20 +9,8 @@
<!-- 预警类型切换按钮 -->
<div class="type-tabs">
<button
class="type-tab"
:class="{ active: activeAlertType === 'road' }"
@click="activeAlertType = 'road'"
>
路况预警
</button>
<button
class="type-tab"
:class="{ active: activeAlertType === 'violation' }"
@click="activeAlertType = 'violation'"
>
违章预警
</button>
<button class="type-tab" :class="{ active: activeAlertType === 'road' }" @click="activeAlertType = 'road'">路况预警</button>
<button class="type-tab" :class="{ active: activeAlertType === 'violation' }" @click="activeAlertType = 'violation'" >违章预警</button>
</div>
<!-- 地图区域 -->
@ -31,12 +19,8 @@
<!-- 右下角浮动按钮 -->
<div class="float-buttons">
<div class="float-btn" @click="handleLocationClick">
<van-icon name="location" />
</div>
<div class="float-btn">
<van-icon name="layer" />
</div>
<div class="float-btn" @click="handleLocationClick"><van-icon name="location" /></div>
<div class="float-btn"><van-icon name="layer" /></div>
</div>
<!-- 标记详情卡片 -->
@ -99,7 +83,7 @@
</template>
<script setup>
import { ref, computed, onMounted, watch, nextTick } from "vue";
import { ref, onMounted, watch, nextTick } from "vue";
import { useRouter } from "vue-router";
import BottomTabs from "@/components/bottomTabs.vue";
import GdMap from "@/components/GdMap/index.vue";
@ -123,11 +107,6 @@ const alertTypeOptions = [
{ value: "emergency", label: "紧急任务" }
];
// 我的位置
const myLocation = ref({
top: "60%",
left: "40%"
});
// 标记点数据(从接口获取)
const markers = ref([]);
@ -226,11 +205,6 @@ function goBack() {
router.back();
}
// 标记点点击
function handleMarkerClick(marker) {
selectedMarker.value = marker;
}
// 定位点击
function handleLocationClick() {
console.log("定位到当前位置");