在IOS设备上rich-text中的图片用本地路径显示不出来
rich-text 中 <img src="本地图片路径"/> 图片标签使用本地图片,在IOS中显示不出来 代码如下: <!--index.wxml--> <view class="container"> <rich-text nodes="{{html}}" bindtap="tap"></rich-text> <button bindtap="selectImg">选择图片</button> </view> //index.js const app = getApp() Page({ data: { html: '<div class="div_class" style="line-height: 60px; color: red;">Hello World!</div>', }, onLoad: function () { }, selectImg(){ wx.chooseImage({ count: 1, sizeType: ['original', 'compressed'], sourceType: ['album', 'camera'], success: (res) =>{ let tempFilePaths = res.tempFilePaths wx.saveFile({ tempFilePath: tempFilePaths[0], success: (res) => { let savedFilePath = res.savedFilePath let html = `<div class="div_class" style="line-height: 60px; color: red;"><img src="${savedFilePath}"/></div>` console.log(html) this.setData({ html: html }) } }) } }) } })