mp_test.go 445 B

1234567891011121314151617181920
  1. package gowechat
  2. import (
  3. "testing"
  4. "github.com/astaxie/beego"
  5. "github.com/yaotian/gowechat/wxcontext"
  6. )
  7. func TestGetQrcode(t *testing.T) {
  8. config := wxcontext.Config{
  9. AppID: "wx88c493c9a9f67ea6",
  10. AppSecret: "0c1fe2db856c60d9c52b65383feadae1",
  11. Token: "zyt2864",
  12. }
  13. wc := NewWechat(config)
  14. beego.Debug("wechat's cache:", wc.Context.Cache)
  15. mp, _ := wc.MpMgr()
  16. mp.GetQrcode().CreatePermanentQRCodeWithSceneString("test")
  17. }