...
|
...
|
@@ -93,6 +93,20 @@ exports.gethtml = (param) => { |
|
|
result = $.load(result);
|
|
|
result = result('.good-detail-page');
|
|
|
|
|
|
// 修改为你优选url
|
|
|
result.find('.recommend-for-you a.swiper-slide').each((index, el)=> {
|
|
|
el = $(el);
|
|
|
|
|
|
let href = el.attr('href');
|
|
|
|
|
|
if (href) {
|
|
|
let o = (href.split('?')[1] || '').replace('openby:yohobuy=', '');
|
|
|
|
|
|
o = JSON.parse(o);
|
|
|
el.attr('href', `//m.yohobuy.com/product/global/${o.params.skn}.html`);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
return (result.html() || '').replace(/<img src=/g, '<img class="lazy" src="data:image/gif;' +
|
|
|
'base64,R0lGODlhAQABAJEAAAAAAP///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw=="' +
|
|
|
' data-original=').replace(/<img border="0" src=/g, '<img border="0" class="lazy" ' +
|
...
|
...
|
|