business

package
v2.0.0-...-b8b727e Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Business

type Business struct {
	*context.Context
}

Business 业务

func NewBusiness

func NewBusiness(ctx *context.Context) *Business

NewBusiness init

func (*Business) GetPhoneNumber

func (business *Business) GetPhoneNumber(in *GetPhoneNumberRequest) (info PhoneInfo, err error)

GetPhoneNumber code换取用户手机号。 每个code只能使用一次,code的有效期为5min

type GetPhoneNumberRequest

type GetPhoneNumberRequest struct {
	Code string `json:"code"` // 手机号获取凭证
}

GetPhoneNumberRequest 获取手机号请求

type PhoneInfo

type PhoneInfo struct {
	PhoneNumber     string `json:"phoneNumber"`     // 用户绑定的手机号(国外手机号会有区号)
	PurePhoneNumber string `json:"purePhoneNumber"` // 没有区号的手机号
	CountryCode     string `json:"countryCode"`     // 区号
	Watermark       struct {
		AppID     string `json:"appid"`     // 小程序appid
		Timestamp int64  `json:"timestamp"` // 用户获取手机号操作的时间戳
	} `json:"watermark"`
}

PhoneInfo 手机号信息

Jump to

Keyboard shortcuts

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