Documentation ¶
Index ¶
- Constants
- type CheckLoginResponse
- type GetUnLimitQRCodeRequest
- type SendRequest
- type Wx
- func (s *Wx) CheckLogin(code string) (*CheckLoginResponse, error)
- func (s *Wx) GetUnLimitQRCode(params *GetUnLimitQRCodeRequest, isFresh bool) ([]byte, error)
- func (s *Wx) InitAuthToken(isFresh bool) (string, error)
- func (s *Wx) Request(params interface{}, url string, isFresh bool) ([]byte, error)
- func (s *Wx) Send(params *SendRequest, isFresh bool) ([]byte, error)
Constants ¶
View Source
const ( // access_token 地址 AccessTokenUrl = "https://api.weixin.qq.com/cgi-bin/token" //获取无限制小程序二维码 CreateUqrcodeUrl = "https://api.weixin.qq.com/wxa/getwxacodeunlimit" //授权$code 访问地址 CodeAccessUrl = "https://api.weixin.qq.com/sns/jscode2session" TemplatedSendUrl = "https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckLoginResponse ¶ added in v1.3.8
type GetUnLimitQRCodeRequest ¶
type SendRequest ¶ added in v1.3.6
type Wx ¶
type Wx struct {
// contains filtered or unexported fields
}
func (*Wx) CheckLogin ¶ added in v1.3.8
func (s *Wx) CheckLogin(code string) (*CheckLoginResponse, error)
@desc 根据微信code获取授权信息 @auth liuguoqiang 2020-04-08 @param @return
func (*Wx) GetUnLimitQRCode ¶
func (s *Wx) GetUnLimitQRCode(params *GetUnLimitQRCodeRequest, isFresh bool) ([]byte, error)
@desc 获取二维码 @auth liuguoqiang 2020-02-25 @param @return
func (*Wx) InitAuthToken ¶
@desc 根据access_token值进行授权 @auth liuguoqiang 2020-02-25 @param $isFresh 是否刷新access_token @return
func (*Wx) Send ¶ added in v1.3.6
func (s *Wx) Send(params *SendRequest, isFresh bool) ([]byte, error)
@desc 微信小程序模板消息推送 @auth liuguoqiang 2020-02-25 @param $openid 接收者(用户)的 openid @param $template_id 所需下发的模板消息的id @param $page 点击模板卡片后的跳转页面,仅限本小程序内的页面。支持带参数,(示例index?foo=bar)。该字段不填则模板无跳转。 @param $form_id 表单提交场景下,为 submit 事件带上的 formId;支付场景下,为本次支付的 prepay_id @param $data type:object 模板内容,不填则下发空模板。具体格式请参考示例。 @param $emphasis_keyword 模板需要放大的关键词,不填则默认无放大
Click to show internal directories.
Click to hide internal directories.