...
|
...
|
@@ -35,6 +35,19 @@ export function setSelectedCategory(catId, index, catName) { |
|
|
});
|
|
|
}
|
|
|
|
|
|
for (var i = 0; i < newProductList.length; i++) {
|
|
|
let item = newProductList[i];
|
|
|
let yh_exposureData = {
|
|
|
'P_NAME': '浏览记录',
|
|
|
'TAB_ID': index + 1,
|
|
|
'TAB_NAME': catName,
|
|
|
'I_INDEX': i + 1,
|
|
|
'PRD_SKN': item.product_skn?item.product_skn:'',
|
|
|
exposureEnd : 1,
|
|
|
};
|
|
|
item.yh_exposureData = yh_exposureData;
|
|
|
}
|
|
|
|
|
|
dispatch({
|
|
|
type: SET_SELECTED_CATEGORY,
|
|
|
payload: {productList: newProductList, index}
|
...
|
...
|
@@ -111,6 +124,19 @@ function parseHistoryList(json) { |
|
|
let productList = json && json.product_list ? json.product_list : [];
|
|
|
let categoryList = json && json.category_list ? json.category_list : [];
|
|
|
|
|
|
for (var i = 0; i < productList.length; i++) {
|
|
|
let item = productList[i];
|
|
|
let yh_exposureData = {
|
|
|
'P_NAME': '浏览记录',
|
|
|
'TAB_ID': '1',
|
|
|
'TAB_NAME': '全部',
|
|
|
'I_INDEX': i + 1 + '',
|
|
|
'PRD_SKN': item.product_skn?item.product_skn:'',
|
|
|
exposureEnd : 1,
|
|
|
};
|
|
|
item.yh_exposureData = yh_exposureData;
|
|
|
}
|
|
|
|
|
|
if (categoryList.length > 0) {
|
|
|
categoryList = [{category_id: -1, category_name: '全部'} , ...categoryList];
|
|
|
}
|
...
|
...
|
|