Authored by lijing

品牌页

... ... @@ -24,44 +24,106 @@ let CODE_TOPPOS_LIFESTYLE = 'f1aa914fd23cbcda71a87de6f5416c75';
/**
* 获取频道接口
*/
const _package = () => {
const _packageAd = (params) => {
return api.get('', {
method: 'app.brand.newBrandList'
}, {code: 200});
method: 'app.brand.newBrandList',
yh_channel: params.channel
}, { code: 200 }).then(result => {
return result;
});
};
const getBrandByChannel = (channel) => {
const _packageList = (params) => {
return api.get('', {
method: 'app.brand.newBrandList',
yh_channel: params.channel
return api.all([
}, { code: 200 }).then(result => {
_package()
return result;
]).then(result => {
});
};
let resu = {
channel: {
channels: [
{
name: 'Boy'
},
{
name: 'Girl'
},
{
name: 'Kid'
},
{
name: 'Lifestyle'
},
]
}
};
const _package = (params) => {
return api.all([
resu.channel.channels[channel - 1].active = true;
_packageAd(params),
//_packageList(params)
return resu;
]).then(result => {
console.log(result[0]);
return result;
});
};
const getBrandByChannel = (channel) => {
});
let params = {};
/* 根据频道调用接口 */
switch (channel) {
case '1': // 男生
params = {
contentCode: CODE_TOPPOS_BOYS,
channel: 1
};
break;
case '2': // 女生
params = {
contentCode: CODE_TOPPOS_GIRLS,
channel: 2
};
break;
case '3': // 潮童
params = {
contentCode: CODE_TOPPOS_KIDS,
channel: 3
};
break;
case '4': // 创意生活
params = {
contentCode: CODE_TOPPOS_LIFESTYLE,
channel: 4
};
break;
default:
}
return api.all([
_package(params)
]).then(result => {
let resu = {
channel: {
channels: [{
name: 'Boy'
}, {
name: 'Girl'
}, {
name: 'Kid'
}, {
name: 'Lifestyle'
}, ]
}
};
resu.channel.channels[channel - 1].active = true;
return resu;
});
};
module.exports = {
... ...