新增游戏图标,用户头像上传功能

This commit is contained in:
chy
2025-06-12 10:19:27 +08:00
parent f7cffcae21
commit cc8646156a
8 changed files with 117 additions and 5 deletions

View File

@ -1,6 +1,8 @@
package v1
import "github.com/gogf/gf/v2/frame/g"
import (
"github.com/gogf/gf/v2/frame/g"
)
type ListReq struct {
g.Meta `path:"/game" method:"get" tags:"Game" summary:"(系统、商户门店后台、PC)获取游戏列表"`

View File

@ -12,4 +12,6 @@ import (
type IUploadV1 interface {
Upload(ctx context.Context, req *v1.UploadReq) (res *v1.UploadRes, err error)
UploadGameImg(ctx context.Context, req *v1.UploadGameImgReq) (res *v1.UploadGameImgRes, err error)
UploadUserImg(ctx context.Context, req *v1.UploadUserImgReq) (res *v1.UploadUserImgRes, err error)
}

View File

@ -12,3 +12,20 @@ type UploadReq struct {
type UploadRes struct {
Url string `json:"url"`
}
type UploadGameImgReq struct {
g.Meta `path:"/upload/game" method:"post" tags:"WEB" summary:"上传游戏图标文件"`
File *ghttp.UploadFile `json:"file"`
}
type UploadGameImgRes struct {
Url string `json:"url"`
}
type UploadUserImgReq struct {
g.Meta `path:"/upload/user" method:"post" tags:"WEB" summary:"上传用户头像文件"`
File *ghttp.UploadFile `json:"file"`
}
type UploadUserImgRes struct {
Url string `json:"url"`
}