js

package
v1.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AppID     string `json:"app_id"`
	Timestamp int64  `json:"timestamp"`
	NonceStr  string `json:"nonce_str"`
	Signature string `json:"signature"`
}

Config 返回给用户jssdk配置信息

type Js

type Js struct {
	*context.Context
}

Js struct

func NewJs

func NewJs(context *context.Context) *Js

NewJs init

func (*Js) GetConfig

func (js *Js) GetConfig(uri string) (config *Config, err error)

GetConfig 获取jssdk需要的配置参数 uri 为当前网页地址

func (*Js) GetTicket

func (js *Js) GetTicket() (ticketStr string, err error)

GetTicket 获取jsapi_ticket

Jump to

Keyboard shortcuts

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