修复自定义通知

This commit is contained in:
whyour
2022-09-20 19:13:11 +08:00
parent e08f0cd308
commit f23e7a9e49
3 changed files with 22 additions and 8 deletions
+1 -2
View File
@@ -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
View File
@@ -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',
},
],
},