12345678910111213141516171819202122 |
- /*
- * @description: 树接口相关
- * @Author: CP
- * @Date: 2020-09-17 15:00:25
- * @FilePath: \construction_management\web\controllers\api_tree.go
- */
- package controllers
- // 文件夹目录 树结构
- func (c *ApiController) GetTreeJson() {
- // 获得层级文件夹
- // projectId, err := c.Ctx.Values().GetInt("projectId")
- // if err != nil {
- // projectId = 0
- // }
- TreeData := c.ServiceTree.GetAllProject(23)
- // Jsondata, _ := json.Marshal(TreeData)
- // fmt.Println(string(Jsondata))
- c.Ctx.JSON(TreeData) // or myjsonStruct{hello:"json}
- }
|