Authored by hongweigao

修改

... ... @@ -89,16 +89,18 @@ const handleBrandCheckedData = (params, origin) => {
// 分拆品牌参数
let brands = _.split(params.brand, ',');
let intBrands = [];
let brandTotalName = '';
_.forEach(brands, value => {
intBrands.push(parseInt(value, 10));
});
let checkedCount = 0;
let checkedCount = 0,
brandsTotalName = '';
// 遍历品牌数据,如果在参数中,那么加 checked,将此数据加入到 checked 数组中
if (!_.isEmpty(origin)) {
brandsTotalName = _.map(origin, 'name').join('、');
_.forEach(origin, (value) => {
if (typeof _.find(intBrands, o => {
return _.isEqual(o, +value.id);
... ... @@ -139,10 +141,10 @@ const handleBrandCheckedData = (params, origin) => {
// 建议保留,需要品牌可以单个删除时放开注释即可
// dest.push(checked);
brandTotalName += checked.name + '、';
dest[0].totalName = brandTotalName;
dest[0].totalName = brandsTotalName;
}
});
}
return dest;
};
... ...
... ... @@ -43,6 +43,13 @@ var $saleReturn = $('#saleReturn');
var dialogTpl = require('hbs/product/coupon-dialog.hbs');
var $goodsIdArr = [],
loadYas = {};
$('.recommend-slider .img-item .goods-id').each(function() {
$goodsIdArr.push($(this).html());
});
function productUrl(s) {
return window.location.href + '?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"' + s + '"}}';
}
... ... @@ -1042,12 +1049,7 @@ function randomString(len) {
* 页面加载完
*/
function initPageYas() {
var $goodsIdArr = [],
loadYas = {};
$('.recommend-slider .img-item .goods-id').each(function() {
$goodsIdArr.push($(this).html());
});
var loadYas = {};
loadYas = {
REC_POSE: 100013,
... ...
... ... @@ -44,7 +44,7 @@ lazyLoad($('img.lazy'), {
});
qs = window.queryString();
commonParams = {
PAGE_NUM: qs.pager || 1,
PAGE_NUM: qs.page || 1,
FILTER_VALUE: filterValue,
L1_SORT: $leftLi.length > 0 ? $leftLi.parent().prev().attr('title') : '',
L2_SORT: $leftLi.find('a').attr('title') || '',
... ... @@ -97,7 +97,7 @@ $('.good-item-wrapper').click(function() {
var $this = $(this),
proId = $this.find('.product-id').html(),
aIndex = $this.attr('activeIndex'),
pageNum = qs.pager || 1,
pageNum = qs.page || 1,
limit = qs.limit || 60,
proNum = (parseInt(pageNum, 10) - 1) * limit + parseInt(aIndex, 10),
shelveTime = $this.find('.shelve-time').html();
... ...