...
|
...
|
@@ -140,26 +140,29 @@ const convertActicityData = (data) => { |
|
|
return {data: formatData, showMore: showMore};
|
|
|
};
|
|
|
|
|
|
const getHomeActivity = () => {
|
|
|
const getHomeActivity = (id) => {
|
|
|
var params = {
|
|
|
method: 'app.outlets.activityGet',
|
|
|
platform: 2,
|
|
|
size: 0,
|
|
|
yh_channel: 1,
|
|
|
type: 0,
|
|
|
type: id,
|
|
|
sort: 2,
|
|
|
client_type: 'h5'
|
|
|
};
|
|
|
|
|
|
return api.get('', sign.apiSign(params)).then(res => {
|
|
|
if (id === 0) {
|
|
|
return convertActicityData(res.data);
|
|
|
}
|
|
|
return res.data;
|
|
|
});
|
|
|
};
|
|
|
|
|
|
exports.getContent = () => {
|
|
|
let floorsData = {};
|
|
|
|
|
|
return Promise.all([getNavData(), getOutletResource(), getHomeActivity(), getGoodsList()]).then(data => {
|
|
|
return Promise.all([getNavData(), getOutletResource(), getHomeActivity(0), getGoodsList()]).then(data => {
|
|
|
floorsData.nav = data[0] || [];
|
|
|
floorsData.content = data[1] || [];
|
|
|
floorsData.activity = data[2] || [];
|
...
|
...
|
@@ -178,3 +181,15 @@ exports.getActivity = () => { |
|
|
return data;
|
|
|
});
|
|
|
};
|
|
|
|
|
|
exports.willBeEnd = () => {
|
|
|
return getHomeActivity(3).then(res => {
|
|
|
return res;
|
|
|
});
|
|
|
};
|
|
|
|
|
|
exports.willBeCome = () => {
|
|
|
return getHomeActivity(4).then(res => {
|
|
|
return res;
|
|
|
});
|
|
|
}; |
...
|
...
|
|