fix: 修复飞书通知模块API路径和卡片格式
- 修改API路径为 /open-apis/im/v1/messages (message/v4已废弃) - 添加卡片config配置 - 修复content格式(直接传卡片对象,不需要包裹) - 添加测试接口 /api/v1/test/notification 测试结果: 成功发送通知到李佳博(feishu_user_id: 481g947d) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 飞书通知配置
|
||||
*/
|
||||
|
||||
return [
|
||||
// 卡片模板配置
|
||||
'templates' => [
|
||||
// 审批通知模板
|
||||
'approval' => [
|
||||
'title_prefix' => '📋',
|
||||
'template' => 'blue',
|
||||
'show_fields' => true,
|
||||
],
|
||||
|
||||
// 系统通知模板
|
||||
'system' => [
|
||||
'title_prefix' => '🔔',
|
||||
'template' => 'gray',
|
||||
],
|
||||
|
||||
// 提醒通知模板
|
||||
'reminder' => [
|
||||
'levels' => [
|
||||
'info' => [
|
||||
'icon' => '💡',
|
||||
'template' => 'blue',
|
||||
],
|
||||
'warning' => [
|
||||
'icon' => '⚠️',
|
||||
'template' => 'orange',
|
||||
],
|
||||
'urgent' => [
|
||||
'icon' => '🚨',
|
||||
'template' => 'red',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
// 消息发送配置
|
||||
'send' => [
|
||||
// 重试次数
|
||||
'retry_times' => 3,
|
||||
|
||||
// 重试间隔(秒)
|
||||
'retry_interval' => 1,
|
||||
|
||||
// 超时时间(秒)
|
||||
'timeout' => 10,
|
||||
],
|
||||
|
||||
// 日志配置
|
||||
'logging' => [
|
||||
// 是否记录日志
|
||||
'enabled' => true,
|
||||
|
||||
// 日志级别
|
||||
'level' => 'info',
|
||||
],
|
||||
];
|
||||
Reference in New Issue
Block a user