...
|
...
|
@@ -54,18 +54,18 @@ const convertNavData = (list) => { |
|
|
return {data: formatData};
|
|
|
};
|
|
|
|
|
|
const getNavData = () => {
|
|
|
const getNavData = (categoryId) => {
|
|
|
const params = {
|
|
|
// client_type: 'iphone',
|
|
|
// os_version: 8.4,
|
|
|
// screen_size: '320x568',
|
|
|
v: 7,
|
|
|
|
|
|
// parent_id: 1107,
|
|
|
parent_id: categoryId,
|
|
|
debug: 'XYZ'
|
|
|
};
|
|
|
|
|
|
return api.get('operations/api/v6/category/getCategory', sign.apiSign(params)).then(result => {
|
|
|
return serviceApi.get('operations/api/v6/category/getCategory', sign.apiSign(params)).then(result => {
|
|
|
if (result && result.code === 200) {
|
|
|
return convertNavData(result.data);
|
|
|
} else {
|
...
|
...
|
@@ -162,10 +162,10 @@ const getHomeActivity = (id) => { |
|
|
});
|
|
|
};
|
|
|
|
|
|
exports.getContent = () => {
|
|
|
exports.getContent = (categoryId) => {
|
|
|
let floorsData = {};
|
|
|
|
|
|
return Promise.all([getNavData(), getOutletResource(), getHomeActivity(0), getGoodsList()]).then(data => {
|
|
|
return Promise.all([getNavData(categoryId), getOutletResource(), getHomeActivity(0), getGoodsList()]).then(data => {
|
|
|
floorsData.nav = data[0] || [];
|
|
|
floorsData.content = data[1] || [];
|
|
|
floorsData.activity = data[2] || [];
|
...
|
...
|
|