清理冗余注释
This commit is contained in:
parent
2a8b347ca0
commit
7f20d965c8
|
|
@ -24,7 +24,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, onUnmounted, watch } from 'vue'
|
import { ref, onMounted, onUnmounted } from 'vue'
|
||||||
import { getAMapScriptUrl, validateKeys } from '~/config/amap'
|
import { getAMapScriptUrl, validateKeys } from '~/config/amap'
|
||||||
|
|
||||||
// 组件属性
|
// 组件属性
|
||||||
|
|
@ -198,30 +198,6 @@ defineExpose({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// // 监听props变化,更新地图
|
|
||||||
// watch(() => props.center, (newCenter) => {
|
|
||||||
// if (map.value && newCenter) {
|
|
||||||
// console.log('地图中心点更新:', newCenter)
|
|
||||||
// map.value.setCenter(newCenter)
|
|
||||||
// }
|
|
||||||
// }, { deep: true })
|
|
||||||
//
|
|
||||||
// watch(() => props.zoom, (newZoom) => {
|
|
||||||
// if (map.value && newZoom) {
|
|
||||||
// console.log('地图缩放级别更新:', newZoom)
|
|
||||||
// map.value.setZoom(newZoom)
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
//
|
|
||||||
// watch(() => props.viewMode, (newViewMode) => {
|
|
||||||
// if (map.value && newViewMode) {
|
|
||||||
// console.log('地图视图模式更新:', newViewMode)
|
|
||||||
// // 高德地图的视图模式需要在初始化时设置,运行时无法直接切换
|
|
||||||
// // 如果需要切换视图模式,需要重新创建地图实例
|
|
||||||
// console.warn('视图模式需要在初始化时设置,当前版本不支持运行时切换')
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
|
|
||||||
// 生命周期
|
// 生命周期
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
initMap()
|
initMap()
|
||||||
|
|
|
||||||
|
|
@ -58,20 +58,16 @@ const contacts = [
|
||||||
<!-- variant="ghost"-->
|
<!-- variant="ghost"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<UButton
|
<UButton
|
||||||
|
|
||||||
color="neutral"
|
color="neutral"
|
||||||
icon="simple-icons-alibabadotcom"
|
icon="simple-icons-alibabadotcom"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
to="https://chuangtewulian.1688.com/page/index.html"
|
to="https://chuangtewulian.1688.com/page/index.html"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<UButton
|
<UButton
|
||||||
|
|
||||||
color="neutral"
|
color="neutral"
|
||||||
icon="i-simple-icons-tiktok"
|
icon="i-simple-icons-tiktok"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
to="https://www.douyin.com/user/MS4wLjABAAAAdPkGyADnJFLrZBwDM9U7faUJs-wmmyEU9L34SS0CKhs"
|
to="https://www.douyin.com/user/MS4wLjABAAAAdPkGyADnJFLrZBwDM9U7faUJs-wmmyEU9L34SS0CKhs"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</UFooter>
|
</UFooter>
|
||||||
|
|
|
||||||
|
|
@ -12,47 +12,6 @@ export const amapConfig = {
|
||||||
defaultCenter: [39.9042, 116.4074], // 北京坐标
|
defaultCenter: [39.9042, 116.4074], // 北京坐标
|
||||||
defaultZoom: 13,
|
defaultZoom: 13,
|
||||||
|
|
||||||
// 地图样式
|
|
||||||
styles: {
|
|
||||||
normal: 'amap://styles/normal',
|
|
||||||
dark: 'amap://styles/dark',
|
|
||||||
light: 'amap://styles/light',
|
|
||||||
fresh: 'amap://styles/fresh',
|
|
||||||
grey: 'amap://styles/grey',
|
|
||||||
graffiti: 'amap://styles/graffiti',
|
|
||||||
macaron: 'amap://styles/macaron',
|
|
||||||
blue: 'amap://styles/blue',
|
|
||||||
darkblue: 'amap://styles/darkblue',
|
|
||||||
wine: 'amap://styles/wine'
|
|
||||||
},
|
|
||||||
|
|
||||||
// 服务网点坐标(示例数据)
|
|
||||||
servicePoints: [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
name: '北京总部',
|
|
||||||
address: '北京市朝阳区xxx街道xxx号',
|
|
||||||
position: [116.4074, 39.9042],
|
|
||||||
phone: '010-12345678',
|
|
||||||
hours: '9:00-18:00'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
name: '上海分公司',
|
|
||||||
address: '上海市浦东新区xxx路xxx号',
|
|
||||||
position: [121.4737, 31.2304],
|
|
||||||
phone: '021-87654321',
|
|
||||||
hours: '9:00-18:00'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
name: '广州分公司',
|
|
||||||
address: '广州市天河区xxx大道xxx号',
|
|
||||||
position: [113.2644, 23.1291],
|
|
||||||
phone: '020-11223344',
|
|
||||||
hours: '9:00-18:00'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取地图API URL
|
// 获取地图API URL
|
||||||
|
|
@ -69,7 +28,6 @@ export const validateKeys = () => {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
hasKey,
|
hasKey,
|
||||||
|
|
||||||
isValid: hasKey
|
isValid: hasKey
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user