Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞一样的人
gin-vue-admin
提交
6e3c8bde
G
gin-vue-admin
项目概览
飞一样的人
/
gin-vue-admin
与 Fork 源项目一致
Fork自
FLIPPED-AURORA / gin-vue-admin
通知
1
Star
1
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,发现更多精彩内容 >>
提交
6e3c8bde
编写于
3月 11, 2020
作者:
Mr.奇淼(
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
shouldBind 修改为 shouldBindJSON 防止浏览器ajax交互时 content-type出现偶发性不同的问题
上级
15d17c7a
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
8 addition
and
8 deletion
+8
-8
QMPlusServer/controller/api/exa_fileUploadAndDownload.go
QMPlusServer/controller/api/exa_fileUploadAndDownload.go
+1
-1
QMPlusServer/controller/api/sys_authority.go
QMPlusServer/controller/api/sys_authority.go
+2
-2
QMPlusServer/controller/api/sys_casbin.go
QMPlusServer/controller/api/sys_casbin.go
+2
-2
QMPlusServer/controller/api/sys_system.go
QMPlusServer/controller/api/sys_system.go
+2
-2
QMPlusServer/controller/api/sys_workFlow.go
QMPlusServer/controller/api/sys_workFlow.go
+1
-1
未找到文件。
QMPlusServer/controller/api/exa_fileUploadAndDownload.go
浏览文件 @
6e3c8bde
...
...
@@ -56,7 +56,7 @@ func UploadFile(c *gin.Context) {
// @Router /fileUploadAndDownload/deleteFile [post]
func
DeleteFile
(
c
*
gin
.
Context
)
{
var
file
dbModel
.
ExaFileUploadAndDownload
_
=
c
.
ShouldBind
(
&
file
)
_
=
c
.
ShouldBind
JSON
(
&
file
)
err
,
f
:=
file
.
FindFile
()
if
err
!=
nil
{
servers
.
ReportFormat
(
c
,
false
,
fmt
.
Sprintf
(
"删除失败,%v"
,
err
),
gin
.
H
{})
...
...
QMPlusServer/controller/api/sys_authority.go
浏览文件 @
6e3c8bde
...
...
@@ -23,7 +23,7 @@ type CreateAuthorityParams struct {
// @Router /authority/createAuthority [post]
func
CreateAuthority
(
c
*
gin
.
Context
)
{
var
auth
sysModel
.
SysAuthority
_
=
c
.
ShouldBind
(
&
auth
)
_
=
c
.
ShouldBind
JSON
(
&
auth
)
err
,
authBack
:=
auth
.
CreateAuthority
()
if
err
!=
nil
{
servers
.
ReportFormat
(
c
,
false
,
fmt
.
Sprintf
(
"创建失败:%v"
,
err
),
gin
.
H
{
...
...
@@ -94,7 +94,7 @@ func GetAuthorityList(c *gin.Context) {
// @Router /authority/setDataAuthority [post]
func
SetDataAuthority
(
c
*
gin
.
Context
)
{
var
auth
sysModel
.
SysAuthority
_
=
c
.
ShouldBind
(
&
auth
)
_
=
c
.
ShouldBind
JSON
(
&
auth
)
err
:=
auth
.
SetDataAuthority
()
if
err
!=
nil
{
servers
.
ReportFormat
(
c
,
false
,
fmt
.
Sprintf
(
"设置关联失败,%v"
,
err
),
gin
.
H
{})
...
...
QMPlusServer/controller/api/sys_casbin.go
浏览文件 @
6e3c8bde
...
...
@@ -17,7 +17,7 @@ import (
// @Router /casbin/casbinPUpdata [post]
func
CasbinPUpdata
(
c
*
gin
.
Context
)
{
var
cmr
sysModel
.
CasbinInReceive
_
=
c
.
ShouldBind
(
&
cmr
)
_
=
c
.
ShouldBind
JSON
(
&
cmr
)
err
:=
new
(
sysModel
.
CasbinModel
)
.
CasbinPUpdata
(
cmr
.
AuthorityId
,
cmr
.
CasbinInfos
)
if
err
!=
nil
{
servers
.
ReportFormat
(
c
,
false
,
fmt
.
Sprintf
(
"添加规则失败,%v"
,
err
),
gin
.
H
{})
...
...
@@ -36,7 +36,7 @@ func CasbinPUpdata(c *gin.Context) {
// @Router /casbin/getPolicyPathByAuthorityId [post]
func
GetPolicyPathByAuthorityId
(
c
*
gin
.
Context
)
{
var
cmr
sysModel
.
CasbinInReceive
_
=
c
.
ShouldBind
(
&
cmr
)
_
=
c
.
ShouldBind
JSON
(
&
cmr
)
paths
:=
new
(
sysModel
.
CasbinModel
)
.
GetPolicyPathByAuthorityId
(
cmr
.
AuthorityId
)
servers
.
ReportFormat
(
c
,
true
,
"获取规则成功"
,
gin
.
H
{
"paths"
:
paths
})
}
QMPlusServer/controller/api/sys_system.go
浏览文件 @
6e3c8bde
...
...
@@ -31,7 +31,7 @@ func GetSystemConfig(c *gin.Context) {
// @Router /system/setSystemConfig [post]
func
SetSystemConfig
(
c
*
gin
.
Context
)
{
var
sys
sysModel
.
System
_
=
c
.
ShouldBind
(
&
sys
)
_
=
c
.
ShouldBind
JSON
(
&
sys
)
err
:=
sys
.
SetSystemConfig
()
if
err
!=
nil
{
servers
.
ReportFormat
(
c
,
false
,
fmt
.
Sprintf
(
"设置失败:%v"
,
err
),
gin
.
H
{})
...
...
@@ -49,7 +49,7 @@ func SetSystemConfig(c *gin.Context) {
// @Router /system/ReloadSystem [post]
func
ReloadSystem
(
c
*
gin
.
Context
)
{
var
sys
sysModel
.
System
_
=
c
.
ShouldBind
(
&
sys
)
_
=
c
.
ShouldBind
JSON
(
&
sys
)
err
:=
sys
.
SetSystemConfig
()
if
err
!=
nil
{
servers
.
ReportFormat
(
c
,
false
,
fmt
.
Sprintf
(
"设置失败:%v"
,
err
),
gin
.
H
{})
...
...
QMPlusServer/controller/api/sys_workFlow.go
浏览文件 @
6e3c8bde
...
...
@@ -15,7 +15,7 @@ import (
// @Router /workflow/createWorkFlow [post]
func
CreateWorkFlow
(
c
*
gin
.
Context
)
{
var
wk
sysModel
.
SysWorkflow
_
=
c
.
ShouldBind
(
&
wk
)
_
=
c
.
ShouldBind
JSON
(
&
wk
)
err
:=
wk
.
Create
()
if
err
!=
nil
{
servers
.
ReportFormat
(
c
,
false
,
fmt
.
Sprintf
(
"获取失败:%v"
,
err
),
gin
.
H
{})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录