goflyfox / gmanager Goto Github PK
View Code? Open in Web Editor NEW基于gf框架的管理平台,支持登录、认证、组织机构、用户、角色、菜单、日志
License: Apache License 2.0
基于gf框架的管理平台,支持登录、认证、组织机构、用户、角色、菜单、日志
License: Apache License 2.0
您好,我也一位刚入门go语言开发者,目前我在看gmanager框架权限这一块,发现只能控制到菜单,不能控制到方法,请问是不是需要自己写一个中间件来支持呢?请问菜单管理中的按钮选项就是用来填写方法路径的呢?谢谢🙏
删除一个用户,如果这个用户关联到上下级,是否会影响上下级树。
比如一个用户甲有上级A,有下级CDEFGHJK等。
当删除用户甲后,他的下级CDEFGHJK的上级就找不到了。这个怎么处理?
您好,我也一位刚入门go语言开发者,目前我在看gmanager框架权限这一块,发现只能控制到菜单,不能控制到方法,请问是不是需要自己写一个中间件来支持呢?请问菜单管理中的按钮选项就是用来填写方法路径的呢?谢谢🙏
刚开始学习go 使用这个项目的时候 发现修改密码功能一直操作不成功,
调试代码发现无法解决以下问题
2021-03-12 17:53:43.758 [ERRO] Password error sql: expected 27 arguments, got 28, UPDATE
sys_userSET
status=10,
tel='123',
back_site_id=5,
real_name='系统管理员',
depart_id=10001,
address='',
uuid='94091b1fa6ac4a27a06c0b92155aea6a',
endtime='',
user_type=1,
remark='时间是最好的老师,但遗憾的是——最后他把所有的学生都弄死了',
enable=1,
update_time='2021-03-12 17:53:40',
create_time='2017-03-19 20:41:25',
create_id=1,
id=1,
password='ef694f728a44575bedc8ee7caa2d5c48',
thirdid='',
email='[email protected]',
title_url='',
theme='flat',
create_site_id=1,
project_id=1,
username='admin',
salt='1111',
project_name='test',
update_id=1 WHERE
id` IN (1)
Stack:
getMenuList: function () {
dudu.get(dudu.ctx + "/system/user/menu?_" + $.now(), function (r) {
if (r.code != 0) {
console.info("getMenuList fail:" + r)
return
}
vm.menuList = vm.getTreeMenus(r.data,0);
console.log(vm.menuList )
// 暂时不现实按钮权限
// window.permissions = r.perms;
});
},
getTreeMenus:function(data,parentId){
var tmpMenus = [];
for (var i = 0; i < data.length; i++) {
if(data[i].parentId==parentId){
data[i].childs = vm.getTreeMenus(data,data[i].id);
tmpMenus.push(data[i]);
}
}
//注释部分为狐大佬写的代码
// for (var i = 0; i < data.length; i++) {
// if (data[i].level == 1) {
// data[i].childs = [];
// tmpMenus.push(data[i]);
// }
// }
// for (var j = 0; j < tmpMenus.length; j++) {
// for (var i = 0; i < data.length; i++) {
// if(data[i].level== 1){
// continue
// }
// if (data[i].parentId == tmpMenus[j].id) {
// tmpMenus[j].childs.push(data[i]);
// }
// }
// }
return tmpMenus
},
```js
gtoken\gtoken.go:336:12: assignment mismatch: 2 variables but 1 values
gtoken\gtoken.go:352:28: cannot use token (type []byte) as type string in argument to gbase64.Encode
gtoken\gtoken.go:362:39: cannot use ([]byte)(token) (type []byte) as type string in argument to gbase64.Decode
exit status 2
Process exiting with code: 1
go 版本是1.11.1 gf版本是1.7.0
re:是gf版本的问题 升级到了1.7.3就ok了
在这个数据库下添加别的表,然后使用gf命令生成文件,会在xxx_model.go文件中报错m.M.Ctx undefined (type *gdb.Model has no field or method Ctx),请问您知道原因吗?
可以参考beego/amin的方式。数据库自动初始化。github.com/beego/admin
Page 分页查询查询方法,求总页数时好像没有考虑到记录数“刚好1页”和“多出1页,不足2页”的情况。
应该将:form.TotalPage = num / form.Rows
优化成:
if (num % form.Rows) != 0 {
form.TotalPage = (num / form.Rows) + 1
} else {
form.TotalPage = num / form.Rows
}
能否加入casbin的权限认证
就是从数据库表中自动生成增删改查代码和前端代码,提高开发效率
现有的代码基于GoFrame框架v1版本,考虑重构升级到gfv2吗
Hello 👋
I run a security community that finds and fixes vulnerabilities in OSS. A researcher (@cokeBeer) has found a potential issue, which I would be eager to share with you.
Could you add a SECURITY.md
file with an e-mail address for me to send further details to? GitHub recommends a security policy to ensure issues are responsibly disclosed, and it would help direct researchers in the future.
Looking forward to hearing from you 👍
(cc @huntr-helper)
Every time add a department ,the Id of the department default is 0, department.Model.Insert(entity) save fail
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.