mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-17 17:54:32 +08:00
修复自定义通知
This commit is contained in:
@@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react';
|
||||
import { Typography, Input, Form, Button, Select, message } from 'antd';
|
||||
import { request } from '@/utils/http';
|
||||
import config from '@/utils/config';
|
||||
import { parseBody, parseHeaders } from '@/utils';
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
@@ -28,7 +27,7 @@ const NotificationSetting = ({ data }: any) => {
|
||||
if (_data && _data.code === 200) {
|
||||
message.success(values.type ? '通知发送成功' : '通知关闭成功');
|
||||
} else {
|
||||
message.error(_data.data);
|
||||
message.error(_data.message);
|
||||
}
|
||||
})
|
||||
.catch((error: any) => {
|
||||
|
||||
+4
-4
@@ -238,9 +238,9 @@ export default {
|
||||
},
|
||||
{
|
||||
label: 'webhookUrl',
|
||||
tip: '请求链接以http或者https开头',
|
||||
tip: '请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置',
|
||||
required: true,
|
||||
placeholder: 'https://xxx.cn/api?query=xxx\n',
|
||||
placeholder: 'https://xxx.cn/api?content=$title\n',
|
||||
},
|
||||
{
|
||||
label: 'webhookHeaders',
|
||||
@@ -249,8 +249,8 @@ export default {
|
||||
},
|
||||
{
|
||||
label: 'webhookBody',
|
||||
tip: '请求体格式key1: value1,多个换行分割',
|
||||
placeholder: 'key1: value1\nkey2: value2',
|
||||
tip: '请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置',
|
||||
placeholder: 'key1: $title\nkey2: $content',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user