Authored by 刘传洋

search name red display

... ... @@ -197,6 +197,11 @@ exports.processProductList = (list, options) => {
}
}
if(options.query && _.isString(product.product_name)) {
let qreg = new RegExp(options.query, 'ig');
product.product_name = product.product_name.replace(qreg, '<span style="color:#c00;">$&</span>');
}
pruductList.push(product);
});
return handleGoodsListData(pruductList);
... ...