{"id":13603136,"url":"https://github.com/asundust/wechat-work-push","last_synced_at":"2026-01-08T12:55:16.307Z","repository":{"id":48949650,"uuid":"337583331","full_name":"asundust/wechat-work-push","owner":"asundust","description":"利用企业微信应用消息向微信发送通知(无需公众号，不需要安装企业微信客户端，低成本推送消息解决方案)","archived":false,"fork":false,"pushed_at":"2024-08-19T00:32:52.000Z","size":87,"stargazers_count":77,"open_issues_count":0,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-19T01:40:52.006Z","etag":null,"topics":["laravel","laravel-admin","message","push","wechat","wechat-work","weixin"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/asundust/wechat-work-push","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asundust.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-02-10T01:19:19.000Z","updated_at":"2024-08-19T00:32:55.000Z","dependencies_parsed_at":"2024-01-16T22:21:50.351Z","dependency_job_id":"376f3cfb-c18f-41ca-b58e-a0c514ac6e4c","html_url":"https://github.com/asundust/wechat-work-push","commit_stats":{"total_commits":23,"total_committers":3,"mean_commits":7.666666666666667,"dds":"0.26086956521739135","last_synced_commit":"8df21dd4342007c282587015831a2e3c082fe96e"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asundust%2Fwechat-work-push","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asundust%2Fwechat-work-push/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asundust%2Fwechat-work-push/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asundust%2Fwechat-work-push/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asundust","download_url":"https://codeload.github.com/asundust/wechat-work-push/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223470476,"owners_count":17150555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","laravel-admin","message","push","wechat","wechat-work","weixin"],"created_at":"2024-08-01T18:01:52.770Z","updated_at":"2026-01-08T12:55:16.275Z","avatar_url":"https://github.com/asundust.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"Laravel-Admin 消息推送插件 by 企业微信应用消息\n======\n\u003e 无需公众号，不需要安装企业微信客户端，低成本推送消息解决方案\n\n\u003e 另有 [Dcat-Admin版](https://github.com/asundust/dcat-wechat-work-push)\n\n![StyleCI build status](https://github.styleci.io/repos/337583331/shield)\n\n\u003ca href=\"https://packagist.org/packages/asundust/wechat-work-push\"\u003e\u003cimg src=\"https://img.shields.io/packagist/dt/asundust/wechat-work-push\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/asundust/wechat-work-push\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/asundust/wechat-work-push\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n\n## 前言\n\n灵感启发Server酱，这边只是一个简单的实现。\n\n## 声明\n\n- **目前貌似不再支持在微信中接收新消息且调用接口需要IP白名单,只能在企业微信APP收消息的样子，限制很多，除非是老应用（很早时期申请的并已经设置好相关设置）否则本消息通道体验会变差。**\n\n## 客户端支持\n\n- Laravel版 [https://github.com/asundust/push-laravel](https://github.com/asundust/push-laravel)\n\n## 功能介绍\n\n目前版本支持灵活设置\n\n- 支持入参标题、内容、链接、链接标题\n- 一个【企业微信应用】的消息可推送【单个账号/全部人员】）\n- 【单个账号/全部人员】可设置独立的【企业微信应用】配置\n\n另外\n\n- 目前版本不支持内容文本markdown等格式，仅支持简单文本，后期开发\n- 目前版本无日志功能，后期开发\n\n## 截图\n\n- 能直接在通知里看到消息内容\n\n![通知效果](https://user-images.githubusercontent.com/6573979/107605606-a4adfb80-6c6e-11eb-9f71-66309bc41c1e.png)\n\n## 安装\n\n### 安装\n\n```\ncomposer require asundust/wechat-work-push\n```\n\n### 配置文件\n\n```\n'wechat-work-push' =\u003e [\n    'enable' =\u003e true,\n    // 'config_table' =\u003e 'wechat_work_push_configs', // 自定义配置表表名，可不填写，默认wechat_work_push_configs\n    // 'user_table' =\u003e 'wechat_work_push_users', // 自定义用户表表名，可不填写，默认wechat_work_push_users\n    // 'middleware' =\u003e 'web', // 自定义中间件组，可不填写，默认web\n],\n```\n\n### 迁移\n\n```\nphp artisan migrate\n```\n\n### 发布菜单\n\n```\nphp artisan admin:import wechat-work-push\n```\n\n会生成如下的菜单\n\n- 企业微信消息推送\n- └用户配置\n- └默认配置\n\n## 配置\n\n### 大致流程\n\n- 在企业微信注册一个企业（无需企业认证）\n- 创建一个内部应用\n- 配置相关配置\n- 开启微信插件\n- 在微信里收到消息\n\n### 申请流程\n\n- 申请企业微信[https://work.weixin.qq.com/](https://work.weixin.qq.com/)\n\n![申请企业微信](https://user-images.githubusercontent.com/6573979/107605784-230a9d80-6c6f-11eb-87b0-b5ca2119ca2f.png)\n\n- 注册成功后，点【管理企业】进入管理界面，选择【[应用管理](https://work.weixin.qq.com/wework_admin/frame#apps)】-【自建】-【创建应用】。\n\n![创建应用](https://user-images.githubusercontent.com/6573979/107605802-3453aa00-6c6f-11eb-94de-97b5044bd09d.png)\n\n- 应用名称自行想一个，图片Logo自行上传一个，可见范围选择公司名。\n\n![填写信息](https://user-images.githubusercontent.com/6573979/107605804-3584d700-6c6f-11eb-9238-ec9e16985334.png)\n\n- 创建好后复制【AgentId】和【Secret】出来到网站后台的【企业微信应用消息】-【默认配置】填写对应的那一栏上。\n\n- 进入【[我的企业](https://work.weixin.qq.com/wework_admin/frame#profile)】页面，拉到最下边，可以看到企业ID，复制并填到对应那一栏上，记得保存。\n\n![企业ID](https://user-images.githubusercontent.com/6573979/107605805-3584d700-6c6f-11eb-8a30-cabfc306ea33.png)\n\n- 如果是用户自定义企业记得是编辑用户填入对应的三栏里。\n\n- 在列表可以发送测试消息，如果企业微信接收到了消息就成功了。\n\n- 进入【我的企业】-【[微信插件](https://work.weixin.qq.com/wework_admin/frame#profile/wxPlugin)】，\n  拉到下边扫描二维码，关注以后即可收到推送的消息（可能需要先下载一次企业微信绑定一下微信），此时企业微信和微信应该能同时收到消息。\n\n![二维码](https://user-images.githubusercontent.com/6573979/107605807-361d6d80-6c6f-11eb-9f97-96da63a5741a.png)\n\n\u003e 设置企业微信不接收消息，微信接收消息。\n\u003e\n\u003e 【企业微信APP】-【左上角三横线】-【右下角齿轮设置】-【新消息通知】-【仅在企业微信中接收消息】-【应用消息】关闭\n\u003e\n\u003e 如果有多个企业身份，【企业微信APP】-【左上角三横线】-【右下角齿轮设置】-【新消息通知】-【其他企业消息提醒】-选择神申请的企业名字改成【仅接收特别提醒的消息】或者【不提醒】-然后切换回自己常用的企业消息。\n\u003e\n\u003e 然后去发送测试通知，应该没什么问题。\n\u003e\n\u003e 这边关于消息通知的设置教程有误，如有问题请联系我。\n\n\u003e 如果遇到问题的话可以到刚刚创建的应用里发个测试消息（选择【[应用管理](https://work.weixin.qq.com/wework_admin/frame#apps)】-【自建】-【应用名称】-【功能】-【发送消息】）。\n\n\u003e 另外如果出现接口请求正常，企业微信接受消息正常，个人微信无法收到消息的情况\n\u003e\n\u003e PC后台管理端：进入【我的企业】-【[微信插件](https://work.weixin.qq.com/wework_admin/frame#profile/wxPlugin)】，拉到最下方，勾选【允许成员在微信插件中接收和回复聊天消息 】\n\u003e\n\u003e 另外检查一下上述的【仅在企业微信中接收消息】相关设置\n\n## 使用\n\n- 默认路由支持`get`和`post`，记得在`VerifyCsrfToken`里的`except`添加`push/*`，以便支持`post`接口请求。\n\n- 接口地址为`http://{www.abc.com}/push/{推送密钥}`，标题为`title`不可空，内容为`content`可不传，链接为`url`可不传，链接标题为`url_title`可不传。 示例：`get`\n  地址为`http://{www.abc.com}/push/我是密钥?title=测试标题\u0026content=测试内容\u0026url=https://www.baidu.com\u0026url_title=我是百度的测试链接`\n\n- 传入不合法的`url`可能会导致发送请求超时，不知为何，建议自行测试。\n\n## 内部调用支持\n\n- 引用此Trait类`\\Asundust\\WechatWorkPush\\Http\\Traits\\WechatWorkPushSendMessageTrait`。\n- 使用默认配置发送`defaultSend()`，使用自定配置发送`send()`，具体入参看方法。\n\n## 未来\n- 将开发新包用于支持多个渠道的消息发送\n\n## 支持\n\n如果觉得这个项目帮你节约了时间，不妨支持一下呗！\n\n![alipay](https://user-images.githubusercontent.com/6573979/91679916-2c4df500-eb7c-11ea-98a7-ab740ddda77d.png)\n![wechat](https://user-images.githubusercontent.com/6573979/91679913-2b1cc800-eb7c-11ea-8915-eb0eced94aee.png)\n\n## License\n\n[The MIT License (MIT)](https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasundust%2Fwechat-work-push","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasundust%2Fwechat-work-push","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasundust%2Fwechat-work-push/lists"}