/*! * 将回复消息封装成xml格式,其他类型,请按照业务需求重写该函数,或重新构造一个函数来进行业务支持 */ export const replyXML = (fromUsername: string, toUsername: string, content: string, type = 'text'): any => { const info: any = {}; info.msgType = type; info.createTime = new Date().getTime(); info.toUsername = toUsername; info.fromUsername = fromUsername; const body = '' + '' + '' + '' + info.createTime + '' + '' + `` + ''; return body; };