直接使用官方Test代码修改
public void getMiniAppQR() {
WxaConfig wc = new WxaConfig();
wc.setAppId("wxe95---");
wc.setAppSecret("a7286---");
WxaConfigKit.setWxaConfig(wc);
WxaAccessTokenApi.getAccessTokenStr();
String scene = "A006";
InputStream miniAppQR = WxaQrcodeApi.getUnLimit(scene,"pages/index/index");
IOUtils.toFile(miniAppQR, new File("tmp/A006.png"));
renderNull();
}(jfinal-weixin版本2.6)
能生成token,但下载下来的png文件内容是,
{"errcode":47001,"errmsg":"data format error hint: [HHgCNHnre-XMCIeA]"}(* 使用别的插件测试是可以生成小程序二维码的)