hotime/example/app/tag.go
2022-02-19 21:38:17 +08:00

33 lines
589 B
Go

package app
import (
. "../../../hotime"
. "../../common"
)
var tagCtr = Ctr{
"ctg_tree": func(this *Context) {
//orgId := ObjToInt(this.Req.FormValue("org_id"))
//if orgId == 0 {
// this.Display(3, "参数错误")
// return
//}
data := Map{}
run := func(t int) []Map {
//upCtg:=this.Db.Select("tag_ctg","*",Map{"parent_id":id})
//for _,v:=range upCtg{
upTag := this.Db.Select("tag", "*", Map{"type": t})
//v["tag"]=upTag
//}
return upTag
}
data["upload"] = run(1)
data["api"] = run(2)
data["analyse"] = run(0)
this.Display(0, data)
},
}