|
@@ -54,18 +54,18 @@ const convertNavData = (list) => { |
|
@@ -54,18 +54,18 @@ const convertNavData = (list) => { |
54
|
return {data: formatData};
|
54
|
return {data: formatData};
|
55
|
};
|
55
|
};
|
56
|
|
56
|
|
57
|
-const getNavData = () => {
|
57
|
+const getNavData = (categoryId) => {
|
58
|
const params = {
|
58
|
const params = {
|
59
|
// client_type: 'iphone',
|
59
|
// client_type: 'iphone',
|
60
|
// os_version: 8.4,
|
60
|
// os_version: 8.4,
|
61
|
// screen_size: '320x568',
|
61
|
// screen_size: '320x568',
|
62
|
v: 7,
|
62
|
v: 7,
|
63
|
|
63
|
|
64
|
- // parent_id: 1107,
|
64
|
+ parent_id: categoryId,
|
65
|
debug: 'XYZ'
|
65
|
debug: 'XYZ'
|
66
|
};
|
66
|
};
|
67
|
|
67
|
|
68
|
- return api.get('operations/api/v6/category/getCategory', sign.apiSign(params)).then(result => {
|
68
|
+ return serviceApi.get('operations/api/v6/category/getCategory', sign.apiSign(params)).then(result => {
|
69
|
if (result && result.code === 200) {
|
69
|
if (result && result.code === 200) {
|
70
|
return convertNavData(result.data);
|
70
|
return convertNavData(result.data);
|
71
|
} else {
|
71
|
} else {
|
|
@@ -162,10 +162,10 @@ const getHomeActivity = (id) => { |
|
@@ -162,10 +162,10 @@ const getHomeActivity = (id) => { |
162
|
});
|
162
|
});
|
163
|
};
|
163
|
};
|
164
|
|
164
|
|
165
|
-exports.getContent = () => {
|
165
|
+exports.getContent = (categoryId) => {
|
166
|
let floorsData = {};
|
166
|
let floorsData = {};
|
167
|
|
167
|
|
168
|
- return Promise.all([getNavData(), getOutletResource(), getHomeActivity(0), getGoodsList()]).then(data => {
|
168
|
+ return Promise.all([getNavData(categoryId), getOutletResource(), getHomeActivity(0), getGoodsList()]).then(data => {
|
169
|
floorsData.nav = data[0] || [];
|
169
|
floorsData.nav = data[0] || [];
|
170
|
floorsData.content = data[1] || [];
|
170
|
floorsData.content = data[1] || [];
|
171
|
floorsData.activity = data[2] || [];
|
171
|
floorsData.activity = data[2] || [];
|