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

26 lines
537 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. qrcode,err := GetMiniAppQrcode(appid,appSecret,page,scene)
  11. t.Log(qrcode)
  12. t.Log(err)
  13. }
  14. func Test_GetMiniappOpenid(t *testing.T){
  15. appid := "wx3d53ccbaf69f7995"
  16. appSecret := "165983626235636be54a16404e3e70a7"
  17. js_code := "063iBAll27ez884FT6nl254pW02iBAlw"
  18. res,err := GetMiniAppOpenid(appid,appSecret,js_code)
  19. t.Log(res)
  20. t.Log(err)
  21. }