feat:完善项目信息
This commit is contained in:
@ -18,7 +18,7 @@ func (a *Config) Index(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
data, err := controller.NewConfig()().Config(form.Kind, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
func (a *Config) Add(c *gin.Context) {
|
||||
@ -33,7 +33,7 @@ func (a *Config) Add(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
err := controller.NewConfig()().Add(form.Kind, form.Name, form.Key, form.Value)
|
||||
api.APIResponse(err)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
func (a *Config) Edit(c *gin.Context) {
|
||||
@ -45,5 +45,5 @@ func (a *Config) Edit(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
err := controller.NewConfig()().Form(form.Params)
|
||||
api.APIResponse(err)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
||||
@ -25,8 +25,7 @@ func (*Sys) IndustryForm(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
err := sys.NewIndustry()(api.GetSession()(c).(*session.Admin)).Form(&sys.IndustryParams{
|
||||
ID: form.IDStringForm.Convert(), PatentID: (&api.IDStringForm{ID: form.ParentID}).Convert(),
|
||||
Name: form.Name,
|
||||
ID: form.IDStringForm.Convert(), PatentID: (&api.IDStringForm{ID: form.ParentID}).Convert(), Name: form.Name,
|
||||
})
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -58,11 +57,11 @@ func (*Sys) NavigationForm(c *gin.Context) {
|
||||
api.IDStringForm
|
||||
api.TenantIDStringForm
|
||||
ParentID string `json:"parent_id" form:"parent_id"`
|
||||
Title string `json:"title" form:"title"`
|
||||
Link string `json:"link" form:"link"`
|
||||
Title string `json:"title" form:"title" binding:"required"`
|
||||
Link string `json:"link" form:"link" binding:"required"`
|
||||
IsTarget int `json:"is_target" form:"is_target"`
|
||||
Sort int `json:"sort" form:"sort"`
|
||||
Status int `json:"status" form:"status"`
|
||||
Status int `json:"status" form:"status" binding:"required"`
|
||||
}{}
|
||||
if err := api.Bind(form)(c); err != nil {
|
||||
api.APIFailure(err.(error))(c)
|
||||
|
||||
Reference in New Issue
Block a user