小程序解析富文本标签

1.下载Parser文件夹至小程序目录
2.在需要引用的页面的json文件中添加

{
  "usingComponents": {
    "Parser":"/Parser/index"
  }
}

3.在需要引用的页面的wxml文件中添加


4.在需要引用的页面的js文件中添加

onLoad:function(){
  this.setData({
    html:'your html'
  })
}

详情见:https://developers.weixin.qq.com/community/develop/article/doc/00002c34fa8a60c86568279fe59413
tip:我用了wxParse插件还是会乱码,这个插件很好的解决了我的问题

你可能感兴趣的:(小程序)