search

Home  >  Q&A  >  body text

javascript - How to convert pages into images for sharing in WeChat mini program

Hello, we are currently making a small program for business cards. How can we convert a page into a picture in the small program? Is there such a js interface? Thanks, I've tried using canvas, but the applet can't get the dom. .

ringa_leeringa_lee2706 days ago3114

reply all(3)I'll reply

  • 为情所困

    为情所困2017-06-28 09:30:42

    wx.canvasToTempFilePath(OBJECT)
    This? You try it

    The subsequent image address can be used wx.previewImage(OBJECT) to preview

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-06-28 09:30:42

    Please refer to: https://github.com/demi520/wx...

    Still draw with canvas, or you can consider server-side generation

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-06-28 09:30:42

    Recommend phantomjs

    reply
    0
  • Cancelreply