微信接口的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.

32 lines
670 B

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