feat: 新增企业微信应用消息发送渠道
custom-deploy-your-server / build-deploy (push) Has been cancelled
deploy-demo-site / build-deploy (push) Has been cancelled
Deploy Docs to GitHub Pages / build (push) Has been cancelled
Deploy Docs to GitHub Pages / Deploy (push) Has been cancelled

- 添加 WeChatCorpAccount 消息类型常量
- 新增企业微信应用配置结构体和渠道验证逻辑
- 实现企业微信应用消息发送服务,支持 text、markdown 和 textcard 格式
- 添加前端配置界面,支持动态接收者设置
- 集成代理支持(HTTP/HTTPS/SOCKS5)
This commit is contained in:
2026-02-10 18:52:59 +08:00
parent 6ee6910ab7
commit 9538ab481b
11 changed files with 482 additions and 35 deletions
@@ -207,6 +207,9 @@ const getFinalData = () => {
if (config.type == 'Email' && input.col == 'port') {
authData[input.col] = parseInt(formData.value[input.col])
}
if (config.type == 'WeChatCorpAccount' && input.col == 'agent_id') {
authData[input.col] = parseInt(formData.value[input.col])
}
}
})
}
@@ -259,6 +262,7 @@ const getChannelIcon = (type: string) => {
'Email': Mail,
'Dtalk': MessageSquare,
'QyWeiXin': MessageCircle,
'WeChatCorpAccount': MessageCircle,
'Feishu': Send,
'Custom': Webhook,
'WeChatOFAccount': MessageCircleCode,
@@ -435,4 +439,4 @@ import { defineComponent } from 'vue'
export default defineComponent({
name: 'WaysForm'
})
</script>
</script>
+29 -1
View File
@@ -76,6 +76,34 @@ const CONSTANT = {
taskInsInputs: [
],
},
{
type: 'WeChatCorpAccount',
label: '企业微信应用',
dynamicRecipient: {
support: true,
field: 'to_account',
label: '接收者UserId',
desc: 'UserId',
},
inputs: [
{ subLabel: 'corp_id', value: '', col: 'corp_id', desc: "企业微信企业IDCorpID" },
{ subLabel: 'agent_id', value: '', col: 'agent_id', desc: "企业微信应用AgentId(数字)" },
{ subLabel: 'agent_secret', value: '', col: 'agent_secret', desc: "企业微信应用Secret" },
{ subLabel: 'proxy_url', value: '', col: 'proxy_url', desc: "可选:代理地址,支持 http://、https://、socks5://" },
{ subLabel: '渠道名', value: '', col: 'name', desc: "想要设置的渠道名字" },
],
tips: {
text: "企业微信应用说明",
desc: "通过企业微信应用消息接口发送消息,需要配置 CorpID / AgentId / Secret。可选 proxy_url 用于 http/https/socks5 代理。"
},
taskInsRadios: [
{ subLabel: 'text', content: 'text' },
{ subLabel: 'markdown', content: 'markdown' },
],
taskInsInputs: [
{ value: '', col: 'to_account', desc: '接收者UserId', label: '接收者UserId' },
],
},
{
type: 'Feishu',
label: '飞书机器人',
@@ -267,4 +295,4 @@ CONSTANT.WAYS_DATA.forEach(element => {
CONSTANT.WAYS_DATA_MAP[element.type] = element
});
export { CONSTANT }
export { CONSTANT }