//动态生成投票小程序码
@RequestMapping(value = "/gettpQRCode", method = RequestMethod.GET)
public JSONObject gettpQRCode(String access_token ,String sceneStr) {
RestTemplate rest = new RestTemplate();
InputStream inputStream = null;
OutputStream outputStream = null;
byte[] reuslt = null;
JSONObject jsonObject = new JSONObject();
try {
//获取小程序码接口(access_token调用微信提供的另一接口获取)
String url = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token="+access_token;
Map<String,Object> param = new HashMap<>();
//参数
param.put("scene", sceneStr);
//跳转页面
param.put("page", "pages/zwxq/zwxq");
//尺寸
param.put("width", 430);
param.put("auto_color", false);
Map<String,Object
动态生成带参数的小程序码
最新推荐文章于 2024-04-09 17:00:56 发布
本文介绍如何利用Java编程动态生成带有参数的小程序码,涉及小程序的接口调用和参数配置,适用于开发者进行小程序推广和场景应用。
摘要由CSDN通过智能技术生成