...
|
...
|
@@ -8,15 +8,32 @@ |
|
|
const service = global.yoho.ServiceAPI;
|
|
|
const helpers = global.yoho.helpers;
|
|
|
const _ = require('lodash');
|
|
|
const index = () => {
|
|
|
|
|
|
|
|
|
const _indexBoys = () => {
|
|
|
return service.get('/operations/api/v5/resource/home', {
|
|
|
content_code: '797c299afc4170452cf7b2048806b6b8',
|
|
|
gender: 1,
|
|
|
limit: 1000,
|
|
|
page: 1
|
|
|
});
|
|
|
};
|
|
|
|
|
|
const _index = () => {
|
|
|
return service.get('/operations/api/v5/resource/home', {
|
|
|
content_code: '5a9b5bcfd2e13d56c9ba6b867a325dc1',
|
|
|
content_code: '8512bf0755cc549ac323f852c9fd945d',
|
|
|
gender: 1,
|
|
|
limit: 1000,
|
|
|
page: 1,
|
|
|
debug: 'XYZ'
|
|
|
}).then(result => {
|
|
|
page: 1
|
|
|
});
|
|
|
};
|
|
|
|
|
|
const index = () => {
|
|
|
|
|
|
return service.all([
|
|
|
_indexBoys(),
|
|
|
_index()
|
|
|
]).then(result => {
|
|
|
|
|
|
let resu = {
|
|
|
swiper: [],
|
...
|
...
|
@@ -25,17 +42,17 @@ const index = () => { |
|
|
download: []
|
|
|
};
|
|
|
|
|
|
if (result.data.list[0]) {
|
|
|
if (result[0].data.list[0] && result[0].data) {
|
|
|
|
|
|
let headerTip = result.data.list[0].data.text;
|
|
|
let headerTip = result[0].data.list[0].data.text;
|
|
|
|
|
|
resu = Object.assign(resu, { headerTip });
|
|
|
|
|
|
}
|
|
|
|
|
|
if (result.data.list[1]) {
|
|
|
if (result[1].data.list[0].data && result[1].data) {
|
|
|
|
|
|
let adList = result.data.list[1].data.list;
|
|
|
let adList = result[1].data.list[0].data;
|
|
|
|
|
|
let build = [];
|
|
|
|
...
|
...
|
@@ -48,9 +65,13 @@ const index = () => { |
|
|
|
|
|
resu.swiper = build;
|
|
|
|
|
|
let floorList = result.data.list[1].data.list;
|
|
|
}
|
|
|
|
|
|
if (result[0].data.list[1] && result[0].data) {
|
|
|
|
|
|
let floorList = result[0].data.list[1].data.list;
|
|
|
|
|
|
let floorAdListTitle = result.data.list[1].data.title.title;
|
|
|
let floorAdListTitle = result[0].data.list[1].data.title.title;
|
|
|
|
|
|
resu = _.assign(resu, { floorAdListTitle });
|
|
|
|
...
|
...
|
@@ -73,9 +94,9 @@ const index = () => { |
|
|
|
|
|
}
|
|
|
|
|
|
if (result.data.list[2]) {
|
|
|
if (result[0].data.list[2] && result[0].data) {
|
|
|
|
|
|
let newsList = result.data.list[2].data.list[0];
|
|
|
let newsList = result[0].data.list[2].data.list[0];
|
|
|
|
|
|
let news = [{
|
|
|
img: helpers.image(newsList.src, 640, 370),
|
...
|
...
|
@@ -88,9 +109,9 @@ const index = () => { |
|
|
|
|
|
}
|
|
|
|
|
|
if (result.data.list[3]) {
|
|
|
if (result[0].data.list[3] && result[0].data) {
|
|
|
|
|
|
let downlist = result.data.list[3].data[0];
|
|
|
let downlist = result[0].data.list[3].data[0];
|
|
|
|
|
|
let down = [{
|
|
|
img: helpers.image(downlist.src, 640, 275),
|
...
|
...
|
|