小程序
小游戏
企业微信
微信支付
扫描小程序码分享
https://api.weixin.qq.com/wxa/getwxacodeunlimit 去创建二维码,带上page 路径(正常,已上线),就无法创建二维码,也不返回错误,如果把page参数去掉,创建二维码成功。是什么原因?
2 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
小程序上线了。并且这个页面在线上可访问吧?
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
代码怎么写的
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
小程序上线了。并且这个页面在线上可访问吧?
代码怎么写的
try {
Map
param.put("scene", wxCodeConfig.getScene());
// param.put("page", wxCodeConfig.getPage());
param.put("width", wxCodeConfig.getWidth());
param.put("auto_color", false);
param.put("is_hyaline", wxCodeConfig.getIsHyaline());
Map
if (lineColorMap == null) {
lineColorMap = new HashMap<>();
}
Integer r = lineColorMap.get("r");
Integer g = lineColorMap.get("g");
Integer b = lineColorMap.get("b");
Map
line_color.put("r", r == null ? 0 : r);
line_color.put("g", g == null ? 0 : g);
line_color.put("b", b == null ? 0 : b);
param.put("line_color", line_color);
String url = WeixinConstant.WX_X_CODE_URL + "?access_token=" + accessToken;
MultiValueMap
HttpEntity requestEntity = new HttpEntity(param, headers);
ResponseEntity
byte[] result = entity.getBody();
inputStream = new ByteArrayInputStream(result);
FileUtils.copyInputStreamToFile(inputStream, wxCodeFile);
} catch (Exception e) {
logger.error("generate wx code failed", e);
throw new BusinessException(e);
} finally {
IOUtils.closeQuietly(inputStream);
}
页面js是page/index.js还是page/index/index.js ?
直接写死呢
param.put("page", "page/index");