cari

Rumah  >  Soal Jawab  >  teks badan

javascript - 微信小程序开发之临时路径图片转base64编码问题

PHP中文网PHP中文网2813 hari yang lalu2485

membalas semua(1)saya akan balas

  • 迷茫

    迷茫2017-04-11 11:03:31

    var uploadImage = this.data.imageList[0]
    var reader = new FileReader()
    reader.onload = function (e) {
          var arrayBuffer = reader.result;
          var base64 = wx.arrayBufferToBase64(arrayBuffer)
    }
    reader.readAsArrayBuffer(new Blob(this.data.imageList)) 

    balas
    0
  • Batalbalas