logic

package
v0.0.0-...-36d6084 Latest Latest
Warning

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

Go to latest
Published: May 20, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountIn

func AccountIn()

func CheckPhoneCode

func CheckPhoneCode(code, phoneNum string) bool

校验注册码

func CreateDotAccount

func CreateDotAccount()

创建dot账户

func PhoneNumberExists

func PhoneNumberExists(phoneNum string) bool

检测手机号已存在

func SendUserPhoneCode

func SendUserPhoneCode(phoneNum string) gin.H

发送注册码

func UserLogin

func UserLogin(phone, passwd string) gin.H

登录

func UserRegistration

func UserRegistration(name, phoneNum, passwd string) gin.H

注册

func WxChangeWalletStatus

func WxChangeWalletStatus(unionId string, status int) gin.H

func WxCheckHasWallet

func WxCheckHasWallet(unionId string) bool

func WxCheckLogin

func WxCheckLogin(code, data, iv string) (string, error)

*

微信用户登录session,使用status字段控制session可用性

func WxCreateUserAccount

func WxCreateUserAccount(accountName, walletName, passcode string, uid int64) (string, error)

func WxCreateUserWallet

func WxCreateUserWallet(unionId, passcode string) gin.H

第一次创建钱包,附带一个默认账户

func WxDoTransfer

func WxDoTransfer(unionId, to, amount, memo, passcode string) gin.H

func WxGetUserAccountLog

func WxGetUserAccountLog(unionId, page string) gin.H

func WxGetUserAccountLogDetail

func WxGetUserAccountLogDetail(unionId, tid string) gin.H

func WxGetUserDot

func WxGetUserDot(unionId string) gin.H

func WxGetUserDotAndRp

func WxGetUserDotAndRp(unionId string) gin.H

func WxGetUserRp

func WxGetUserRp(unionId string) gin.H

func WxGetUserWallet

func WxGetUserWallet(unionId string) gin.H

func WxImportUserAccount

func WxImportUserAccount()

@todo 支持用户导入账户密钥

func WxPreCreateAccount

func WxPreCreateAccount(unionId, accountName string)

@todo 支持单独创建账户行为

Types

type WxUserInfo

type WxUserInfo struct {
	Province  string `json:"province"`
	City      string `json:"city"`
	Country   string `json:"country"`
	UnionId   string `json:"unionId"`
	Gender    int    `json:"gender"`
	NickName  string `json:"nickName"`
	AvatarUrl string `json:"avatarUrl"`
	OpenId    string `json:"openId"`
}

func (*WxUserInfo) WxAutoRegister

func (wu *WxUserInfo) WxAutoRegister() error

自动注册

Jump to

Keyboard shortcuts

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