forked from sccpt/hotel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b93ba65
Showing
1,477 changed files
with
46,856 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
'use strict'; | ||
/* | ||
* @Author: yurui | ||
* @Date: 2021-06-01 | ||
*/ | ||
|
||
module.exports = { | ||
write: true, | ||
prefix: '^', | ||
plugin: 'autod-egg', | ||
test: [ | ||
'test', | ||
'benchmark', | ||
], | ||
dep: [ | ||
'egg', | ||
'egg-scripts', | ||
], | ||
devdep: [ | ||
'egg-ci', | ||
'egg-bin', | ||
'egg-mock', | ||
'autod', | ||
'autod-egg', | ||
'eslint', | ||
'eslint-config-egg', | ||
], | ||
exclude: [ | ||
'./test/fixtures', | ||
'./dist', | ||
], | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
extends: [require.resolve('@umijs/fabric/dist/eslint')], | ||
globals: { | ||
ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: true, | ||
page: true, | ||
REACT_APP_ENV: true, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
logs/ | ||
npm-debug.log | ||
yarn-error.log | ||
node_modules/ | ||
app/public/uploads/ | ||
package-lock.json | ||
yarn.lock | ||
coverage/ | ||
.idea/ | ||
run/ | ||
.DS_Store | ||
*.sw* | ||
*.un~ | ||
typings/ | ||
.nyc_output/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict'; | ||
/* | ||
* @Author: yurui | ||
* @Date: 2021-06-01 | ||
*/ | ||
|
||
const path = require('path'); | ||
|
||
module.exports = { | ||
config: path.join(__dirname, 'database/config.json'), | ||
'migrations-path': path.join(__dirname, 'database/migrations'), | ||
'seeders-path': path.join(__dirname, 'database/seeders'), | ||
'models-path': path.join(__dirname, 'app/model'), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
language: node_js | ||
node_js: | ||
- '10' | ||
before_install: | ||
- npm i npminstall -g | ||
install: | ||
- npminstall | ||
script: | ||
- npm run ci | ||
after_script: | ||
- npminstall codecov && codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
// 使用 IntelliSense 了解相关属性。 | ||
// 悬停以查看现有属性的描述。 | ||
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
// "type": "pwa-msedge", | ||
// "request": "launch", | ||
// "name": "Launch Chrome against localhost", | ||
// "url": "http://localhost:8080", | ||
// "webRoot": "${workspaceFolder}" | ||
"name": "Launch Egg", | ||
"type": "node", | ||
"request": "launch", | ||
"cwd": "${workspaceRoot}", | ||
"runtimeExecutable": "npm", | ||
"windows": { "runtimeExecutable": "npm.cmd" }, | ||
"runtimeArgs": [ "run", "debug" ], | ||
"console": "integratedTerminal", | ||
"protocol": "auto", | ||
"restart": true, | ||
"port": 9229, | ||
"autoAttachChildProcesses": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,240 @@ | ||
<h1 align="center">Hotel Manage</h1> | ||
|
||
<div align="center"> | ||
|
||
开箱即用的酒店管理系统。 | ||
|
||
[![node version][node-image]][node-url] | ||
[![egg version][egg-image]][egg-url] | ||
[![antd](https://img.shields.io/badge/antd-^4.0.0-blue.svg?style=flat-square)](https://github.com/ant-design/ant-design) | ||
[![GitHub issues](https://img.shields.io/github/issues/zuiidea/antd-admin.svg?style=flat-square)](https://github.com/zuiidea/antd-admin/issues) | ||
[![MIT](https://img.shields.io/dub/l/vibe-d.svg?style=flat-square)](http://opensource.org/licenses/MIT) | ||
![Travis (.org)](https://img.shields.io/travis/zuiidea/antd-admin.svg) | ||
|
||
|
||
|
||
![](http://www.yjnbs.com/hotel/p1.png) | ||
|
||
</div> | ||
|
||
|
||
|
||
## 技术栈 | ||
|
||
后端技术栈:egg.js + mysql + sequelize + jwt + redis + socket.io 等 | ||
|
||
前端技术栈:React + Ant Design Pro + Umi 等。由于前端部分代码用到了公司内部框架,暂不提供开源! | ||
|
||
网站:bootstrap 响应式 | ||
|
||
微信小程序:vant-weapp | ||
|
||
### 环境 | ||
|
||
node版本8以上 | ||
|
||
MySQL数据库 | ||
|
||
Redis | ||
|
||
## 使用 | ||
|
||
```bash | ||
git clone https://github.com/sccpt/hotel.git | ||
cd hotel | ||
npm install | ||
``` | ||
修改config/config.default.js下自己的数据库用户名和密码 | ||
|
||
修改config/config.default.js下Redis的相关配置信息 | ||
|
||
修改config/config.default.js下weapp的相关配置信息(用于微信小程序鉴权、商户支付等) | ||
|
||
创建数据库hotel | ||
|
||
在hotel数据库下导入项目根目录下hotel.sql文件 | ||
|
||
运行项目 | ||
|
||
> npm run dev | ||
浏览器打开 http://127.0.0.1:7001/admin/index.html | ||
|
||
登录账号:admin,密码: 123456 | ||
|
||
更多使用说明请移步:https://eggjs.org/zh-cn/intro/quickstart.html | ||
|
||
## 后台功能 | ||
|
||
```bash | ||
├─ 登录 | ||
| ├─ 登录退出 | ||
├─ 首页 | ||
| ├─ 实时房间动态页 | ||
├─ 酒店管理 | ||
| ├─ 房间管理--增删改查 | ||
| ├─ 楼层管理--增删改查 | ||
| ├─ 房型管理--增删改查 | ||
| ├─ 订单管理--增删改查 | ||
| ├─ 价格管理--增删改查 | ||
| ├─ 促销管理--增删改查 | ||
| ├─ 通知信息--删查 | ||
├─ 点餐系统 | ||
| ├─ 商品管理--增删改查 | ||
| ├─ 订单管理--删改查 | ||
| ├─ 分类管理--增删改查 | ||
| ├─ 评价管理--删查 | ||
├─ 内容管理 | ||
| ├─ 文章管理--增删改查 | ||
| ├─ 栏目管理--增删改查 | ||
├─ 系统管理 | ||
| ├─ 用户管理--增删改查 | ||
| ├─ 角色管理--增删改查 | ||
| ├─ 菜单管理--增删改查 | ||
| ├─ 部门管理--增删改查 | ||
├─ 其它功能 | ||
| ├─ 订单30分钟未支付自动取消 | ||
| ├─ 新订单、取消订单、订餐等socket实时推送 | ||
| ├─ 微信支付 | ||
| ├─ 微信支付成功回调 | ||
| ├─ 订单取消微信退款 | ||
``` | ||
|
||
## 网站功能 | ||
|
||
```bash | ||
├─ 网站首页 | ||
| ├─ 推荐房型 | ||
| ├─ 促销动态 | ||
| ├─ 照片图库 | ||
| ├─ 美食商品 | ||
| ├─ 联系我们 | ||
├─ 房型列表 | ||
| ├─ 列表页 | ||
| ├─ 详情页 | ||
├─ 客房预定 | ||
| ├─ 介绍 | ||
├─ 美食商品 | ||
| ├─ 列表页 | ||
| ├─ 详情页 | ||
├─ 关于我们 | ||
| ├─ 介绍 | ||
├─ 联系我们 | ||
| ├─ 介绍 | ||
├─ 促销动态 | ||
| ├─ 列表页 | ||
| ├─ 详情页 | ||
``` | ||
|
||
## 微信小程序功能 | ||
|
||
```bash | ||
├─ 首页 | ||
| ├─ 房型列表 | ||
| ├─ 在线预定 | ||
| ├─ 填写订单 | ||
| ├─ 多个房间预定 | ||
| ├─ 订单明细 | ||
| ├─ 提交订单 | ||
| ├─ 在线支付 | ||
| ├─ 取消订单 | ||
├─ 促销 | ||
| ├─ 列表 | ||
| ├─ 详情 | ||
├─ 订餐 | ||
| ├─ 自助点餐中心 | ||
| ├─ 购物车 | ||
| ├─ 下单中心 | ||
| ├─ 订餐与订房订单号绑定 | ||
| ├─ 就餐时间与入住时间段绑定 | ||
| ├─ 订餐成功 | ||
| ├─ 订餐成功自动增加订房订单“额外消费”栏金额,退房的时候酒店服务台现场进行结算 | ||
├─ 关于 | ||
| ├─ 联系酒店 | ||
| ├─ 酒店介绍 | ||
├─ 我的 | ||
| ├─ 我的订单 | ||
| | ├─ 订房订单 | ||
| | | ├─ 全部 | ||
| | | ├─ 待支付 | ||
| | | ├─ 待入住 | ||
| | | ├─ 已完成 | ||
| | ├─ 订餐订单 | ||
| | | ├─ 全部 | ||
| | | ├─ 已订餐 | ||
| | | ├─ 备餐中 | ||
| | | ├─ 已完成 | ||
| | ├─ 我的评价 | ||
| | | ├─ 针对订餐的评价 | ||
``` | ||
|
||
备注: | ||
|
||
1,订餐与订房订单绑定,没有订房的客人不能订餐 | ||
2,就餐时间与订房入住时间段绑定,只能在房间预定的时间段内就餐 | ||
3,订餐不提供在线支付,由于已绑定了订房订单。订餐下单的时候自动在订房订单“额外消费”字段栏增加消费金额,待退房的时候酒店服务台现场结算。 | ||
4,订房订单提供在线支付功能,并且30分钟未支付,自动取消订单。订单页,实时显示剩余支付时间。 | ||
5,订餐成功完成后,客人可在线评论。后台可删除评论。 | ||
|
||
|
||
### 目录结构 | ||
|
||
```bash | ||
hotel-manage | ||
├─ app | ||
| ├─ controller // 用于解析用户的输入,处理后返回相应的结果 | ||
| ├─ extend // 用于框架的扩展 | ||
| ├─ io // socket.io | ||
| ├─ middleware // 用于编写中间件 | ||
| ├─ model // 用于放置领域模型 | ||
| ├─ public // 用于放置静态资源 | ||
| ├─ rules // 参数校验文件 | ||
| ├─ schedule // 用于定时任务,可选,具体参见定时任务 | ||
| ├─ service // 用于编写业务逻辑层,可选,建议使用 | ||
| ├─ utils // 工具文件 | ||
| ├─ view // 网站模板 | ||
| ├─ router.js // 用于配置 URL 路由规则 | ||
├─ config | ||
| ├─ config.default.js // 用于编写配置文件 | ||
| ├─ plugin.js // 用于配置需要加载的插件 | ||
├─ database | ||
| ├─ migrations // 数据库迁移文件 | ||
| ├─ seeders // 种子文件 | ||
| ├─ config.json // sequelize 配置文件 | ||
├─ logs // 日志文件 | ||
├─ run | ||
├─ test | ||
├─ typings | ||
├─ www // 前端打包文件以及一些静态文件 | ||
├─ weapp // 微信小程序源码 | ||
... | ||
``` | ||
|
||
## 界面截图 | ||
|
||
**后台** | ||
|
||
![room](http://www.yjnbs.com/hotel/p2.png) | ||
|
||
![order](http://www.yjnbs.com/hotel/p3.png) | ||
|
||
![food_order](http://www.yjnbs.com/hotel/p4.png) | ||
|
||
**网站** | ||
|
||
![home](http://www.yjnbs.com/hotel/p9.png) | ||
|
||
**微信小程序** | ||
|
||
![wx_home](http://www.yjnbs.com/hotel/p5.png) | ||
|
||
![wx_order](http://www.yjnbs.com/hotel/p6.png) | ||
|
||
![wx_food](http://www.yjnbs.com/hotel/p7.png) | ||
|
||
![wx_my](http://www.yjnbs.com/hotel/p8.png) | ||
|
||
|
||
## 感谢支持 | ||
|
||
如果对您有帮助,您可以点右上角 "Star" 支持一下 谢谢! ^_^ |
Oops, something went wrong.