使用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]"
scence 赋值的时候必须是string类型的,不要用Long否则获取到的scence会不一致
请问,这个问题找到原因了吗?
请问这个问题解决了吗?
请问解决了吗。相同问题
同问解决了吗?