微信接口的RPC包
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
636 B

3 years ago
  1. package weixinrpc
  2. import (
  3. "testing"
  4. )
  5. func Test_GetMiniappCode(t *testing.T){
  6. appid := "wx3d53ccbaf69f7995"
  7. appSecret := "165983626235636be54a16404e3e70a7"
  8. page := ""
  9. scene := "user_id=2"
  10. qrcodeParams := map[string]interface{}{
  11. "page":page,
  12. "scene":scene,
  13. "is_hyaline":true,
  14. }
  15. qrcode,err := GetMiniAppQrcode(appid,appSecret,qrcodeParams)
  16. t.Log(qrcode)
  17. t.Log(err)
  18. }
  19. func Test_GetMiniappOpenid(t *testing.T){
  20. appid := "wx3d53ccbaf69f7995"
  21. appSecret := "165983626235636be54a16404e3e70a7"
  22. js_code := "063iBAll27ez884FT6nl254pW02iBAlw"
  23. res,err := GetMiniAppOpenid(appid,appSecret,js_code)
  24. t.Log(res)
  25. t.Log(err)
  26. }