wx.chooseMessageFile在模拟器中打不开本地资源目录呢?

发布于 8 年前作者 xiuyingliao13098 次浏览最后编辑 8 年前来自 issues

wx.chooseMessageFile在模拟器中打不开本地资源目录呢?我这写的没有问题呀

1 回复
yong13
yong131 楼5 年前

你好,问题未复现,看下fai返回什么信息,试试下面代码:

    wx.chooseMessageFile({
      count: 10,
      type'image',
      success(res) {
        // tempFilePath可以作为img标签的src属性显示图片
        const tempFilePaths = res.tempFiles
        console.log(res)
      },
      fail(g) {
        console.log(g)
      }
    })