加强:

//对img添加额外数据
if (node.tag === 'img') {

if (node.attr.src.indexOf("http") == -1){

node.imgIndex = results.images.length;
var imgUrl = "http://www.yudw.com/" + node.attr.src;
if (imgUrl[0] == '') {
imgUrl.splice(0, 1);
}
imgUrl = wxDiscode.urlToHttpUrl(imgUrl, __placeImgeUrlHttps);

node.attr.src = imgUrl;
node.from = bindName;
results.images.push(node);
results.imageUrls.push(imgUrl);
}
}

如果html中带有img标签,则给img标签加上前缀

【虽然这一步也可以在后端的接口中处理】