Authored by 沈志敏

update readme

... ... @@ -82,7 +82,7 @@
```html
<div class="product-source" condition='{"sort":"111","limit":10, "pid":1}'>
<input id="imgwh" type="hidden" name="" value="450x500">
<input class="imgwh" type="hidden" name="" value="450x500">
<div class="feature-product-info">
<a class="product-detail" href='http://item.yohobuy.com/product/pro_330189_424569/PUMADUPLEXEVOPARTYDiBangXie36146103.html?from=search-s-51184789_1_1&openby:yohobuy={"action":"go.productDetail","params":{"product_id":"330189","from":"search-s-51184789_1_1"}}'>
<div>
... ...
... ... @@ -32,7 +32,7 @@ let _getProduct = function(param) {
if (!data || !data.default_images) {
return;
}
el = $(el);
el.find('.brand-name').html(data.brand_name);
el.find('a.product-brand').attr('href', `//m.yohobuy.com/product/index/brand?domain=${data.brand_domain}`);
... ... @@ -41,6 +41,29 @@ let _getProduct = function(param) {
el.find('.product-name').html(data.product_name);
el.find('.sale-price').html(${data.sales_price}`);
el.find('.market-price').html(${data.market_price}`);
var listDom = el.find('a.list-product');
if (listDom) {
var sortStr = '',
gender = cond.gender ? cond.gender : '1,3',
url = `//list.m.yohobuy.com?gender=${gender}`;
if (listDom.data('sort')) {
sortStr += `,"sort":${data.small_sort_id}`;
url += `&sort=${data.small_sort_id}`;
}
if (listDom.data('misort')) {
sortStr += `,"misort":${data.middle_sort_id}`;
url += `&misort=${data.middle_sort_id}`;
}
if (listDom.data('msort')) {
sortStr += `,"msort":${data.max_sort_id}`;
url += `&msort=${data.max_sort_id}`;
}
url += `&openby:yohobuy={"action":"go.list","params":{"actiontype":1,"gender":${gender}${sortStr}}}`;
listDom.attr('href', url);
}
});
}
});
... ...