|
|
|
@ -468,7 +468,9 @@ export const whatsappMsgTypeMapped = {
|
|
|
|
|
id: msg.wamid,
|
|
|
|
|
title: `位置信息 ${msg.location.name || ''} ↓打开高德地图`,
|
|
|
|
|
text: msg.location.address, // 地址
|
|
|
|
|
src: `https://uri.amap.com/marker?position=${msg.location.longitude},${msg.location.latitude}&callnative=1`,
|
|
|
|
|
// src: `https://uri.amap.com/marker?position=${msg.location.longitude},${msg.location.latitude}&callnative=1`,
|
|
|
|
|
src: 'https://cdn.pixabay.com/photo/2016/03/22/04/23/map-1272165_1280.png',
|
|
|
|
|
href: `https://uri.amap.com/marker?position=${msg.location.longitude},${msg.location.latitude}&callnative=1`,
|
|
|
|
|
data: {
|
|
|
|
|
longitude: msg.location?.longitude,
|
|
|
|
|
latitude: msg.location?.latitude,
|
|
|
|
@ -543,6 +545,11 @@ export const parseRenderMessageList = (messages) => {
|
|
|
|
|
if (typeof msg.msgtext_AsJOSN === 'string') {
|
|
|
|
|
// debug: json 缺少一部分
|
|
|
|
|
msgContentString = msg.msgtext_AsJOSN.charAt(msg.msgtext_AsJOSN.length - 1) !== '}' ? msg.msgtext_AsJOSN + '}}' : msg.msgtext_AsJOSN;
|
|
|
|
|
// if (msg.msgtext_AsJOSN.charAt(msg.msgtext_AsJOSN.length - 1) === '"') {
|
|
|
|
|
// msgContentString = msg.msgtext_AsJOSN + '}}';
|
|
|
|
|
// } else {
|
|
|
|
|
// msgContentString = msg.msgtext_AsJOSN + '"}';
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
const msgContent = typeof msg.msgtext_AsJOSN === 'string' ? JSON.parse(msgContentString) : msg.msgtext_AsJOSN;
|
|
|
|
|
msgContent.template = msg.msgtype === 'template' ? { ...msgContent.template, ...msg.template_AsJOSN } : {};
|
|
|
|
|