hotgo/server/api/admin/common/site.go

88 lines
2.3 KiB
Go
Raw Normal View History

2022-11-24 23:37:34 +08:00
// Package common
// @Link https://github.com/bufanyun/hotgo
// @Copyright Copyright (c) 2023 HotGo CLI
2022-11-24 23:37:34 +08:00
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
package common
import (
"github.com/gogf/gf/v2/frame/g"
"hotgo/internal/model"
2022-11-24 23:37:34 +08:00
"hotgo/internal/model/input/adminin"
)
// LoginLogoutReq 注销登录
type LoginLogoutReq struct {
g.Meta `path:"/site/logout" method:"post" tags:"后台基础" summary:"注销登录"`
2022-11-24 23:37:34 +08:00
}
2022-11-24 23:37:34 +08:00
type LoginLogoutRes struct{}
// RegisterReq 提交账号注册
type RegisterReq struct {
g.Meta `path:"/site/register" method:"post" tags:"后台基础" summary:"账号注册"`
adminin.RegisterInp
}
type RegisterRes struct {
*adminin.LoginModel
}
2022-11-24 23:37:34 +08:00
// LoginCaptchaReq 获取登录验证码
type LoginCaptchaReq struct {
g.Meta `path:"/site/captcha" method:"get" tags:"后台基础" summary:"获取登录验证码"`
}
2022-11-24 23:37:34 +08:00
type LoginCaptchaRes struct {
Cid string `json:"cid" dc:"验证码ID"`
Base64 string `json:"base64" dc:"验证码"`
}
// AccountLoginReq 提交账号登录
type AccountLoginReq struct {
g.Meta `path:"/site/accountLogin" method:"post" tags:"后台基础" summary:"账号登录"`
adminin.AccountLoginInp
2022-11-24 23:37:34 +08:00
}
type AccountLoginRes struct {
*adminin.LoginModel
}
// MobileLoginReq 提交手机号登录
type MobileLoginReq struct {
g.Meta `path:"/site/mobileLogin" method:"post" tags:"后台基础" summary:"手机号登录"`
adminin.MobileLoginInp
}
type MobileLoginRes struct {
*adminin.LoginModel
2022-11-24 23:37:34 +08:00
}
// SiteConfigReq 获取配置
type SiteConfigReq struct {
g.Meta `path:"/site/config" method:"get" tags:"后台基础" summary:"获取配置"`
}
2022-11-24 23:37:34 +08:00
type SiteConfigRes struct {
Version string `json:"version" dc:"系统版本"`
WsAddr string `json:"wsAddr" dc:"客户端websocket地址"`
Domain string `json:"domain" dc:"对外域名"`
//InviteUrl string `json:"inviteUrl" dc:"邀请注册地址"`
}
// SiteLoginConfigReq 获取登录配置
type SiteLoginConfigReq struct {
g.Meta `path:"/site/loginConfig" method:"get" tags:"后台基础" summary:"获取登录配置"`
}
type SiteLoginConfigRes struct {
*model.LoginConfig
2022-11-24 23:37:34 +08:00
}
// SitePingReq ping
type SitePingReq struct {
g.Meta `path:"/site/ping" method:"get" tags:"后台基础" summary:"ping"`
}
2022-11-24 23:37:34 +08:00
type SitePingRes struct{}