1 Star 1 Fork 0

SyncGithub / wechat-menu

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

wechat-menu

可视化的微信菜单管理组件

DEMO

http://wechat-menu.largezhou.cn/wechat-menu

demo 站点的代码:largezhou/test-wechat-menu

更新

  • 菜单可直接选择图片或图文。(2021-3-20)
  • 菜单可选择跳转小程序。 (2019-6-13)
  • 自动回复消息,现已支持回复纯文本以及图文、图片、音频和视频永久素材消息。永久素材需要在公众号后台添加。 (2019-1-16)

安装

$ composer require largezhou/wechat-menu -vvv

配置

参考 src/config.php 文件

使用

首先的首先

在该扩展使用前,需要先进行配置 Manager::getInstance()->setConfig($anyConfigs)

然后把 public 下的静态资源,复制一份到你项目的,一般也为 public 文件夹下的 vendor/wechat-menu 目录下。

首先

你需要定义一个 get 路由,来返回公众号管理页面

使用 Content::renderWechatMenu() 获取页面内容,你可以嵌在你的其他页面模板中。

其次

在你的控制其中使用 Largezhou\WechatMenu\Controller 这个 trait ,该 trait 提供一个方法 resources。是处理页面中所有 ajax 请求的方法。该方法会通过请求数据中的 type 字段的值和请求方法来区分获取和保存不同的数据。

anyRequestMethod@anyMethodName 用来启动微信服务。使用 Manager::getInstance()->serve()->send() 来启动服务。具体参考 EasyWechat 文档

最后

该扩展使用一个 json 文件来保存设置数据,如果你需要用数据库来保存,可以重写 Data 中的部分方法来实现。

依赖

前端

  • Vue.js - Vue
  • Vue.Draggable - 拖拽排序
  • Vuelidate - 表单验证

后端

  • EasyWeChat - 可能是最好用的微信非官方 SDK

灵感 & 参考

FastAdmin 中的一个插件 微信管理

License

MIT

MIT License Copyright (c) 2019 头上有灰机 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Vue可视化的微信公众号菜单管理组件 展开 收起
JavaScript 等 4 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/sync-github/wechat-menu.git
git@gitee.com:sync-github/wechat-menu.git
sync-github
wechat-menu
wechat-menu
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891