1.9 KiB
1.9 KiB
pushplus
Post
http://www.pushplus.plus/send
{
"token": `xxxxxxxxxxxxxxxxxxxx`,
"title": `$title$`,
"content": `$body$\n$url$`,
"Content-Type": `application/json`
}
telegram
TG 反代国内机免翻墙
Post
https://api.telegram.org/botxxxxxxxxxx/
{
"method": "sendMessage",
"chat_id": xxxxxxxxxx,
"text": `$title$\n$body$\n$url$`
}
dingtalk
{
"msgtype": "markdown",
"markdown": {
"title": `$title$`,
"text": `$title$ \n> $body$\n$url$`
}
}
server 酱
Post
https://sc.ftqq.com/[SCKEY(登入后可见)].send
or
https://sctapi.ftqq.com/SENDKEY.send
{
"text": `$title$`,
"desp": `$body$可以随便加点自定义文字[链接]($url$)`
}
notify.js
if (typeof $title$ !== "undefined") {
botNotify($title$, $body$, $url$)
}
or
if (typeof $title$ !== "undefined") {
botNotify1($title$, $body$, $url$)
botNotify2($title$, $body$, $url$)
}
and
function botNotify(title, body, url) {
if (body=== "undefined"){body=""}
if (url==="undefined"){url=""}
let req = {
url: 'https://api.telegram.org/botxxxxxxxxxx/',
headers: {
'Content-Type': 'application/json; charset=UTF-8'
},
method: 'post',
data: {
"method": "sendMessage",
"chat_id": 'xxxxxxxxxx',
"text": `${title}\n${body}\n${url}`
}
}
$axios(req).then(res=>{
console.log('mynotify1 通知结果', res.data)
}).catch(e=>{
console.error('mynotify1 通知失败', e.message)
})
}
参考:https://github.com/elecV2/elecV2P/blob/master/script/JSFile/notify.js