-
当前渠道:{{ currentChannelConfig?.label || channelMode }}
-
群发
+
+
+ {{ currentChannelConfig?.label || channelMode }}
+ 群发
diff --git a/web/src/components/ui/InstanceConfig.vue b/web/src/components/ui/InstanceConfig.vue
index d20589a..c510e8a 100644
--- a/web/src/components/ui/InstanceConfig.vue
+++ b/web/src/components/ui/InstanceConfig.vue
@@ -212,17 +212,21 @@ const formatInsConfigDisplay = (row: any) => {
if (!row.config) {
return ""
}
- if (["Email", "WeChatOFAccount"].includes(row.way_type)) {
- let config = JSON.parse(row.config)
- // 检查是否为动态接收者模式
- if (config.allowMultiRecip === true) {
- return "动态接收"
- }
- // 固定模式,显示接收者
- return config.to_account || ""
- } else {
- return ""
+ let config = JSON.parse(row.config)
+
+ // 检查是否为动态接收者模式
+ if (config.allowMultiRecip === true) {
+ return "动态接收"
}
+
+ // 固定模式,根据 constant.js 配置动态获取接收者字段
+ const channelConfig = CONSTANT.WAYS_DATA.find((item: any) => item.type === row.way_type)
+ if (channelConfig?.dynamicRecipient?.support) {
+ const recipientField = channelConfig.dynamicRecipient.field
+ return config[recipientField] || ""
+ }
+
+ return ""
}
// 查询实例列表数据
diff --git a/web/src/components/ui/drawer/DrawerContent.vue b/web/src/components/ui/drawer/DrawerContent.vue
index 4eaf19d..7f6ec29 100644
--- a/web/src/components/ui/drawer/DrawerContent.vue
+++ b/web/src/components/ui/drawer/DrawerContent.vue
@@ -20,8 +20,8 @@ const forwarded = useForwardPropsEmits(props, emits) as any
v-bind="forwarded"
:class="cn(
`group/drawer-content bg-background fixed z-50 flex h-auto flex-col`,
- `data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg`,
- `data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg`,
+ `data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[96vh] data-[vaul-drawer-direction=top]:rounded-b-lg`,
+ `data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[96vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg`,
`data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:sm:max-w-sm`,
`data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:sm:max-w-sm`,
props.class,
diff --git a/web/src/constant.js b/web/src/constant.js
index ca3265d..1c7b1ab 100644
--- a/web/src/constant.js
+++ b/web/src/constant.js
@@ -76,6 +76,24 @@ const CONSTANT = {
taskInsInputs: [
],
},
+ {
+ type: 'Feishu',
+ label: '飞书机器人',
+ inputs: [
+ { subLabel: 'access_token', value: '', col: 'access_token', desc: "飞书webhook中的access_token" },
+ { subLabel: '加签', value: '', col: 'secret', desc: "加签的签名" },
+ { subLabel: '渠道名', value: '', col: 'name', desc: "想要设置的渠道名字" },
+ ],
+ tips: {
+ text: "输入框说明", desc: "飞书支持加签和关键字过滤,如果是配置了关键字过滤,只需要消息里面包含了关键字,就会发送"
+ },
+ taskInsRadios: [
+ { subLabel: 'text', content: 'text' },
+ { subLabel: 'markdown', content: 'markdown' },
+ ],
+ taskInsInputs: [
+ ],
+ },
{
type: 'Custom',
label: '自定义推送',
@@ -135,26 +153,33 @@ const CONSTANT = {
],
},
// 暂时屏蔽阿里云短信入口
- // {
- // type: 'AliyunSMS',
- // label: '阿里云短信',
- // inputs: [
- // { subLabel: 'AccessKeyId', value: '', col: 'access_key_id', desc: "阿里云AccessKeyId" },
- // { subLabel: 'AccessKeySecret', value: '', col: 'access_key_secret', desc: "阿里云AccessKeySecret" },
- // { subLabel: '短信签名', value: '', col: 'sign_name', desc: "短信签名名称" },
- // { subLabel: '渠道名', value: '', col: 'name', desc: "想要设置的渠道名字" },
- // ],
- // tips: {
- // text: "阿里云短信说明", desc: "使用阿里云短信服务发送短信,需要在阿里云控制台申请短信签名和模板。
AccessKey请在阿里云控制台获取。"
- // },
- // taskInsRadios: [
- // { subLabel: 'text', content: 'text' },
- // ],
- // taskInsInputs: [
- // { value: '', col: 'phone_number', desc: "手机号码(接收短信的手机号)" },
- // { value: '', col: 'template_code', desc: "短信模板CODE(在阿里云短信控制台获取)" },
- // ],
- // },
+ {
+ type: 'AliyunSMS',
+ label: '阿里云短信',
+ // 动态接收者配置
+ dynamicRecipient: {
+ support: true, // 是否支持动态接收者
+ field: 'phone_number', // 接收者字段名
+ label: '手机号码', // 接收者字段标签
+ desc: '手机号码', // 接收者字段描述
+ },
+ inputs: [
+ { subLabel: 'AccessKeyId', value: '', col: 'access_key_id', desc: "阿里云AccessKeyId" },
+ { subLabel: 'AccessKeySecret', value: '', col: 'access_key_secret', desc: "阿里云AccessKeySecret" },
+ { subLabel: '短信签名', value: '', col: 'sign_name', desc: "短信签名名称" },
+ { subLabel: '渠道名', value: '', col: 'name', desc: "想要设置的渠道名字" },
+ ],
+ tips: {
+ text: "阿里云短信说明", desc: "使用阿里云短信服务发送短信,需要在阿里云控制台申请短信签名和模板。
AccessKey请在阿里云控制台获取。"
+ },
+ taskInsRadios: [
+ { subLabel: 'text', content: 'text' },
+ ],
+ taskInsInputs: [
+ { value: '', col: 'phone_number', desc: "手机号码(接收短信的手机号)", label: '手机号码' },
+ { value: '', col: 'template_code', desc: "短信模板CODE(在阿里云短信控制台获取)", label: '短信模板CODE' },
+ ],
+ },
],
API_VIEW_DATA: [
{ label: "curl", class: "language-shell line-numbers", code: "", func: ApiStrGenerate.getCurlString },