- 生成的微信小程序二维码scene参数和我传的参数不一致
使用B接口:https://api.weixin.qq.com/wxa/getwxacodeunlimit 生成小程序二维码,传入参数是:"{"page":"pages/class/class","scene":412213075488489472}" 但生成的二维码,小程序获取到的scene不是412213075488489472。 奇怪的是:小程序获取到测参数是:http请求日志中的"Content-disposition: attachment; filename="_412213075488489536"[\r][\n]" 难道是微信的坑? 以下是调用微信接口的http请求日志: http-outgoing-24 >> "POST /wxa/getwxacodeunlimit?access_token=token HTTP/1.1[\r][\n]" - http-outgoing-24 >> "Content-Length: 55[\r][\n]" - http-outgoing-24 >> "Content-Type: application/json[\r][\n]" - http-outgoing-24 >> "Content-Encoding: utf-8[\r][\n]" - http-outgoing-24 >> "Host: api.weixin.qq.com[\r][\n]" - http-outgoing-24 >> "Connection: Keep-Alive[\r][\n]" - http-outgoing-24 >> "User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_151)[\r][\n]" - http-outgoing-24 >> "Accept-Encoding: gzip,deflate[\r][\n]" - http-outgoing-24 >> "[\r][\n]" - http-outgoing-24 >> "{"page":"pages/class/class","scene":412213075488489472}" - http-outgoing-24 << "HTTP/1.1 200 OK[\r][\n]" - http-outgoing-24 << "Connection: keep-alive[\r][\n]" - http-outgoing-24 << "Cache-Control: no-cache, must-revalidate[\r][\n]" - http-outgoing-24 << "Content-Type: image/jpeg[\r][\n]" - http-outgoing-24 << "Content-disposition: attachment; filename="_412213075488489536"[\r][\n]" - http-outgoing-24 << "Content-Length: 99842[\r][\n]" - http-outgoing-24 << "[\r][\n]"
2018-08-30 - 微信小程序二维码B接口报错
使用B接口:https://api.weixin.qq.com/wxa/getwxacodeunlimit 生成小程序二维码报错:{"errcode":40169,"errmsg":"invalid length for scene, or the data is not json string hint: [s0142b451]"} 请问scene参数怎么传,能否在url中传递,比如:https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=123&scene=3211 有java请求微信小程序二维码的demo代码?
2018-08-27