123456789101112131415161718192021222324252627 |
- package controllers
- import (
- "cc-officialweb/service"
- beego "github.com/beego/beego/v2/server/web"
- )
- type AboutController struct {
- beego.Controller
- }
- func (a *AboutController) Get() {
- about, err := service.GetRecruit("about")
- if err != nil {
- a.Data["content"] = "暂无内容"
- } else {
- a.Data["content"] = about
- }
- var success []string
- //获取成功案例轮播图
- exams := service.GetResource("example")
- for _, v := range exams {
- success = append(success, v.Url)
- }
- a.Data["example"] = success
- a.TplName = "about.html"
- }
|