wxacode.getUnlimited生成小程序码,前端无法读取scene
发布于 5 年前 作者 awan 15095 次浏览 来自 问答

前端:

onLoad: function (options) {

var scene = JSON.stringify(decodeURIComponent(options))

console.log('我是options: ’ + scene)

console.log(options.scene)

},

后端

params.put("scene", "c=" + cardOpenId);
params.put("width", 430);
HttpPost request = new HttpPost(postUrl.trim());
request.setHeader("Content-Type", "application/json");
request.setEntity(new ByteArrayEntity(JSON.toJSON(params).toString().getBytes()));
HttpClient httpClient = HttpClients.createDefault();
HttpResponse httpResponse = httpClient.execute(request);
1 回复

我使用postman生成的小程序码  使用工具进行调试也获取不到参数!

回到顶部