# bee **Repository Path**: woniudiancang/bee ## Basic Information - **Project Name**: bee - **Description**: 微信小程序-餐饮点餐外卖-开箱即用 - **Primary Language**: JavaScript - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 3501 - **Forks**: 1155 - **Created**: 2020-07-27 - **Last Updated**: 2026-09-23 ## Categories & Tags **Categories**: weixin-lapp **Tags**: None ## README
# 🍜 餐饮点餐小程序 **微信小程序 · 餐饮行业完整解决方案** 针对餐饮行业深度定制,覆盖在线点餐、外卖配送、叫号排队、扫码点餐、在线支付等全流程场景, 让餐饮经营更高效、更智能、更便捷。 --- [![License](https://img.shields.io/github/license/woniudiancang/bee?style=flat-square)](LICENSE) [![Stars](https://img.shields.io/github/stars/woniudiancang/bee?style=flat-square)](https://github.com/woniudiancang/bee/stargazers) [![Forks](https://img.shields.io/github/forks/woniudiancang/bee?style=flat-square)](https://github.com/woniudiancang/bee/network/members) [![Issues](https://img.shields.io/github/issues/woniudiancang/bee?style=flat-square)](https://github.com/woniudiancang/bee/issues)
--- ## ✨ 核心功能 | 功能模块 | 说明 | |:---:|:---| | 🛒 在线点餐 | 用户浏览菜单、加入购物车、实时下单 | | 🛵 外卖配送 | 支持外卖下单,集成达达等第三方配送平台 | | 📲 扫码点餐 | 扫桌号二维码直接进入对应餐桌点餐流程 | | 🔔 叫号排队 | 线上取号、等位提醒,告别纸质排队 | | 💳 在线支付 | 微信支付一体化,流畅结账体验 | | 🖨️ 自动出票 | 打印机配置后自动推送小票、杯贴等 | | 📦 订单管理 | 完整的订单生命周期管理与核销流程 | | 🌐 多语言支持 | 内置国际化框架,支持中英文快速切换 | --- ## 📱 扫码体验 ### 自提 / 外卖
### 扫码点餐 · 桌号演示 | 座号 A1 | 座号 A2 | 座号 A3 | 座号 A4 | 座号 A5 | |:---:|:---:|:---:|:---:|:---:| | | | | | | | 座号 A6 | 座号 A7 | 座号 A8 | 座号 A9 | 座号 A10 | |:---:|:---:|:---:|:---:|:---:| | | | | | | --- ## 🚀 快速开始 ### 第一步 · 注册小程序账号 前往 [微信公众平台](https://mp.weixin.qq.com/) 注册小程序账号。 > ⚠️ 商城类小程序**不支持个人主体**上线,请选择「企业」或「个体工商户」注册, > 获取专属的 `AppID` 和 `AppSecret`,保存备用。 - 📖 [如何查看小程序的 AppID 和 AppSecret](https://jingyan.baidu.com/article/642c9d340305e3644a46f795.html) - 📖 [设置合法服务器域名](https://www.yuque.com/apifm/doc/tvpou9) --- ### 第二步 · 注册后台账号 前往 [api工厂后台](https://admin.s2m.cc/) 免费注册并登录,记下你的**专属域名**。 ``` 左侧菜单 → 工厂设置 → 数据克隆 → 将别人的数据克隆给我 对方商户ID:27 点击「立即克隆」→ F5 刷新后台 ``` --- ### 第三步 · 配置 AppID / Secret ``` 后台左侧菜单 → 微信设置 → 填写上一步获得的 AppID 和 AppSecret ``` > ⚠️ **此步骤至关重要!** 未正确配置将导致小程序无法连接你的后台。 --- ### 第四步 · 配置微信支付 ``` 后台左侧菜单 → 系统设置 → 在线支付配置 → 填写微信支付信息 ``` --- ### 第五步 · 下载安装开发工具 前往官网下载:[微信开发者工具](https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html) --- ### 第六步 · 导入项目 & 运行
打开开发者工具,选择**导入项目**,目录指向本项目代码根目录。 > 🔴 **AppID 务必填写你自己的小程序 AppID,共需确认三处!** --- ### 第七步 · 对接你自己的后台 在 `config.js` 中将 `subDomain` 修改为你的专属域名,`Ctrl + S` 保存。
- 📖 [如何查看自己的 subDomain](https://www.yuque.com/apifm/doc/qr6l4m) --- ## ⚙️ 进阶配置
🔍 用户自提订单扫码核销 用户选择自提后,底部「取餐」界面会显示取餐码,商家可通过「我的 → 扫码核销」完成核销。 默认不显示核销入口,需在后台配置: ``` 后台 → 系统设置 → 系统参数 → 添加文本类型参数 参数名:order_hx_uids 参数值:具有核销权限的用户编号(多个以英文逗号分隔) ``` 重新进入小程序后,「扫码核销」菜单即可显示。
🪑 桌号管理 & 生成二维码 **桌号管理** ``` 后台左侧菜单 → 桌号管理 → 添加桌号 ``` 添加后可在列表查看每张桌子的 `ID` 和 `密钥`,用于生成专属二维码。 **生成小程序码** ``` 后台 → 微信设置 → 小程序设置 → 获取小程序二维码(圆形码) 页面路径:pages/index/index scene 参数:12879,308,d3PiIY (其中 12879 为门店ID,308 为桌号ID,d3PiIY 为密钥,逗号必须为英文,不含空格) ```
🏷️ 修改首页标题 ``` 后台 → 系统设置 → 系统参数 → 添加文本类型参数 参数名:mallName(区分大小写) ```
🖼️ 设置点餐页 Banner 轮播图 ``` 后台 → 系统设置 → Banner 管理 → 自定义业务类型填:diancang ```
🏪 按门店区分显示商品 ``` 后台 → 系统设置 → 系统参数 → 添加开关类型参数 参数名:shop_goods_split 开启:只显示当前门店商品 | 关闭:显示所有门店商品 ```
📍 设置配送服务范围 ``` 后台 → 商场管理 → 门店管理 → 编辑门店 → 服务距离(填写公里数) ```
📊 显示商品销量 商品列表及详情接口返回以下两个销量字段,可在界面任意位置展示: | 字段 | 含义 | |:---:|:---| | `numberOrders` | 订单数量 | | `numberSells` | 商品售出件数 | > 示例:用户下 1 笔订单购买 10 份 → `numberOrders = 1`,`numberSells = 10`
📅 在线订座配置 ``` 1. 后台 → 预约报名 → 项目设置 → 添加项目(记下编号) 2. 后台 → 系统设置 → 系统参数 → 修改参数 zxdz → 填入编号 ```
🚚 配置达达配送 1. 📖 [达达配送对接教程](https://www.yuque.com/apifm/doc/gxk08t) 2. 后台 → 商城管理 → 门店管理 → 编辑门店 → 门店编号填达达对应编号,生鲜配送输入框填 `dada`
🌐 国际化多语言二次开发 1. 在页面 `onLoad` 中加入:`getApp().initLanguage(this)` 2. 模板中直接使用:`{{ $t.test.name }}` 3. 修改 `i18n/` 文件夹中对应语言文件即可
🖨️ 打印机配置自动出票 - 📖 [打印机配置教程](https://www.it120.cc/help/ggrun8.html) - 📖 [打印机模板变量详细说明](https://www.it120.cc/help/wtviya.html) **小票机模板:** [模版①](https://www.it120.cc/help/xc2hk2q4yrop12ll.html) · [模版②](https://www.it120.cc/help/taan6w2wvt6d00mg.html) · [模版③](https://www.it120.cc/help/vn7l4p2m28x7x30h.html) **杯贴机模板:** [模版①](https://www.it120.cc/help/nl0frezogy8uunet.html) · [模版②](https://www.it120.cc/help/mlcqigcmz1ggydw2.html)
🏬 商家入驻申请页面 1. `app.json` 中添加页面路径:`pages/shop/join-apply` 2. 放开 `pages/shop/select` 页面底部的入口代码
--- ## ❓ 常见问题
无法登录 / 无法获取 openid 1. 检查 `config.js` 中的 `subDomain` 是否已修改为你的专属域名 - 📖 [如何查看自己的 subDomain](https://www.yuque.com/apifm/doc/qr6l4m) 2. 确保以下 **三处 AppID 完全一致**: - 微信公众平台(`mp.weixin.qq.com`) → 开发 → 开发设置 - 小程序开发工具右上角「详情」→ 基本信息 - api工厂后台(`admin.s2m.cc`)→ 平台设置 → 微信小程序
获取手机号码失败,提示没权限 根据 [微信官方文档](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/getPhoneNumber.html),获取手机号的前提是: > 非个人开发者 + 已完成认证的小程序(不含海外主体)
wx.getLocation 接口难以申请,如何替换? 可使用 [`wx.getFuzzyLocation`](https://developers.weixin.qq.com/miniprogram/dev/api/location/wx.getFuzzyLocation.html) 替代,在开发工具中执行三次全局替换: | 查找 | 替换为 | |:---|:---| | `scope.userLocation` | `scope.userFuzzyLocation` | | `wx.getLocation` | `wx.getFuzzyLocation` | | `"getLocation"` | `"getFuzzyLocation"` |
小程序订单中心 path 怎么填? ``` pages/all-orders/index ```
小程序订单发货地址怎么填? ``` 小程序订单管理 → 订单信息录入 → 小程序商品订单详情 path: pages/order-details/index?payOrderNo=${商品订单号} ```
微信支付 MA 授权(appid 和 mch_id 不匹配) 📖 [处理教程](https://www.yuque.com/apifm/doc/zrui8q)
切换语言后底部菜单显示不正确 检查 `/i18n/index.js` 文件中的菜单内容是否已同步修改。
--- ## 🙏 开源致谢 本项目集成了以下优秀开源组件,在此致谢: | 组件 | 说明 | |:---|:---| | [Vant Weapp](https://youzan.github.io/vant-weapp/) | 轻量、可靠的小程序 UI 组件库 | | [apifm-wxapi](https://github.com/gooking/apifm-wxapi) | 小程序在线接口 SDK | | [api工厂](https://admin.s2m.cc) | 后端服务支持平台 | | [FMUI Icon](https://www.iconfont.cn/collections/detail?spm=a313x.7781069.0.da5a778a4&cid=17041) | 轻松活泼风格图标库 | | [Parser](https://github.com/jin-yufeng/Parser) | 小程序富文本 HTML 解析组件 | | [wxbarcode](https://github.com/alsey/wxbarcode) | 条形码 & 二维码生成组件 | --- ## 🌟 其他优秀开源项目推荐 > 以下均为同系列高质量开源模板,欢迎 Star ⭐ | 项目 | GitHub | 码云 | GitCode | |:---|:---:|:---:|:---:| | 天使童装 | [GitHub](https://github.com/EastWorld/wechat-app-mall) | [码云](https://gitee.com/javazj/wechat-app-mall) | [GitCode](https://gitcode.com/gooking2/wechat-app-mall) | | 天使童装(uni-app) | [GitHub](https://github.com/gooking/uni-app-mall) | [码云](https://gitee.com/javazj/uni-app-mall) | [GitCode](https://gitcode.com/gooking2/uni-app-mall) | | 简约精品商城(uni-app) | [GitHub](https://github.com/gooking/uni-app--mini-mall) | [码云](https://gitee.com/javazj/uni-app--mini-mall) | [GitCode](https://gitcode.com/gooking2/uni-app--mini-mall) | | 舔果果小铺(升级版) | [GitHub](https://github.com/gooking/TianguoguoXiaopu) | — | — | | 面馆风格小程序 | — | [码云](https://gitee.com/javazj/noodle_shop_procedures) | — | | AI 名片 | [GitHub](https://github.com/gooking/visitingCard) | [码云](https://gitee.com/javazj/visitingCard) | [GitCode](https://gitcode.com/gooking2/visitingCard) | | 仿海底捞订座排队(uni-app) | [GitHub](https://github.com/gooking/dingzuopaidui) | [码云](https://gitee.com/javazj/dingzuopaidui) | [GitCode](https://gitcode.com/gooking2/dingzuopaidui) | | H5 版本商城/餐饮 | [GitHub](https://github.com/gooking/vueMinishop) | [码云](https://gitee.com/javazj/vueMinishop) | [GitCode](https://gitcode.com/gooking2/vueMinishop) | | 餐饮点餐 | [GitHub](https://github.com/woniudiancang/bee) | [码云](https://gitee.com/woniudiancang/bee) | [GitCode](https://gitcode.com/gooking2/bee) | | 企业微展 | [GitHub](https://github.com/gooking/qiyeweizan) | [码云](https://gitee.com/javazj/qiyeweizan) | [GitCode](https://gitcode.com/gooking2/qiyeweizan) | | 无人棋牌室 | [GitHub](https://github.com/gooking/wurenqipai) | [码云](https://gitee.com/javazj/wurenqipai) | [GitCode](https://gitcode.com/gooking2/wurenqipai) | | 酒店客房服务小程序 | [GitHub](https://github.com/gooking/hotelRoomService) | [码云](https://gitee.com/javazj/hotelRoomService) | [GitCode](https://gitcode.com/gooking2/hotelRoomService) | | 面包店风格小程序 | [GitHub](https://github.com/gooking/bread) | [码云](https://gitee.com/javazj/bread) | [GitCode](https://gitcode.com/gooking2/bread) | | 朋友圈发圈素材 | [GitHub](https://github.com/gooking/moments) | [码云](https://gitee.com/javazj/moments) | [GitCode](https://gitcode.com/gooking2/moments) | | 小红书企业微展 | [GitHub](https://github.com/gooking/xhs-qiyeweizan) | [码云](https://gitee.com/javazj/xhs-qiyeweizan) | [GitCode](https://gitcode.com/gooking2/xhs-qiyeweizan) | | 旧物/废品回收 | [GitHub](https://github.com/gooking/recycle) | [码云](https://gitee.com/javazj/recycle) | [GitCode](https://gitcode.com/gooking2/recycle) | | 会员卡(饭卡)储值消费 | [GitHub](https://github.com/gooking/mealcard) | [码云](https://gitee.com/javazj/mealcard) | [GitCode](https://gitcode.com/gooking2/mealcard) | | 静筑 Apistatic | [GitHub](https://github.com/gooking/apistatic) | [码云](https://gitee.com/javazj/apistatic) | [GitCode](https://gitcode.com/gooking2/apistatic) | | 盲盒交友 | [GitHub](https://github.com/gooking/blindBoxDating) | [码云](https://gitee.com/javazj/blindBoxDating) | [GitCode](https://gitcode.com/gooking2/blindBoxDating) | | 光影集市 | [GitHub](https://github.com/gooking/photo-trading) | [码云](https://gitee.com/javazj/photo-trading) | [GitCode](https://gitcode.com/gooking2/photo-trading) | --- ## 💬 联系我们 如在使用过程中遇到问题,欢迎通过 [Issues](https://github.com/woniudiancang/bee/issues) 与我们交流。 如果本项目对你有所帮助或启发,请点个 ⭐ **Star** 支持一下,你的鼓励是我们持续更新的最大动力!
**加微信联系作者**
---
Made with ❤️ by [蜗牛点餐](https://github.com/woniudiancang)