🌱V2Pnotify.md
This commit is contained in:
parent
30697e0a6f
commit
9261033440
58
Conf/Vtop/notify/notify.md
Normal file
58
Conf/Vtop/notify/notify.md
Normal file
@ -0,0 +1,58 @@
|
||||
# pushplus
|
||||
{
|
||||
"token": `xxxxxxxxxxxxxxxxxxxx`,
|
||||
"title": `$title$`,
|
||||
"content": `$body$\n$url$`,
|
||||
"Content-Type": `application/json`
|
||||
}
|
||||
|
||||
# telegram
|
||||
Post
|
||||
https://api.telegram.org/botxxxxxxxxxx/
|
||||
{
|
||||
"method": "sendMessage",
|
||||
"chat_id": xxxxxxxxxx,
|
||||
"text": `$title$\n$body$\n$url$`
|
||||
}
|
||||
# COOKIESJD
|
||||
[
|
||||
{
|
||||
"userName": "",
|
||||
"cookie": "pt_key=;pt_pin=;"
|
||||
},
|
||||
{
|
||||
"userName": "",
|
||||
"cookie": "pt_key=;pt_pin=;"
|
||||
}
|
||||
]
|
||||
|
||||
# notify.js
|
||||
if (typeof $title$ !== "undefined") {
|
||||
botNotify($title$, $body$, $url$)
|
||||
}
|
||||
//if (typeof $title$ !== "undefined") {
|
||||
botNotify1($title$, $body$, $url$)
|
||||
botNotify2($title$, $body$, $url$)
|
||||
}
|
||||
|
||||
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)
|
||||
})
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user