index

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const AUTH_SUCCESS_CODE = 0
View Source
const DEFAULT_PLATFORM = "wechat-mini" // 默认微信平台

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService added in v1.0.1

type AuthService struct {
	Code string `form:"code" json:"code" binding:"required"`
}

func (*AuthService) Auth added in v1.0.1

func (authService *AuthService) Auth(c *gin.Context) (bool, result.Response)

获取授权

type LoginService

type LoginService struct {
	Openid     string `form:"openid" json:"openid" binding:"required,min=28,max=32"`
	Platform   string `form:"platform" json:"platform" binding:"required"`
	NickName   string `form:"nick_name" json:"nick_name" binding:"-"`
	HeadImg    string `form:"head_img" json:"head_img" binding:"-"`
	SessionKey string `form:"session_key" json:"session_key" binding:"-"`
}

做模型参数的绑定校验

func (*LoginService) Login

func (loginService *LoginService) Login(c *gin.Context) (bool, result.Response)

登录方法

Jump to

Keyboard shortcuts

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