package weixinrpc import ( "testing" ) func Test_GetMiniappCode(t *testing.T){ site_id := "1198881" appid := "wx3d53ccbaf69f7995" appSecret := "165983626235636be54a16404e3e70a7" page := "" scene := "user_id=19" qrcodeParams := map[string]interface{}{ "page":page, "scene":scene, // "is_hyaline":true, } qrcode,err := GetMiniAppQrcode(site_id,appid,appSecret,qrcodeParams) t.Log(qrcode) t.Log(err) } func Test_GetMiniappOpenid(t *testing.T){ appid := "wx3d53ccbaf69f7995" appSecret := "165983626235636be54a16404e3e70a7" js_code := "063iBAll27ez884FT6nl254pW02iBAlw" res,err := GetMiniAppOpenid(appid,appSecret,js_code) t.Log(res) t.Log(err) }