公众号弹窗

This commit is contained in:
2025-11-19 11:26:22 +08:00
parent de32939f12
commit a95652b458
2 changed files with 306 additions and 33 deletions

View File

@@ -155,6 +155,7 @@ app.post('/wechat', async (req, res) => {
if (key === 'AI_INTELLIGENT') {
try {
const timestamp = Date.now();
// 方案一:简单文本回复(推荐,避免超时)
const reply = `
<xml>
@@ -162,7 +163,7 @@ app.post('/wechat', async (req, res) => {
<FromUserName><![CDATA[${toUser}]]></FromUserName>
<CreateTime>${Date.now()}</CreateTime>
<MsgType><![CDATA[text]]></MsgType>
<Content><![CDATA[欢迎使用AI智能体!正在为您准备服务...<a href="https://ai.satabot.com?userId=${fromUser}&from=weixin" target="_blank">立即进入AI智能体</a>]]></Content>
<Content><![CDATA[欢迎使用AI智能体!正在为您准备服务...<a href="https://ai.satabot.com?userId=${fromUser}&from=weixin&ts=${timestamp}" target="_blank">立即进入AI智能体</a>]]></Content>
</xml>
`;
res.send(reply);