2022-12-15 16:12:08 +08:00
|
|
|
// Package base
|
|
|
|
// @Link https://github.com/bufanyun/hotgo
|
2023-02-23 17:53:04 +08:00
|
|
|
// @Copyright Copyright (c) 2023 HotGo CLI
|
2022-12-15 16:12:08 +08:00
|
|
|
// @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{}
|
|
|
|
|
2023-05-15 10:17:04 +08:00
|
|
|
func (a *cSite) Index(ctx context.Context, _ *base.SiteIndexReq) (res *base.SiteIndexRes, err error) {
|
2022-12-15 16:12:08 +08:00
|
|
|
service.View().Render(ctx, model.View{Data: g.Map{
|
|
|
|
"name": "HotGo",
|
|
|
|
"version": consts.VersionApp,
|
2023-01-18 16:23:39 +08:00
|
|
|
"debug": g.Cfg().MustGet(ctx, "hotgo.debug", true),
|
2022-12-15 16:12:08 +08:00
|
|
|
}})
|
|
|
|
return
|
|
|
|
}
|