Giter Club home page Giter Club logo

go-admin-team / go-admin Goto Github PK

View Code? Open in Web Editor NEW
10.8K 152.0 2.3K 17.39 MB

基于Gin + Vue + Element UI & Arco Design & Ant Design 的前后端分离权限管理系统脚手架(包含了:多租户的支持,基础用户管理功能,jwt鉴权,代码生成器,RBAC资源控制,表单构建,定时任务等)3分钟构建自己的中后台项目;项目文档》:https://www.go-admin.pro V2 Demo: https://vue2.go-admin.dev V3 Demo: https://vue3.go-admin.dev Antd 订阅版:https://antd.go-admin.pro

Home Page: https://www.go-admin.pro

License: MIT License

Go 98.03% Makefile 0.42% CSS 0.02% HTML 1.21% Dockerfile 0.15% Shell 0.18%
gin casbin gin-admin vue-admin gorm jwt gin-vue-admin ant-design arco-design ant-design-pro

go-admin's People

Contributors

0x5143 avatar appleboy avatar bestgopher avatar bing127 avatar cassuis avatar chengxiao avatar dependabot[bot] avatar g-akiraka avatar haimait avatar horizonzy avatar jfcg avatar kikiyou avatar llussy avatar lwnmengjing avatar majiayu000 avatar mss-boot avatar naturalgao avatar ninstein avatar qialie avatar quanbisen avatar ruishawn avatar silicon-he avatar vingurzhou avatar wenjianzhang avatar wwhai avatar wxxiong6 avatar yangcuiwang avatar zgxme avatar zhouxixi-dev avatar zyd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-admin's Issues

包引用的问题

https://github.com/satori/go.uuid/blob/master/generator.go
func NewV4() (UUID, error) {
return global.NewV4()
}

master分支:
\middleware\requestid.go
引用了"github.com/satori/go.uuid"
if requestId == "" {
u4 := uuid.NewV4()
requestId = u4.String()
}

这怎么编译通过的?返回的参数个数不一致,我编译不过

satori/go.uuid#106
这里提到 GO111MODULE=on go get -u github.com/satori/go.uuid@master

2、
https://github.com/casbin/casbin/branches
github.com/casbin/casbin 没有v2这个branch
master:
pkg\casbin\mycasbin.go 引用"github.com/casbin/casbin/v2" 我这边会报错
同理
https://github.com/casbin/gorm-adapter/branches/all 没有v2分支
gormadapter "github.com/casbin/gorm-adapter/v2" 引用报错

只能使用GO111MODULE=on go get -v github.com/casbin/casbin/v2 引入包
所以应该在开发环境中指定 1.11以上版本

表单构建里把运行也加上呗

对比了github上一些其他类似的go语言版admin,go-admin最赞,后台功能也很完善,
表单构建组件的运行和查看json的功能也加上呗,gin-vue-admin里表单构建有加上该功能

关于权限的问题

设置完页面权限后,进到页面一直提示:对不起,您没有该接口访问权限,请联系管理员
不知道哪里没有设置好。可否对权限这里出一些设计和设置文档

初始化完成后,windows环境在goland直接运行报错Error: requires at least one arg

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

编写go-admin应用,第2步 中的错误:apis/comtent/article.go:26:17: cannot use c.Request.FormValue("articleId") (type string) as type int in assignment apis/comtent/article.go:73:22: undefined: msg.DeletedFail

c.Request.FormValue("articleId") 问题解决:data.ArticleId, _ = strconv.Atoi(c.Request.FormValue("articleId"))
undefined: msg.DeletedFail 问题解决:package msg

var (
CreatedSuccess = "创建成功!"
UpdatedSuccess = "更新成功!"
DeletedSuccess = "删除成功!"
GetSuccess = "查询成功!"
NotFound = "未找到相关内容或者数据为空!"
DeletedFail = "删除失败!"
)

build 失败

build 失败 提示如下:
Error: requires at least one arg。

部门列表没有分页配置

部门分页列表没有分页
func GetDeptList(c *gin.Context)
另外swagg文件在线测试建议添加Header Token
// @param Authorization header string true "Bearer Token"
添加后可在swagger界面对接口进行测试

账号或密码错误代码(201)

admin账户登录失败,用户数据库表中存在admin用户信息
bcrypt: hashedPassword is not the hash of the given password

2020-05-19 17:16:36.1398 [ERROR] POST /login 500 /login 127.0.0.1 账号或密码错误(代码201)
time="2020-05-19T17:16:36+08:00" level=info msg="2020-05-19 17:16:36.0379 [INFO] 200 101.9401ms 127.0.0.1 POST /login \r\n"

个人中心仅更新用户昵称会导致密码被修改

分别在apis/system/sysuser.go UpdateSysUser 的 tools.GetUserIdStr 前后打印上下文和data,发现密码是之前的密码,在data.Update中打印,密码被修改了
2020/05/17 07:00:01 UpdateSysUser c and data
Keys: map[JWT_PAYLOAD:map[datascope: exp:1.589672385e+09 identity:1 nice:admin orig_iat:1.589668785e+09 roleid:1 rolekey:admin rolename:系统管理员] JWT_TOKEN:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhc2NvcGUiOiIiLCJleHAiOjE1ODk2NzIzODUsImlkZW50aXR5IjoxLCJuaWNlIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTU4OTY2ODc4NSwicm9sZWlkIjoxLCJyb2xla2V5IjoiYWRtaW4iLCJyb2xlbmFtZSI6Iuezu-e7n-euoeeQhuWRmCJ9.LcOsu_ZBbKnnmAtElcFX64bE6OFMNCZxkc2K9UwCpe0 X-Request-Id:744d82f0-da05-495b-8e73-f388735c876e dataScope: identity:map[DataScope: IdentityKey:1 RoleIds:1 RoleKey:admin UserId:1 UserName:admin] role: roleIds:0 userId:0 userName:{Username:}]
Params: []
PassWord: {Password:$2a$10$cKFFTCzGOvaIHHJY2K45Zuwt8TD6oPzYi4s5MzYIBAWCLL6ZhouP2}

2020/05/17 07:00:01 UpdateSysUser data {SysUserId:{UserId:1} SysUserB:{NickName:管理员3 Phone:13818888888 RoleId:1
Salt: Avatar: Sex:0 Email:[email protected] DeptId:1 PostId:1 CreateBy:1 UpdateBy:1 Remark: Status:0 DataScope: Params: BaseModel:{CreatedAt:2019-11-10 14:05:55 +0800 CST UpdatedAt:2020-05-16 21:10:09 +0800 CST DeletedAt:}}
LoginM:{UserName:{Username:admin} PassWord:{Password:$2a$10$cKFFTCzGOvaIHHJY2K45Zuwt8TD6oPzYi4s5MzYIBAWCLL6ZhouP2}}}

2020/05/17 07:00:02 Sysuser1: &{SysUserId:{UserId:1} SysUserB:{NickName:管理员3 Phone:13818888888 RoleId:1 Salt:
Avatar: Sex:0 Email:[email protected] DeptId:1 PostId:1 CreateBy:1 UpdateBy:1 Remark: Status:0 DataScope: Params:
BaseModel:{CreatedAt:2019-11-10 14:05:55 +0800 CST UpdatedAt:2020-05-16 21:10:09 +0800 CST DeletedAt:}} LoginM:{UserName:{Username:admin} PassWord:{Password:$2a$10$GxDu7R9zzpgft7xFjIEKxu0Sbe.7hYL0VEBMeg080g0idqYM1dj/e}}}

(F:/project/work/go/src/go-admin/models/sysuser.go:206)
[2020-05-17 07:00:02] [2.00ms] SELECT * FROM sys_user WHERE sys_user.deleted_at IS NULL AND ((sys_user.user_id = 1)) ORDER BY sys_user.user_id ASC LIMIT 1
[1 rows affected or returned ]
2020/05/17 07:00:02 Sysuser2: &{SysUserId:{UserId:1} SysUserB:{NickName:管理员3 Phone:13818888888 RoleId:1 Salt:
Avatar: Sex:0 Email:[email protected] DeptId:1 PostId:1 CreateBy:1 UpdateBy:1 Remark: Status:0 DataScope: Params:
BaseModel:{CreatedAt:2019-11-10 14:05:55 +0800 CST UpdatedAt:2020-05-16 21:10:09 +0800 CST DeletedAt:}} LoginM:{UserName:{Username:admin} PassWord:{Password:$2a$10$GxDu7R9zzpgft7xFjIEKxu0Sbe.7hYL0VEBMeg080g0idqYM1dj/e}}}

go build 失败

go: golang.org/x/[email protected]: Get https://proxy.go
lang.org/golang.org/x/crypto/@v/v0.0.0-20200323165209-0ec3e9974c59.mod: dial tcp
172.217.160.113:443: connectex: A connection attempt failed because the connect
ed party did not properly respond after a period of time, or established connect
ion failed because connected host has failed to respond.

问题

1、models/dept.go 39行 DataScope string json:"dataScope" gorm:"_" 应该是 中横线吧,其它model一致问题
2、model的Create 方法 UpdateTime 默认为空 string类型 数据库是datetime 新插入数据是会报错的

如何下载安装swag插件

新手求助!无法下载安装swag插件
无法下载安装,换了地点,不同网络也一样。安装了gopm 用gopm get也不行。
帮看看是什么原因,谢谢~
cmd里输入命令,提示如下:

`D:\go_preject\src>go get -u github.com/swaggo/swag/cmd/swag

cd d:\go_preject\src\github.com\swaggo\swag; git pull --ff-only

There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

git branch --set-upstream-to=<remote>/<branch> master

package github.com/swaggo/swag/cmd/swag: exit status 1`

IsDel string `gorm:"column:is_del" json:"isDel"` 改成 int

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

验证码总是输入不对

验证码总是输入不对, 不知道是不是程序的bug,还是我一直看错 :)))) . 请换个环境测试下.
另外建议增加sqlite3的支持, 毕竟测试平台搭建更简单

代码生成和字典

你好,请问,系统里的代码生成怎么使用呀。是先在数据库里建表,然后在页面上导入,选择model.go和api.go里的内容,导入到项目里。还是有其它方式使用呢

系统里的字典功能有什么作用呢?

支持多数据库

能否同时支持多个数据库运行

一般项目经常会链接多个不同数据库进行数据操作,能否在框架层面支持,类似gf的orm可以配置多数据库

感谢

我这边直接运行 npm run dev 但是页面始终没出来呢,请问是什么问题呢,

前端代码我拉取的是最新的

接口这边也有返回相应的数据

(/Users/dotcool/Documents/tongji/go-admin/models/menu.go:219)
[2020-04-22 03:07:28] [1.92ms] SELECT sys_menu.* FROM sys_menu left join sys_role_menu on sys_role_menu.menu_id=sys_menu.menu_id WHERE sys_menu.deleted_at IS NULL AND ((sys_role_menu.role_name='admin' and menu_type in ('M','C'))) ORDER BY sort
[39 rows affected or returned ]
Failed to write to log, invalid argument
Failed to write to log, invalid argument

2020-04-22 03:07:28.3037 [INFO] GET /api/v1/menurole 200 8.019678ms /api/v1/menurole 127.0.0.1

只是有提示没法写log

前端的话就是空白的

image

go-admin 服务端支持https

新需求:
go-admin 支持https
在配置文件中,增加服务类型和证书字段,服务器启动时,自动判断是否配置了https,如果配置了https,则启动https的服务。

直接运行编译文件报错

Config File "settings" Not Found in "[/usr/local/go/path/golang.com/config]"
panic: config not found settings.database
这个要怎么解决,已经修改过setting文件

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.