消息记录: 类型 location 打开高德地图

dev/chat
Lei OT 2 years ago
parent 3f6e5437ed
commit 0beca15c24

@ -375,9 +375,9 @@ export const whatsappMsgTypeMapped = {
type: 'location', type: 'location',
data: (msg) => ({ data: (msg) => ({
id: msg.wamid, id: msg.wamid,
title: msg.location.name || '位置信息', title: `位置信息 ${msg.location.name || ''} ↓打开高德地图`,
text: msg.location.address || '位置', text: msg.location.address, // 地址
src: msg.location.url || 'https://cdn.pixabay.com/photo/2016/03/22/04/23/map-1272165_1280.png', src: `https://uri.amap.com/marker?position=${msg.location.longitude},${msg.location.latitude}`,
data: { data: {
longitude: msg.location?.longitude, longitude: msg.location?.longitude,
latitude: msg.location?.latitude, latitude: msg.location?.latitude,

Loading…
Cancel
Save