no message
parent
81d522ac2b
commit
5946bb805d
|
@ -17,6 +17,7 @@ import (
|
|||
type DocTree struct{
|
||||
ID int64 `json:"id"`
|
||||
Label string `json:"label"`
|
||||
Level int `json:"level"`
|
||||
Children []*DocTree `json:"children"`
|
||||
}
|
||||
|
||||
|
@ -44,6 +45,7 @@ func InitDocCache(){
|
|||
for _,v := range articles{
|
||||
tmp := new (DocTree)
|
||||
tmp.ID = v.ID
|
||||
tmp.Level = int(v.Level)
|
||||
tmp.Label = v.Title
|
||||
tmp.Children = make([]*DocTree,0)
|
||||
gDocMapCache[int(v.ID)] = tmp
|
||||
|
@ -52,6 +54,7 @@ func InitDocCache(){
|
|||
tmp := new (DocTree)
|
||||
tmp.ID = v.ID
|
||||
tmp.Label = v.Title
|
||||
tmp.Level = int(v.Level)
|
||||
tmp.Children = make([]*DocTree,0)
|
||||
gDocMapCache[int(v.ID)] = tmp
|
||||
}
|
||||
|
@ -487,6 +490,8 @@ func AddArticleTree(c *gin.Context) {
|
|||
rsp.Msg = "title required"
|
||||
return
|
||||
}
|
||||
log.Print(req.Level)
|
||||
|
||||
e := model.CreateDocTree(
|
||||
model.DocTree{
|
||||
Type: int32(req.Type),
|
||||
|
|
Loading…
Reference in New Issue