...
|
...
|
@@ -68,7 +68,7 @@ export function setShowSimilarGuider(requestNative, show=false) { |
|
|
}
|
|
|
}
|
|
|
|
|
|
export function storeCurrentTabValue(index, tabName, queryList) {
|
|
|
export function storeCurrentTabValue(index, tabName, queryList, template_id) {
|
|
|
return (dispatch, getState) => {
|
|
|
dispatch({
|
|
|
type: STORE_CURRENT_TAB_VALUE,
|
...
|
...
|
@@ -83,7 +83,7 @@ export function storeCurrentTabValue(index, tabName, queryList) { |
|
|
}
|
|
|
paramsDic = res;
|
|
|
})
|
|
|
dispatch(getProductList(paramsDic));
|
|
|
dispatch(getProductList(paramsDic, template_id));
|
|
|
};
|
|
|
}
|
|
|
|
...
|
...
|
@@ -146,39 +146,83 @@ function exposeResourceInfoData(json, contentCode) { |
|
|
let floorname = item.template_name
|
|
|
let floorid = item.template_id
|
|
|
|
|
|
if (floorname === 'newFocus') {
|
|
|
let list = item.data;
|
|
|
for (let j = 0; j< list.length; j ++) {
|
|
|
let subitem = list[j]
|
|
|
subitem.yh_exposureData = {
|
|
|
F_ID: floorid,
|
|
|
F_NAME: floorname,
|
|
|
F_INDEX: i + 1,
|
|
|
I_INDEX: parseInt(j) + 1 + "",
|
|
|
P_NAME: pageName,
|
|
|
F_URL: subitem.url,
|
|
|
CONTENT_CODE: contentCode,
|
|
|
exposureEnd: 1,
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (floorname === 'newProductShopListFloor') {
|
|
|
let list = item.list;
|
|
|
for (let j = 0; j< list.length; j ++) {
|
|
|
let subitem = list[j]
|
|
|
subitem.yh_exposureData = {
|
|
|
F_ID: floorid,
|
|
|
F_NAME: floorname,
|
|
|
P_NAME: pageName,
|
|
|
F_INDEX: i + 1,
|
|
|
I_INDEX: parseInt(j) + 1 + "",
|
|
|
SHOP_ID: subitem.shops_id,
|
|
|
CONTENT_CODE: contentCode,
|
|
|
exposureEnd: 1,
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
switch (floorname) {
|
|
|
case 'newFocus': {
|
|
|
let list = item.data;
|
|
|
for (let j = 0; j< list.length; j ++) {
|
|
|
let subitem = list[j]
|
|
|
subitem.yh_exposureData = {
|
|
|
F_ID: floorid,
|
|
|
F_NAME: floorname,
|
|
|
F_INDEX: i + 1,
|
|
|
I_INDEX: parseInt(j) + 1 + "",
|
|
|
P_NAME: pageName,
|
|
|
F_URL: subitem.url,
|
|
|
CODE: contentCode,
|
|
|
exposureEnd: 1,
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
case 'newProductShopListFloor': {
|
|
|
let list = item.list;
|
|
|
for (let j = 0; j< list.length; j ++) {
|
|
|
let subitem = list[j]
|
|
|
subitem.yh_exposureData = {
|
|
|
F_ID: floorid,
|
|
|
F_NAME: floorname,
|
|
|
P_NAME: pageName,
|
|
|
F_INDEX: i + 1,
|
|
|
I_INDEX: parseInt(j) + 1 + "",
|
|
|
SHOP_ID: subitem.shops_id,
|
|
|
CODE: contentCode,
|
|
|
exposureEnd: 1,
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
case 'divideImage': {
|
|
|
|
|
|
let list = item.data
|
|
|
for (let j=0; j< list.length; j++) {
|
|
|
let subitem = list[j]
|
|
|
subitem.yh_exposureData = {
|
|
|
F_ID: floorid,
|
|
|
F_NAME: floorname,
|
|
|
P_NAME: pageName,
|
|
|
F_INDEX: i + 1,
|
|
|
I_INDEX: parseInt(j) + 1 + "",
|
|
|
CODE: contentCode,
|
|
|
F_URL: subitem.url,
|
|
|
exposureEnd: 1,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
break;
|
|
|
|
|
|
case 'splitJointImg': {
|
|
|
|
|
|
let url = ''
|
|
|
|
|
|
url = item.urls && item.urls[0] ? item.urls[0] : ''
|
|
|
|
|
|
item.yh_exposureData = {
|
|
|
F_ID: floorid,
|
|
|
F_NAME: floorname,
|
|
|
P_NAME: pageName,
|
|
|
F_INDEX: i + 1,
|
|
|
I_INDEX: 1 + "",
|
|
|
CODE: contentCode,
|
|
|
F_URL: url,
|
|
|
exposureEnd: 1,
|
|
|
}
|
|
|
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch(error){ }
|
...
|
...
|
@@ -216,7 +260,7 @@ export function productListFailure(error) { |
|
|
/*
|
|
|
* 底部产品列表
|
|
|
*/
|
|
|
export function getProductList(paramsDic) {
|
|
|
export function getProductList(paramsDic, template_id) {
|
|
|
return (dispatch, getState) => {
|
|
|
let {app, newArrival} = getState();
|
|
|
let { productList, filterFactors, searchResourceList, prdFloorId, prdFloorName, prdFloorIndex} = newArrival;
|
...
|
...
|
@@ -252,7 +296,7 @@ export function getProductList(paramsDic) { |
|
|
|
|
|
return new NewArrivalService(app.host).fetchProductList(channel, order, page, pageSize, allFilterFactors, paramsDic)
|
|
|
.then(json => {
|
|
|
let payload = exposeProductListData(json, order, channel, pageSize, tabId, tabName, prdFloorId, prdFloorName, prdFloorIndex);
|
|
|
let payload = exposeProductListData(json, order, channel, pageSize, tabId, tabName, prdFloorId, prdFloorName, prdFloorIndex, template_id);
|
|
|
payload.endReached = payload.currentPage == payload.pageCount;
|
|
|
|
|
|
if (payload.currentPage > 1) {
|
...
|
...
|
@@ -286,7 +330,7 @@ function reShuffleJumpList(jumplist, pageindex, pagesize) { |
|
|
}
|
|
|
}
|
|
|
|
|
|
function exposeProductListData(json, order, channel, pageSize, tabId, tabName, prdFloorId, prdFloorName, prdFloorIndex) {
|
|
|
function exposeProductListData(json, order, channel, pageSize, tabId, tabName, prdFloorId, prdFloorName, prdFloorIndex, template_id) {
|
|
|
let res = json;
|
|
|
try {
|
|
|
let list = json ? json.product_list : [];
|
...
|
...
|
@@ -314,7 +358,7 @@ function exposeProductListData(json, order, channel, pageSize, tabId, tabName, p |
|
|
PRD_CHANNEL: prdChannel,
|
|
|
RECALL_TYPE: recallType,
|
|
|
PRD_TYPE: prdType,
|
|
|
|
|
|
CODE: template_id ? template_id: '',
|
|
|
F_NAME: prdFloorName,
|
|
|
F_INDEX: prdFloorIndex,
|
|
|
F_ID:prdFloorId,
|
...
|
...
|
|