Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DesignWidth 设计宽度 DesignWidth = 640 // DesignHeight 设计高度 DesignHeight = 1080 // ImageHeight 图片区域640 ImageHeight = 840 // BodyHeight 信息区域240 BodyHeight = 240 )
View Source
const MPGETAccessTokenURL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s"
MPGETAccessTokenURL 获取accessToken
Variables ¶
View Source
var C conf
C 配置实列
Functions ¶
func RequestQRCode ¶
RequestQRCode 获取小程序二维码 saveName 不包含后缀,为空的话就是随机文件名 返回文件名和错误,文件存储在OutputDIR目录中
Types ¶
type MPAccessToken ¶
type MPAccessToken struct { Errcode int `json:"errcode"` Errmsg string `json:"errmsg"` AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` ExpiresAt time.Time //过期时间,s }
MPAccessToken 小程序获取的access_token
func GetMPAccessToken ¶
func GetMPAccessToken() (MPAccessToken, error)
GetMPAccessToken 获取小程序授权的accesstoken
Click to show internal directories.
Click to hide internal directories.