Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
nizhengjia888
gin-vue-admin
提交
5254e752
G
gin-vue-admin
项目概览
nizhengjia888
/
gin-vue-admin
与 Fork 源项目一致
Fork自
FLIPPED-AURORA / gin-vue-admin
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
5254e752
编写于
5月 09, 2021
作者:
Mr.奇淼(
提交者:
GitHub
5月 09, 2021
浏览文件
操作
浏览文件
下载
差异文件
修复了已知bug casbin版本降级提升兼容性
Gva gormv2 dev
上级
fde318d3
278635bf
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
174 addition
and
169 deletion
+174
-169
server/config.yaml
server/config.yaml
+6
-6
server/go.mod
server/go.mod
+2
-2
server/source/casbin.go
server/source/casbin.go
+148
-148
web/src/main.js
web/src/main.js
+2
-2
web/src/permission.js
web/src/permission.js
+13
-7
web/src/view/login/login.vue
web/src/view/login/login.vue
+2
-3
web/src/view/superAdmin/user/user.vue
web/src/view/superAdmin/user/user.vue
+1
-1
未找到文件。
server/config.yaml
浏览文件 @
5254e752
...
...
@@ -84,14 +84,14 @@ autocode:
web-form
:
/view
web-table
:
/view
# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket
�?
域名地址)
# qiniu configuration (请自行七牛申请对应的 公钥 私钥 bucket
和
域名地址)
qiniu
:
zone
:
'
ZoneHua
d
ong'
bucket
:
'
qm-plus-img
'
img-path
:
'
http://qmplusimg.henrongyi.top
'
zone
:
'
ZoneHua
D
ong'
bucket
:
'
'
img-path
:
'
'
use-https
:
false
access-key
:
'
25j8dYBZ2wuiy0yhwShytjZDTX662b8xiFguwxzZ
'
secret-key
:
'
pgdbqEsf7ooZh7W3xokP833h3dZ_VecFXPDeG5JY
'
access-key
:
'
'
secret-key
:
'
'
use-cdn-domains
:
false
...
...
server/go.mod
浏览文件 @
5254e752
...
...
@@ -8,8 +8,8 @@ require (
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
github.com/aliyun/aliyun-oss-go-sdk v2.1.6+incompatible
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect
github.com/casbin/casbin/v2 v2.
25.6
github.com/casbin/gorm-adapter/v3 v3.
2.6
github.com/casbin/casbin/v2 v2.
11.0
github.com/casbin/gorm-adapter/v3 v3.
0.2
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 // indirect
github.com/fsnotify/fsnotify v1.4.9
...
...
server/source/casbin.go
浏览文件 @
5254e752
此差异已折叠。
点击以展开。
web/src/main.js
浏览文件 @
5254e752
...
...
@@ -151,7 +151,7 @@ console.log(`
欢迎使用 Gin-Vue-Admin
当前版本:V2.4.1
加群方式:微信:shouzi_1994 QQ群:622360840
默认自动化文档地址:http://127.0.0.1:
`
+
process
.
env
.
VUE_APP_SERVER_PORT
+
`
/swagger/index.html
默认前端文件运行地址:http://127.0.0.1:
`
+
process
.
env
.
VUE_APP_CLI_PORT
`
默认自动化文档地址:http://127.0.0.1:
${
process
.
env
.
VUE_APP_SERVER_PORT
}
/swagger/index.html
默认前端文件运行地址:http://127.0.0.1:
${
process
.
env
.
VUE_APP_CLI_PORT
}
如果项目让您获得了收益,希望您能请团队喝杯可乐:https://www.gin-vue-admin.com/docs/coffee
`
)
\ No newline at end of file
web/src/permission.js
浏览文件 @
5254e752
...
...
@@ -4,11 +4,11 @@ import getPageTitle from '@/utils/page'
let
asyncRouterFlag
=
0
const
whiteList
=
[
'
login
'
,
'
init
'
]
router
.
beforeEach
(
async
(
to
,
from
,
next
)
=>
{
const
whiteList
=
[
'
login
'
,
'
init
'
]
router
.
beforeEach
(
async
(
to
,
from
,
next
)
=>
{
const
token
=
store
.
getters
[
'
user/token
'
]
// 在白名单中的判断情况
//修改网页标签名称
// 在白名单中的判断情况
//修改网页标签名称
document
.
title
=
getPageTitle
(
to
.
meta
.
title
)
if
(
whiteList
.
indexOf
(
to
.
name
)
>
-
1
)
{
if
(
token
)
{
...
...
@@ -24,10 +24,16 @@ router.beforeEach(async(to, from, next) => {
asyncRouterFlag
++
await
store
.
dispatch
(
'
router/SetAsyncRouter
'
)
const
asyncRouters
=
store
.
getters
[
'
router/asyncRouters
'
]
router
.
addRoutes
(
asyncRouters
)
next
({...
to
,
replace
:
true
})
asyncRouters
.
forEach
(
item
=>
{
router
.
addRoute
(
item
)
})
next
({
...
to
,
replace
:
true
})
}
else
{
next
()
if
(
to
.
matched
.
length
)
{
next
()
}
else
{
next
({
path
:
"
/layout/404
"
})
}
}
}
// 不在白名单中并且未登陆的时候
...
...
web/src/view/login/login.vue
浏览文件 @
5254e752
...
...
@@ -7,7 +7,6 @@
</div>
<div
class=
"header"
>
<a
href=
"/"
>
<!--
<img
src=
"~@/assets/logo.png"
class=
"logo"
alt=
"logo"
/>
-->
<span
class=
"title"
>
Gin-Vue-Admin
</span>
</a>
</div>
...
...
@@ -91,14 +90,14 @@ export default {
name
:
"
Login
"
,
data
()
{
const
checkUsername
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
.
length
<
5
||
value
.
length
>
12
)
{
if
(
value
.
length
<
5
)
{
return
callback
(
new
Error
(
"
请输入正确的用户名
"
));
}
else
{
callback
();
}
};
const
checkPassword
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
.
length
<
6
||
value
.
length
>
12
)
{
if
(
value
.
length
<
6
)
{
return
callback
(
new
Error
(
"
请输入正确的密码
"
));
}
else
{
callback
();
...
...
web/src/view/superAdmin/user/user.vue
浏览文件 @
5254e752
...
...
@@ -121,7 +121,7 @@ export default {
rules
:
{
username
:
[
{
required
:
true
,
message
:
"
请输入用户名
"
,
trigger
:
"
blur
"
},
{
min
:
6
,
message
:
"
最低6
位字符
"
,
trigger
:
"
blur
"
}
{
min
:
5
,
message
:
"
最低5
位字符
"
,
trigger
:
"
blur
"
}
],
password
:
[
{
required
:
true
,
message
:
"
请输入用户密码
"
,
trigger
:
"
blur
"
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录