qrcode

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: Zlib Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(api *token.Api, qr *structs.QRCodeReq) (*structs.QRCode, error)

func GenReq

func GenReq(expireSeconds int64, actionName, sceneStr string, sceneId int32) structs.QRCodeReq

**

  • 临时二维码 GenReq(6000,"QR_SCENE","", 1) OR GenReq(6000,"QR_STR_SCENE","test", 0) *
  • 永久二维码 GenReq(0,"QR_LIMIT_SCENE","", 1) OR GenReq(0,"QR_LIMIT_STR_SCENE","test", 0)

func GetBitmap

func GetBitmap(ticket string) ([]byte, error)

获取二维码ticket后,开发者可用ticket换取二维码图片。请注意,本接口无须登录态即可调用。 HTTP GET请求(请使用https协议)https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=TICKET 提醒:TICKET记得进行UrlEncode ticket正确情况下,http 返回码是200,是一张图片,可以直接展示或者下载。

HEAD Accept-Ranges:bytes IsCache-control:max-age=604800 Connection:keep-alive Content-Length:28026 Content-Name:image/jpg

Types

This section is empty.

Jump to

Keyboard shortcuts

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