WeChat Mini Programs gets the official QR code and returns garbled code.

after obtaining token through appid and secret, the API for calling Mini Program to obtain unrestricted QR code is as follows:

var token = res.data.access_token;
                    wx.request({
                        url: "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + token,
                        method: "POST",
                        data: {
                            scene: "orderId=" + orderId,
                            path: "pages/hall/receiveDetail/receiveDetail",
                            width: 258,
                            auto_color: false,
                            line_color: { "r": "0", "g": "0", "b": "0" }
                        },
                        header:{
                            "content-type": "application/json;charset=utf-8"
                        },
                        success: function (res) {
                            callback(res.data);
                        }
                    })

Screenshot of the returned result:

clipboard.png

pass the second parameter path as page, in the official document, but the request with page will not succeed. It always prompts you that the parameter is incorrect. If it is changed to path, it will be successful, but garbled will be returned.
I would like to ask whether it is a request problem or some other reason, because when you use php to deal with image garbled, it is prompted that it is not a picture when you save it.

Mar.02,2021

what you have returned is already a picture, but it is the binary form of the displayed picture. Save it, or change your request header


Hello, I would like to ask, I used php request in the background, after the request, did not report an error and did not return any data to me,


this problem have you solved? The data returned by


is a picture, but it is binary and needs to be saved

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c205-2c2f6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c205-2c2f6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?