2023-03-26 04:25:34 +08:00
|
|
|
<!--
|
2023-04-19 19:38:41 +08:00
|
|
|
【微信消息 - 定位】TODO @Dhb52 目前未启用
|
2023-03-26 04:25:34 +08:00
|
|
|
-->
|
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<el-link
|
|
|
|
type="primary"
|
|
|
|
target="_blank"
|
|
|
|
:href="
|
|
|
|
'https://map.qq.com/?type=marker&isopeninfowin=1&markertype=1&pointx=' +
|
|
|
|
locationY +
|
|
|
|
'&pointy=' +
|
|
|
|
locationX +
|
|
|
|
'&name=' +
|
|
|
|
label +
|
|
|
|
'&ref=yudao'
|
|
|
|
"
|
|
|
|
>
|
|
|
|
<el-col>
|
|
|
|
<el-row>
|
|
|
|
<img
|
|
|
|
:src="
|
|
|
|
'https://apis.map.qq.com/ws/staticmap/v2/?zoom=10&markers=color:blue|label:A|' +
|
|
|
|
locationX +
|
|
|
|
',' +
|
|
|
|
locationY +
|
|
|
|
'&key=' +
|
|
|
|
qqMapKey +
|
|
|
|
'&size=250*180'
|
|
|
|
"
|
|
|
|
/>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
2023-03-26 23:03:30 +08:00
|
|
|
<Icon icon="ep:location" />
|
|
|
|
{{ label }}
|
2023-03-26 04:25:34 +08:00
|
|
|
</el-row>
|
|
|
|
</el-col>
|
|
|
|
</el-link>
|
|
|
|
</div>
|
|
|
|
</template>
|
2023-04-12 14:05:21 +08:00
|
|
|
|
2023-06-21 19:35:11 +08:00
|
|
|
<script lang="ts" setup>
|
2023-06-21 19:14:34 +08:00
|
|
|
defineOptions({ name: 'WxLocation' })
|
|
|
|
|
2023-03-26 04:25:34 +08:00
|
|
|
const props = defineProps({
|
|
|
|
locationX: {
|
|
|
|
required: true,
|
|
|
|
type: Number
|
|
|
|
},
|
|
|
|
locationY: {
|
|
|
|
required: true,
|
|
|
|
type: Number
|
|
|
|
},
|
|
|
|
label: {
|
|
|
|
// 地名
|
|
|
|
required: true,
|
|
|
|
type: String
|
|
|
|
},
|
|
|
|
qqMapKey: {
|
|
|
|
// QQ 地图的密钥 https://lbs.qq.com/service/staticV2/staticGuide/staticDoc
|
|
|
|
required: false,
|
|
|
|
type: String,
|
|
|
|
default: 'TVDBZ-TDILD-4ON4B-PFDZA-RNLKH-VVF6E' // 需要自定义
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
defineExpose({
|
|
|
|
locationX: props.locationX,
|
|
|
|
locationY: props.locationY,
|
|
|
|
label: props.label,
|
|
|
|
qqMapKey: props.qqMapKey
|
|
|
|
})
|
|
|
|
</script>
|