controller

package
v0.0.0-...-a82cf68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DelImage

func DelImage(c *gin.Context)

删除已上传表情包图片

func Emoticons

func Emoticons(c *gin.Context)

获取表情包

func NewEmoticons

func NewEmoticons(c *gin.Context)

用户发布表情包

func NewUser

func NewUser(c *gin.Context)

微信授权之后创建用户

func Response

func Response(c *gin.Context, code int, data DoutuResponse)

请求返回

func UploadImage

func UploadImage(c *gin.Context)

上传表情包图片接口

func WechatAuth

func WechatAuth(c *gin.Context)

微信授权

Types

type DoutuResponse

type DoutuResponse struct {
	Status  bool        `json:"status"`  // 成功失败标志;true:成功 、false:失败
	Data    interface{} `json:"data"`    // 返回数据
	Message string      `json:"message"` // 提示信息
}

返回结果

type EmoticonsRequest

type EmoticonsRequest struct {
	Url                 string `json:"url"`                  // 表情包链接地址
	EmoticonsTypeID     int64  `json:"emoticons_type_id"`    // 表情包类型ID
	GroupingTitle       string `json:"crouping_title"`       // 表情包图组标题
	GroupingDescription string `json:"crouping_description"` // 表情包图组描述
	OpenID              string `json:"open_id"`              // 微信用户唯一ID
}

表情包请求参数

type NewUserReq

type NewUserReq struct {
	Sex      int64  `json:"sex"`      // 性别 0:未知 1:男 2:女
	Avatar   string `json:"avatar"`   // 头像
	Nickname string `json:"nickname"` // 微信用户昵称
	OpenID   string `json:"open_id"`  // 微信用户唯一标识
	Country  string `json:"country"`  // 所在国家
	Province string `json:"province"` // 所在省份
	City     string `json:"city"`     // 所在城市
}

微信更新用户信息

type WechatAuthReq

type WechatAuthReq struct {
	Code string `json:"code"` // 临时登录凭证
}

微信授权参数

type WechatAuthResponse

type WechatAuthResponse struct {
	OpenID string `json:"open_id"` // 微信用户唯一标识
	Errmsg string `json:"errmsg"`  // 错误信息
}

微信授权返回参数

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL