How to display Mini Program's QR code directly on the page

return a piece of data through Mini Program"s QR code api
estimated to be binary

how to convert this data into a picture and display it on the page

can it be done without sending it to the server for processing

Mar.13,2021

let that = this;
wx.downloadFile({
      url: '',
      header:{
        'Content-Type':'image',
      },
      success: function (res) {
        if (res.statusCode === 200) {
          that.setData({
            imageData:res.tempFilePath
          })
        }
      },fail:function(err){
        console.log(err)
      }
    })
filePathsrc;
If

is not sent to the server, you will have to convert the binary. Parse the binary image


directly add
header ('content-type:image/jpg') to the program;
the output type is the picture

.
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-1b405ff-348d4.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-1b405ff-348d4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?