mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修复系统pushDeer通知
This commit is contained in:
parent
1413999ac3
commit
97d170c8b1
|
@ -119,15 +119,14 @@ export default class NotificationService {
|
||||||
|
|
||||||
private async pushDeer() {
|
private async pushDeer() {
|
||||||
const { pushDeerKey } = this.params;
|
const { pushDeerKey } = this.params;
|
||||||
// https://api2.pushdeer.com/message/push?pushkey=<key>&text=标题&desp=<markdown>&type=markdown
|
|
||||||
const url = `https://api2.pushdeer.com/message/push`;
|
const url = `https://api2.pushdeer.com/message/push`;
|
||||||
const res: any = await got
|
const res: any = await got
|
||||||
.post(url, {
|
.post(url, {
|
||||||
timeout: this.timeout,
|
timeout: this.timeout,
|
||||||
retry: 0,
|
retry: 0,
|
||||||
body: `pushkey=${pushDeerKey}&text=${
|
body: `pushkey=${pushDeerKey}&text=${encodeURIComponent(
|
||||||
this.title
|
this.title,
|
||||||
}&desp=${encodeURIComponent(this.content)}&type=markdown`,
|
)}&desp=${encodeURIComponent(this.content)}&type=markdown`,
|
||||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||||
})
|
})
|
||||||
.json();
|
.json();
|
||||||
|
|
|
@ -77,7 +77,7 @@ export default {
|
||||||
{ value: 'gotify', label: 'Gotify' },
|
{ value: 'gotify', label: 'Gotify' },
|
||||||
{ value: 'goCqHttpBot', label: 'GoCqHttpBot' },
|
{ value: 'goCqHttpBot', label: 'GoCqHttpBot' },
|
||||||
{ value: 'serverChan', label: 'Server酱' },
|
{ value: 'serverChan', label: 'Server酱' },
|
||||||
{ value: 'PushDeer', label: 'PushDeer' },
|
{ value: 'pushDeer', label: 'PushDeer' },
|
||||||
{ value: 'bark', label: 'Bark' },
|
{ value: 'bark', label: 'Bark' },
|
||||||
{ value: 'telegramBot', label: 'Telegram机器人' },
|
{ value: 'telegramBot', label: 'Telegram机器人' },
|
||||||
{ value: 'dingtalkBot', label: '钉钉机器人' },
|
{ value: 'dingtalkBot', label: '钉钉机器人' },
|
||||||
|
@ -114,7 +114,13 @@ export default {
|
||||||
serverChan: [
|
serverChan: [
|
||||||
{ label: 'serverChanKey', tip: 'Server酱SENDKEY', required: true },
|
{ label: 'serverChanKey', tip: 'Server酱SENDKEY', required: true },
|
||||||
],
|
],
|
||||||
PushDeer: [{ label: 'PushDeerKey', tip: 'PushDeer的Key', required: true }],
|
pushDeer: [
|
||||||
|
{
|
||||||
|
label: 'pushDeerKey',
|
||||||
|
tip: 'PushDeer的Key,https://github.com/easychen/pushdeer',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
bark: [
|
bark: [
|
||||||
{
|
{
|
||||||
label: 'barkPush',
|
label: 'barkPush',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user