mirror of
https://github.com/steedos/steedos-platform
synced 2024-11-22 17:06:42 +00:00
处理企业微信推送内容包含'/'会出现乱码的问题
This commit is contained in:
parent
7fa22687af
commit
d144f1be67
@ -167,6 +167,7 @@ router.get("/api/qiyeweixin/auth_login", async function (req, res, next) {
|
||||
// res.write('<h2>请联系管理员配置企业微信工作区ID和用户ID...</h2>');
|
||||
return res.end('');
|
||||
}
|
||||
// console.log("user: ",user);
|
||||
if (userId && authToken) {
|
||||
if (user.user != userId) {
|
||||
// console.log("userId: ",userId);
|
||||
|
@ -60,14 +60,16 @@ module.exports = {
|
||||
if (payload.related_to) {
|
||||
text = options.text;
|
||||
}
|
||||
|
||||
// 替换/为'/'
|
||||
let rg = new RegExp("/","g")
|
||||
|
||||
let msg = {
|
||||
"touser": qywx_userId,
|
||||
"msgtype": "textcard",
|
||||
"agentid": agentId,
|
||||
"textcard": {
|
||||
"title": title,
|
||||
"description": text,
|
||||
"title": title.replace(rg,'/'),
|
||||
"description": text.replace(rg,'/'),
|
||||
"url": url,
|
||||
"btntxt": "详情"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user