beego学习笔记(4):开发文档阅读(5)
2018-07-01 12:46 很大很老实 阅读(243) 评论(0) 编辑 收藏 举报controller的逻辑:
我们看下面的代码,就知道怎么传值的:
import ( "github.com/astaxie/beego" ) type MainController struct { beego.Controller } func (this *MainController) Get() { this.Data["Website"] = "beego.me" this.Data["Email"] = "astaxie@gmail.com" this.TplName = "index.tpl" }