mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-10 11:13:44 +08:00
发布v2.2.10版本,更新内容请查看:https://github.com/bufanyun/hotgo/tree/v2.0/docs/guide-zh-CN/addon-version-upgrade.md
This commit is contained in:
39
server/api/admin/common/console.go
Normal file
39
server/api/admin/common/console.go
Normal file
@@ -0,0 +1,39 @@
|
||||
// Package common
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package common
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
// ConsoleStatReq 控制台统计
|
||||
type ConsoleStatReq struct {
|
||||
g.Meta `path:"/console/stat" method:"get" tags:"控制台" summary:"综合数据统计"`
|
||||
}
|
||||
type ConsoleStatRes struct {
|
||||
Visits struct {
|
||||
DayVisits float64 `json:"dayVisits"`
|
||||
Rise float64 `json:"rise"`
|
||||
Decline float64 `json:"decline"`
|
||||
Amount float64 `json:"amount"`
|
||||
} `json:"visits"`
|
||||
Saleroom struct {
|
||||
WeekSaleroom float64 `json:"weekSaleroom"`
|
||||
Amount float64 `json:"amount"`
|
||||
Degree float64 `json:"degree"`
|
||||
} `json:"saleroom"`
|
||||
OrderLarge struct {
|
||||
WeekLarge float64 `json:"weekLarge"`
|
||||
Rise float64 `json:"rise"`
|
||||
Decline float64 `json:"decline"`
|
||||
Amount float64 `json:"amount"`
|
||||
} `json:"orderLarge"`
|
||||
Volume struct {
|
||||
WeekLarge float64 `json:"weekLarge"`
|
||||
Rise float64 `json:"rise"`
|
||||
Decline float64 `json:"decline"`
|
||||
Amount float64 `json:"amount"`
|
||||
} `json:"volume"`
|
||||
}
|
||||
26
server/api/admin/common/ems.go
Normal file
26
server/api/admin/common/ems.go
Normal file
@@ -0,0 +1,26 @@
|
||||
// Package common
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package common
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SendTestEmailReq 发送测试邮件
|
||||
type SendTestEmailReq struct {
|
||||
To string `json:"to" v:"required#接收者邮件不能为空" dc:"接收者邮件,多个用;隔开"`
|
||||
g.Meta `path:"/ems/sendTest" tags:"邮件" method:"post" summary:"发送测试邮件"`
|
||||
}
|
||||
type SendTestEmailRes struct {
|
||||
}
|
||||
|
||||
// SendBindEmsReq 发送换绑邮件
|
||||
type SendBindEmsReq struct {
|
||||
g.Meta `path:"/ems/sendBind" tags:"邮件" method:"post" summary:"发送换绑邮件"`
|
||||
}
|
||||
type SendBindEmsRes struct {
|
||||
}
|
||||
57
server/api/admin/common/site.go
Normal file
57
server/api/admin/common/site.go
Normal file
@@ -0,0 +1,57 @@
|
||||
// Package common
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @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/input/adminin"
|
||||
)
|
||||
|
||||
// LoginLogoutReq 注销登录
|
||||
type LoginLogoutReq struct {
|
||||
g.Meta `path:"/site/logout" method:"get" tags:"后台基础" summary:"注销登录"`
|
||||
}
|
||||
type LoginLogoutRes struct{}
|
||||
|
||||
// LoginCaptchaReq 获取登录验证码
|
||||
type LoginCaptchaReq struct {
|
||||
g.Meta `path:"/site/captcha" method:"get" tags:"后台基础" summary:"获取登录验证码"`
|
||||
}
|
||||
|
||||
type LoginCaptchaRes struct {
|
||||
Cid string `json:"cid" dc:"验证码ID"`
|
||||
Base64 string `json:"base64" dc:"验证码"`
|
||||
}
|
||||
|
||||
// LoginReq 提交登录
|
||||
type LoginReq struct {
|
||||
g.Meta `path:"/site/login" method:"post" tags:"后台基础" summary:"账号登录"`
|
||||
Username string `json:"username" v:"required#用户名不能为空" dc:"用户名"`
|
||||
Password string `json:"password" v:"required#密码不能为空" dc:"密码"`
|
||||
Cid string `json:"cid" dc:"验证码ID"`
|
||||
Code string `json:"code" dc:"验证码"`
|
||||
IsLock bool `json:"isLock" dc:"是否为锁屏状态"`
|
||||
}
|
||||
type LoginRes struct {
|
||||
*adminin.MemberLoginModel
|
||||
}
|
||||
|
||||
// SiteConfigReq 获取配置
|
||||
type SiteConfigReq struct {
|
||||
g.Meta `path:"/site/config" method:"get" tags:"后台基础" summary:"获取配置"`
|
||||
}
|
||||
type SiteConfigRes struct {
|
||||
Version string `json:"version" dc:"系统版本"`
|
||||
WsAddr string `json:"wsAddr" dc:"客户端websocket地址"`
|
||||
Domain string `json:"domain" dc:"对外域名"`
|
||||
}
|
||||
|
||||
// SitePingReq ping
|
||||
type SitePingReq struct {
|
||||
g.Meta `path:"/site/ping" method:"get" tags:"后台基础" summary:"ping"`
|
||||
}
|
||||
type SitePingRes struct{}
|
||||
26
server/api/admin/common/sms.go
Normal file
26
server/api/admin/common/sms.go
Normal file
@@ -0,0 +1,26 @@
|
||||
// Package common
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @Author Ms <133814250@qq.com>
|
||||
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||||
//
|
||||
package common
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
// SendTestSmsReq 发送测试短信
|
||||
type SendTestSmsReq struct {
|
||||
Event string `json:"event" v:"required#事件模板不能为空" dc:"事件模板"`
|
||||
Mobile string `json:"mobile" v:"required#接收手机号不能为空" dc:"接收手机号"`
|
||||
Code string `json:"code" v:"required#接收验证码不能为空" dc:"接收验证码"`
|
||||
g.Meta `path:"/sms/sendTest" tags:"短信" method:"post" summary:"发送测试短信"`
|
||||
}
|
||||
type SendTestSmsRes struct {
|
||||
}
|
||||
|
||||
// SendBindSmsReq 发送换绑短信
|
||||
type SendBindSmsReq struct {
|
||||
g.Meta `path:"/sms/sendBind" tags:"短信" method:"post" summary:"发送换绑短信"`
|
||||
}
|
||||
type SendBindSmsRes struct {
|
||||
}
|
||||
26
server/api/admin/common/upload.go
Normal file
26
server/api/admin/common/upload.go
Normal file
@@ -0,0 +1,26 @@
|
||||
// Package common
|
||||
// @Link https://github.com/bufanyun/hotgo
|
||||
// @Copyright Copyright (c) 2023 HotGo CLI
|
||||
// @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/input/sysin"
|
||||
)
|
||||
|
||||
// UploadImageReq 上传图片
|
||||
type UploadImageReq struct {
|
||||
g.Meta `path:"/upload/image" tags:"上传" method:"post" summary:"上传图片"`
|
||||
}
|
||||
|
||||
type UploadImageRes *sysin.AttachmentListModel
|
||||
|
||||
// UploadFileReq 上传文件
|
||||
type UploadFileReq struct {
|
||||
g.Meta `path:"/upload/file" tags:"上传" method:"post" summary:"上传附件"`
|
||||
}
|
||||
|
||||
type UploadFileRes *sysin.AttachmentListModel
|
||||
Reference in New Issue
Block a user