提交 70414b72 编写于 作者: R rainyan

Modify readme.

上级 76ccbcc2
......@@ -99,7 +99,7 @@ go list (go mod tidy)
go build
```
### 2.3 生成swagger自动化API文档
### 2.3 swagger自动化API文档
#### 2.3.1 安装 swagger
......@@ -130,30 +130,6 @@ swag init
````
执行上面的命令后,server目录下会出现docs文件夹,登录http://localhost:8888/swagger/index.html,即可查看swagger文档
### 2.4 docker镜像
感谢 [@chenlinzhong](https://github.com/chenlinzhong)提供的docker镜像.
```
# 启动容器
docker run -itd --net=host --name=go_container shareclz/go_node /bin/bash;
# 进入容器
docker exec -it go_container /bin/bash;
git clone https://github.com/piexlmax/gin-vue-admin.git /data1/www/htdocs/go/admin;
# 启动前端
cd /data1/www/htdocs/go/admin/QMPlusVuePage;
cnpm i ;
npm run serve;
# 修改数据库配置
vi /data1/www/htdocs/go/admin/QMPlusServer/static/dbconfig/config.json;
# 启动后端
cd /data1/www/htdocs/go/admin/QMPlusServer;z
go run main.go;
```
## 3. 技术选型
......@@ -166,7 +142,9 @@ go run main.go;
- 日志:使用`go-logging`实现日志记录。
## 4. 项目目录
## 4. 项目架构
![架构图](./docs/gin-vue-admin.png)
```
├─server (后端文件夹)
......@@ -226,55 +204,38 @@ go run main.go;
- [ ] 工作流,任务交接功能开发
- [ ] 单独前端使用模式以及数据模拟
## 7. 更新日志
| 日期 | 日志 |
| :---: | --- |
|2020/01/07| 角色增加数据资源功能 增加数据资源关联返回 演示环境代码已同步 开启了多点登录拦截 可能会被其他人挤掉 |
|2020/01/13| 增加了配置管理功能 此功能不发表至测试环境 待保护机制以及服务重启机制发开完成后才会发表值测试环境 请自行clone且导入sql体验 |
|2020/02/21| 修改了casbin的自定义鉴权方法,使其完全支持RESTFUL的/:params以及?query= 的接口模式 |
|2020/03/17| 增加了验证码功能 使用了 [@dchest/captcha](https://github.com/dchest/captcha)库 |
|2020/03/30| 代码生成器开发完成 表单生成器开发完成 使用了[@form-generator](https://github.com/JakHuang/form-generator) 库 |
|2020/04/01| 增加前端历史页签功能,增加(修改)条件查询示例,前端背景色调修改为白色。(如不需要此功能可以在`web/src/view/layout/index.vue`中屏蔽`HistoryComponent`背景色调,为本页260行&.el-main中的`background`属性) |
|2020/04/04| 启动2.x版本,项目文档规范化,日志功能改造,方法增加英文注释 |
|2020/04/24|1.增加了角色拷贝功能(目前只支持单角色拷贝)<br>2.增加了首页音频播放器示例 增加了 dotolist工具<br>3.增加了docker支持<br>4.修复了部分total返回0的bug<br>5.修复了首页会发送一次无用404请求的bug<br>6.修复了swagger不能携带token的bug<br>7.修复菜单展示下级只有一个隐藏菜单时候的交互错误<br>8.修复了config从前端控制变化时候导致yaml内部的key名称错误的bug<br>9.数据库添加拷贝角色相关api和权限|
## 8. 团队博客
## 7. 知识库
## 7.1 团队博客
> https://blog.henrongyi.top
> https://www.yuque.com/flipped-aurora
>
>内有前端框架教学视频。如果觉得项目对您有所帮助可以添加我的个人微信:shouzi_1994,欢迎您提出宝贵的需求。
## 9. 教学视频
### 9.1 环境搭建
## 7.2 教学视频
(1)环境搭建
> Bilibili:https://www.bilibili.com/video/BV1Fg4y187Bw/ (v1.0版本视频,v2.0操作相同目录不同)
### 9.2 模板使用
(2)模板使用
> Bilibili:https://www.bilibili.com/video/BV16K4y1r7BD/ (v1.0版本视频,v2.0操作相同目录不同)
### 9.3 golang基础教学视频录制中...
> 地址:https://space.bilibili.com/322210472/channel/detail?cid=108884
## 10. 联系方式
(3)golang基础教学视频录制中...
> https://space.bilibili.com/322210472/channel/detail?cid=108884
## 8. 联系方式
### 8.1 技术群
| QQ群 |
| :---: |
| <img src="http://qmplusimg.henrongyi.top/qq.jpg" width="180"/> |
### QQ交流群:622360840
### 微信交流群:可以添加上面任意一位开发者,备注"加入gin-vue-admin交流群"
### 8.2 项目组成员
| 蒋 | 尹 | 严 | 杜 | 印 | 宋 |
| :---: | :---: | :---: | :---: | :---: | :---: |
| <img width="150" src="http://qmplusimg.henrongyi.top/qrjjz.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryx.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryr.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrdjl.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrygl.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrsong.png"> |
### - QQ交流群:622360840
### - 微信交流群:可以添加上面任意一位开发者,备注"加入gin-vue-admin交流群"
## 11. 开发者列表
| 昵称 | 项目职务 | 姓 |
| ---- | ---- | ---- |
| [@piexlmax](https://github.com/piexlmax) | 项目发起者 | 蒋 |
......@@ -284,6 +245,6 @@ go run main.go;
| [@krank666](https://github.com/krank666) | 前端开发 | 尹 |
| [@chen-chen-up](https://github.com/chen-chen-up) | 新手开发 | 宋 |
## 12. 捐赠
## 9. 捐赠
如果你觉得这个项目对你有帮助,你可以请作者喝饮料 :tropical_drink:
......@@ -131,29 +131,6 @@ swag init
````
After executing the above command,`docs` will show in `server/`,then open your browser, jump into `http://localhost:8888/swagger/index.html` to see the swagger APIs.
### 2.4 Docker image
Thanks [@chenlinzhong](https://github.com/chenlinzhong) for providing docker image.
```
# start docker
docker run -itd --net=host --name=go_container shareclz/go_node /bin/bash;
# come into docker
docker exec -it go_container /bin/bash;
git clone https://github.com/piexlmax/gin-vue-admin.git /data1/www/htdocs/go/admin;
# run web
cd /data1/www/htdocs/go/admin/QMPlusVuePage;
cnpm i ;
npm run serve;
# update db config
vi /data1/www/htdocs/go/admin/QMPlusServer/static/dbconfig/config.json;
# run server
cd /data1/www/htdocs/go/admin/QMPlusServer;z
go run main.go;
```
## 3. Technical selection
......@@ -165,7 +142,9 @@ go run main.go;
- Config: using `fsnotify` and `viper` to implement `yaml` config file。
- Log: using `go-logging` record logs。
## 4. Project layout
## 4. Project Architecture
![Architecture diagram](./docs/gin-vue-admin.png)
```
├─server (backend)
......@@ -226,57 +205,40 @@ backend code file: model\dnModel\api.go
- [ ] workflow, task transfer function
- [ ] frontend independent mode, mock
## 7. Changelog
| Date | Log |
| :---: | --- |
|2020/01/07| Added data resource function to Role, added the return of data resource association, the demo code was synchronized, and the multi-point login interception has been turned on, which may prevent being crowded out by others |
|2020/01/13| Added configuration management function. This function is not published to the test environment. The test environment will not be published until the protection mechanism and the service restart mechanism are released. Please clone and import the sql scripts into your own database |
|2020/02/21| Modified `casbin` custom authentication method to fully support `/:params and?Query=` interface modes in RESTful API |
|2020/03/17| Added verification code function with [@dchest/captcha](https://github.com/dchest/captcha) |
|2020/03/30| Code generator implementation, form generator implementation with[@form-generator](https://github.com/JakHuang/form-generator) |
|2020/04/01| Add frontend history tab function, add (modify) condition query example, and change the frontend background to white. (If you don't need this feature, you can change `background` in `&.el-main` to shield background color of `HistoryComponent`, which is located at line 260 of the code `web/src/view/layout/index.vue`) |
|2020/04/04| Starting version 2.x, standardize the project documentation, reconstructing the log function, and adding English comments to all methods |
## 7. Knowledge base
## 8. Team blog
### 7.1 Team blog
> https://blog.henrongyi.top
> https://www.yuque.com/flipped-aurora
>
>
There are video courses about frontend framework in our blo. If you think the project is helpful to you, you can add my personal WeChat:shouzi_1994,your comments is welcomed。
## 9. Video courses
>There are video courses about frontend framework in our blo. If you think the project is helpful to you, you can add my personal WeChat:shouzi_1994,your comments is welcomed。
### 9.1 Development environment course
### 7.2 Video courses
(1) Development environment course
> Bilibili:https://www.bilibili.com/video/BV1Fg4y187Bw/ (coming soon)
### 9.2 Template course
(2) Template course
> Bilibili:https://www.bilibili.com/video/BV1Fg4y187Bw/ (coming soon)
### 9.3 Golang basic course (coming soon)
> URL: https://space.bilibili.com/322210472/channel/detail?cid=108884
(3) Golang basic course (coming soon)
## 10. Contacts
> https://space.bilibili.com/322210472/channel/detail?cid=108884
## 8. Contacts
### 8.1 Groups
| QQ group |
| :---: |
| <img src="http://qmplusimg.henrongyi.top/qq.jpg" width="180"/> |
### QQ group: 622360840
### Wechat group: add anyone above, comment "加入gin-vue-admin交流群"
### 8.2 Team members
| Jiang | Yin | Yan | Du | Yin | Song |
| :---: | :---: | :---: | :---: | :---: | :---: |
| <img width="150" src="http://qmplusimg.henrongyi.top/qrjjz.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryx.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qryr.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrdjl.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrygl.png"> | <img width="150" src="http://qmplusimg.henrongyi.top/qrsong.png"> |
### QQ group: 622360840
### Wechat group: add anyone above, comment "加入gin-vue-admin交流群"
## 11. Developers
| Nick name | Project position | First name |
| ---- | ---- | ---- |
| [@piexlmax](https://github.com/piexlmax) | Project sponsor | Jiang |
......@@ -286,7 +248,7 @@ There are video courses about frontend framework in our blo. If you think the pr
| [@krank666](https://github.com/krank666) | Frontend developer | Yin |
| [@chen-chen-up](https://github.com/chen-chen-up) | Novice developer | Song |
## 12. Donate
## 9. Donate
If you find this project useful, you can buy author a glass of juice :tropical_drink:
FROM golang:alpine as builder
RUN apk add --update --no-cache yarn make g++
FROM centos:7.6.1810
ENV GOPROXY=https://goproxy.cn,https://goproxy.io,direct \
GO111MODULE=on \
CGO_ENABLED=1
WORKDIR /go/src/gin-vue-admin
RUN go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct
COPY . .
RUN go env && go list && go build -v -a -ldflags "-extldflags \"-static\" " -o gvadmin .
# 设置go mod proxy 国内代理
# 设置golang path
ENV GOPROXY=https://goproxy.io GOPATH=/gopath PATH="${PATH}:/usr/local/go/bin"
# 定义使用的Golang 版本
ARG GO_VERSION=1.13.3
WORKDIR /app
COPY --from=builder /go/src/gin-vue-admin/gvadmin .
COPY --from=builder /go/src/gin-vue-admin/db.db .
COPY --from=builder /go/src/gin-vue-admin/config.yaml .
COPY --from=builder /go/src/gin-vue-admin/resource ./resource
# 安装 golang 1.13.3
RUN yum install -y wget && \
wget "https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz" && \
rm -rf /usr/local/go && \
tar -C /usr/local -xzf "go$GO_VERSION.linux-amd64.tar.gz" && \
rm -rf *.tar.gz && \
go version && go env;
EXPOSE 8888
WORKDIR $GOPATH
COPY . ginvue
RUN cd ginvue && go build -o app;
CMD ["gvadmin/app"]
COPY ./config.yaml $GOPATH/ginvue/
EXPOSE 8888
CMD ["ginvue/app"]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册