AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
## 实例代码 ~~~ package controllers import ( "github.com/astaxie/beego" ) type MainController struct { beego.Controller } type User struct { Id int `json:"id"` Name string `json:"name"` Age int `json:"age"` Title string `json:"title"` Desc string `json:"desc"` } type Jsons struct { Code int `json:"code"` Message string `json:"message"` List interface{} `json:"list"` } func (c *MainController) Get() { user := []User{ { 1, "Name1", 18, "title", "desc", }, { 2, "Name2", 18, "title2", "desc2", }, { 3, "Name3", 18, "title3", "desc3", }, { 4, "Name4", 18, "title4", "desc4", }, } json := Jsons{200, "获取成功", user} c.Data["json"] = json c.ServeJSON() } ~~~