RouterVcode

package
v5.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckImage

func CheckImage(c *gin.Context, value string) bool

CheckImage 检查图形验证码

func CheckSMS

func CheckSMS(c *gin.Context, value string, phoneData ParamsPhoneType) (BaseSMS.FieldsSMS, bool)

CheckSMS 检查短信验证码

func CheckSMS2

func CheckSMS2(c any, value string, phoneData ParamsPhoneType) (BaseSMS.FieldsSMS, bool)

CheckSMS2 检查短信验证码

Types

type ParamsPhoneType

type ParamsPhoneType struct {
	//组织ID
	OrgID int64 `db:"org_id" json:"orgID" check:"id" empty:"true"`
	//是否验证手机号一致性
	// 如果没有启动,则token可以用不同手机号发起验证,验证时不会二次对手机号核对,请慎重关闭
	// 可用于登陆时,关闭后可实现跳过验证手机号一致性,直接完成登陆操作
	Allow bool `json:"allow"`
	//手机区号和手机号
	NationCode string `json:"nationCode"`
	Phone      string `json:"phone"`
}

ParamsPhoneType 需要验证手机号匹配的参数

Jump to

Keyboard shortcuts

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