接口请求返回值的<text class="red">内容</text>如何解析?

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

wx.request接口请求返回值的<text class=“red”>内容</text>如何解析?想实现,返回的文字中某些文字红色。应该如何做?

2 回复
zhaofang
zhaofang1 楼6 年前

rich-text?

https://developers.weixin.qq.com/miniprogram/dev/component/rich-text.html

pingcheng
pingcheng2 楼5 年前

??????返回值是HTML字符串?