Do Mini Program to share moments, developer tool canvas pictures work well, but what is the reason why canvas pictures are empty when debugging with mobile phones?

debugging canvas on the mobile phone to save the picture to the photo album is blank, there is no content on the canvas, hope the gods stop to help.

Mar.22,2021

the address of your image needs to start with https, and the domain name needs to be filled in the whitelist, and the developer tool needs to refresh the whitelist of the domain name.

take a look at my solution in this question: https://codeshelper.com/q/10.

.

I also encountered the same problem here found the answer:

  onLoad: function(options) {
    // ()
    let avatar_small_url = wx.getStorageSync('userInfo').avatar_small_url;
    // console.log(avatar_small_url)
    wx.getImageInfo({
      src: avatar_small_url,
      success:  (res)=> {
        //  console.log(res.path)
        this.setData({
          avatar_small_url: res.path
        })

      }
    })
  },

then use canvas to draw and save it, and then you can display

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