mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 13:03:22 +08:00
增加前台模块,添加实例html模板页面
This commit is contained in:
29
server/internal/controller/home/base/site.go
Normal file
29
server/internal/controller/home/base/site.go
Normal file
@@ -0,0 +1,29 @@
|
||||
// Package base
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2022 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package base
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"hotgo/api/home/base"
|
||||
"hotgo/internal/consts"
|
||||
"hotgo/internal/model"
|
||||
"hotgo/internal/service"
|
||||
)
|
||||
|
||||
// Site 基础
|
||||
var Site = cSite{}
|
||||
|
||||
type cSite struct{}
|
||||
|
||||
func (a *cSite) Index(ctx context.Context, req *base.SiteIndexReq) (res *base.SiteIndexRes, err error) {
|
||||
service.View().Render(ctx, model.View{Data: g.Map{
|
||||
"name": "HotGo",
|
||||
"version": consts.VersionApp,
|
||||
}})
|
||||
return
|
||||
}
|
Reference in New Issue
Block a user