小程序怎么把后台返回的字符串作为页面元素插入到view中?

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

比如后台返回的是:‘<image src=“http://www.tencent.com/logo1.png”></image><image src=“http://www.tencent.com/logo2.png”></image>’,现在需要把它插入到<view></view>中

2 回复
yaoli
yaoli1 楼6 年前

百而度之找到了方法,和wxParse差不多,思路是html转json,json转wxml,学习地址:https://weappdev.com/t/topic/910

github地址:https://github.com/henryluki/html-parser

gang82
gang822 楼6 年前

这个插件你去看看就知道了wxParse