fix: 修改地图开启逻辑
All checks were successful
deploy to server / build-and-deploy (push) Successful in 3m7s

- 当单击公司地址时,先在新标签页开启locate路由,再异步定向到合适的地图服务商页面
This commit is contained in:
2025-11-19 15:04:51 +08:00

View File

@ -25,7 +25,7 @@
<learn-more-card <learn-more-card
:title="$t('navigation.address')" :title="$t('navigation.address')"
:icon="ElIconMapLocation" :icon="ElIconMapLocation"
:to="$localePath('/locate?lng=120.123&lat=30.231&name=xxx')" @click="openMap"
/> />
</div> </div>
</div> </div>
@ -44,6 +44,10 @@
]; ];
const { data: companyProfile, pending, error } = await useCompanyProfile(); const { data: companyProfile, pending, error } = await useCompanyProfile();
const openMap = () => {
window.open(localePath('/locate'));
};
watch(error, (value) => { watch(error, (value) => {
if (value) { if (value) {
logger.error('数据获取失败: ', value); logger.error('数据获取失败: ', value);