2022-11-24 23:37:34 +08:00
|
|
|
// Package common
|
|
|
|
// @Link https://github.com/bufanyun/hotgo
|
2023-02-23 17:53:04 +08:00
|
|
|
// @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"
|
2023-05-14 23:55:16 +08:00
|
|
|
"hotgo/internal/model"
|
2022-11-24 23:37:34 +08:00
|
|
|
"hotgo/internal/model/input/adminin"
|
|
|
|
)
|
|
|
|
|
|
|
|
// LoginLogoutReq 注销登录
|
|
|
|
type LoginLogoutReq struct {
|
2023-05-12 16:20:22 +08:00
|
|
|
g.Meta `path:"/site/logout" method:"post" tags:"后台基础" summary:"注销登录"`
|
2022-11-24 23:37:34 +08:00
|
|
|
}
|
2023-06-05 20:14:57 +08:00
|
|
|
|
2022-11-24 23:37:34 +08:00
|
|
|
type LoginLogoutRes struct{}
|
|
|
|
|
2023-05-14 23:55:16 +08:00
|
|
|
// RegisterReq 提交账号注册
|
|
|
|
type RegisterReq struct {
|
|
|
|
g.Meta `path:"/site/register" method:"post" tags:"后台基础" summary:"账号注册"`
|
|
|
|
adminin.RegisterInp
|
|
|
|
}
|
2023-06-05 20:14:57 +08:00
|
|
|
|
2023-05-14 23:55:16 +08:00
|
|
|
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:"获取登录验证码"`
|
|
|
|
}
|
2023-06-05 20:14:57 +08:00
|
|
|
|
2022-11-24 23:37:34 +08:00
|
|
|
type LoginCaptchaRes struct {
|
|
|
|
Cid string `json:"cid" dc:"验证码ID"`
|
|
|
|
Base64 string `json:"base64" dc:"验证码"`
|
|
|
|
}
|
|
|
|
|
2023-05-14 23:55:16 +08:00
|
|
|
// AccountLoginReq 提交账号登录
|
|
|
|
type AccountLoginReq struct {
|
|
|
|
g.Meta `path:"/site/accountLogin" method:"post" tags:"后台基础" summary:"账号登录"`
|
|
|
|
adminin.AccountLoginInp
|
2022-11-24 23:37:34 +08:00
|
|
|
}
|
2023-06-05 20:14:57 +08:00
|
|
|
|
2023-05-14 23:55:16 +08:00
|
|
|
type AccountLoginRes struct {
|
|
|
|
*adminin.LoginModel
|
|
|
|
}
|
|
|
|
|
|
|
|
// MobileLoginReq 提交手机号登录
|
|
|
|
type MobileLoginReq struct {
|
|
|
|
g.Meta `path:"/site/mobileLogin" method:"post" tags:"后台基础" summary:"手机号登录"`
|
|
|
|
adminin.MobileLoginInp
|
|
|
|
}
|
2023-06-05 20:14:57 +08:00
|
|
|
|
2023-05-14 23:55:16 +08:00
|
|
|
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:"获取配置"`
|
|
|
|
}
|
2023-06-05 20:14:57 +08:00
|
|
|
|
2022-11-24 23:37:34 +08:00
|
|
|
type SiteConfigRes struct {
|
2023-05-14 23:55:16 +08:00
|
|
|
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:"获取登录配置"`
|
|
|
|
}
|
2023-06-05 20:14:57 +08:00
|
|
|
|
2023-05-14 23:55:16 +08:00
|
|
|
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"`
|
|
|
|
}
|
2023-06-05 20:14:57 +08:00
|
|
|
|
2022-11-24 23:37:34 +08:00
|
|
|
type SitePingRes struct{}
|