beego学习笔记(4):开发文档阅读(5)
2018-07-01 12:46 很大很老实 阅读(246) 评论(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"
}
浙公网安备 33010602011771号