...
|
...
|
@@ -434,6 +434,7 @@ export function getHotProduct() { |
|
|
return (dispatch, getState) => {
|
|
|
let {app, brandStore} = getState();
|
|
|
let {productSkn} = brandStore.resource.hotProducts_APP;
|
|
|
let {shopId, productListForPerson,resource} = brandStore;
|
|
|
if (!productSkn) {
|
|
|
return;
|
|
|
}
|
...
|
...
|
@@ -449,7 +450,7 @@ export function getHotProduct() { |
|
|
let payload = json.product_list;
|
|
|
let order = '';
|
|
|
try {
|
|
|
payload = exposePruductListData(payload,order,app.channel,0);
|
|
|
payload = exposePruductListData(payload,order,app.channel,0,shopId);
|
|
|
} catch (e) {
|
|
|
|
|
|
} finally {
|
...
|
...
|
@@ -578,7 +579,7 @@ export function getProductList(reload=false) { |
|
|
dispatch(productListRequest());
|
|
|
return new BrandStoreService(app.host).productList(shopId, channel, order, page, pageSize, allFilterFactors,brandId)
|
|
|
.then(json => {
|
|
|
let payload = parseProductList(json,order,app.channel,0);
|
|
|
let payload = parseProductList(json,order,app.channel,0,shopId);
|
|
|
payload.endReached = payload.currentPage == payload.pageCount || payload.list.length < pageSize;
|
|
|
|
|
|
// 数据曝光 新格式
|
...
|
...
|
@@ -654,10 +655,10 @@ function randomString(len) { |
|
|
return pwd;
|
|
|
}
|
|
|
|
|
|
function parseProductList(json,order,channel,index) {
|
|
|
function parseProductList(json,order,channel,index,shopId) {
|
|
|
let list = json && json.product_list ? json.product_list : [];
|
|
|
try {
|
|
|
list = exposePruductListData(list,order,channel,index);
|
|
|
list = exposePruductListData(list,order,channel,index,shopId);
|
|
|
} catch (e) {
|
|
|
|
|
|
} finally {
|
...
|
...
|
@@ -857,7 +858,7 @@ function parseProductList(json,order,channel,index) { |
|
|
|
|
|
}
|
|
|
|
|
|
function exposePruductListData(list,order,channel,index) {
|
|
|
function exposePruductListData(list,order,channel,index,shopId) {
|
|
|
|
|
|
|
|
|
if (!list) {
|
...
|
...
|
@@ -918,6 +919,7 @@ function exposePruductListData(list,order,channel,index) { |
|
|
C_ID: channel,
|
|
|
L2_TAB_ID: index,
|
|
|
L2_TAB_NAM: l2_TAB_NAM,
|
|
|
P_PARAM : shopId?shopId:'0',
|
|
|
exposureEnd : 1,
|
|
|
};
|
|
|
item.yh_exposureData = params;
|
...
|
...
|
@@ -1022,7 +1024,7 @@ export function getProductListForPersopn(reload=false) { |
|
|
return new BrandStoreService(app.host).productListForPerson(shopId, channel, order, page, pageSize,brandId)
|
|
|
.then(json => {
|
|
|
|
|
|
let payload = parseProductList(json,order,app.channel,2);
|
|
|
let payload = parseProductList(json,order,app.channel,2,shopId);
|
|
|
payload.endReached = payload.currentPage == payload.pageCount;
|
|
|
|
|
|
if (payload.currentPage > 1) {
|
...
|
...
|
@@ -1094,7 +1096,7 @@ export function getProductListForNew(reload=false) { |
|
|
return new BrandStoreService(app.host).productListForNew(shopId, channel, order, page, pageSize,brandId)
|
|
|
.then(json => {
|
|
|
|
|
|
let payload = parseProductList(json,order,app.channel,1);
|
|
|
let payload = parseProductList(json,order,app.channel,1,shopId);
|
|
|
payload.endReached = payload.currentPage == payload.pageCount;
|
|
|
|
|
|
if (payload.currentPage > 1) {
|
...
|
...
|
|