Authored by lijing

品牌页

... ... @@ -7,7 +7,7 @@
'use strict';
var api = global.yoho.API;
const service = global.yoho.ServiceAPI;
/* 男生频道取品牌广告及热门品牌数据的位置码 */
let CODE_TOPPOS_BOYS = 'ce6ac059493ec26241a8cbe0bfa1b17a';
... ... @@ -26,15 +26,20 @@ let CODE_TOPPOS_LIFESTYLE = 'f1aa914fd23cbcda71a87de6f5416c75';
*/
const _packageAd = (params) => {
return api.get('', {
method: 'app.brand.newBrandList',
yh_channel: params.channel
}, { code: 200 }).then(result => {
return service.get('/operations/api/v5/resource/home', {
content_code: '5a9b5bcfd2e13d56c9ba6b867a325dc1',
gender: 1,
limit: 1000,
page: 1
}).then(result => {
console.log(result);
return result;
return result;
});
};
const _packageList = (params) => {
... ... @@ -44,7 +49,7 @@ const _packageList = (params) => {
}, { code: 200 }).then(result => {
return result;
return result;
});
};
... ... @@ -52,46 +57,46 @@ const _packageList = (params) => {
const _package = (params) => {
return api.all([
_packageAd(params),
_packageAd(params),
//_packageList(params)
]).then(result => {
console.log(result[0]);
//console.log(result[0]);
return result;
return result;
});
};
const getBrandByChannel = (channel) => {
let params = {};
let params = {};
/* 根据频道调用接口 */
/* 根据频道调用接口 */
switch (channel) {
case '1': // 男生
case '1': // 男生
params = {
contentCode: CODE_TOPPOS_BOYS,
channel: 1
contentCode: CODE_TOPPOS_BOYS,
channel: 1
};
break;
case '2': // 女生
case '2': // 女生
params = {
contentCode: CODE_TOPPOS_GIRLS,
channel: 2
contentCode: CODE_TOPPOS_GIRLS,
channel: 2
};
break;
case '3': // 潮童
case '3': // 潮童
params = {
contentCode: CODE_TOPPOS_KIDS,
channel: 3
contentCode: CODE_TOPPOS_KIDS,
channel: 3
};
break;
case '4': // 创意生活
case '4': // 创意生活
params = {
contentCode: CODE_TOPPOS_LIFESTYLE,
channel: 4
contentCode: CODE_TOPPOS_LIFESTYLE,
channel: 4
};
break;
default:
... ...
... ... @@ -44,6 +44,14 @@ a {
outline: none;
}
.hide {
display: none;
}
.overflow-hidden {
overflow: hidden;
}
.main-wrap {
position: relative;
margin-right: auto;
... ... @@ -54,8 +62,8 @@ a {
@font-face {
font-family: "iconfont";
src: resolve("iconfont.eot"); /* IE9 */
src: resolve("iconfont.eot?#iefix") format("embedded-opentype"), resolve("iconfont.woff") format("woff"), resolve("iconfont.ttf") format("truetype"), resolve("iconfont.svg#iconfont") format("svg"); /* iOS 4.1- */
src: resolve('iconfont.eot'); /* IE9 */
src: resolve('iconfont.eot?#iefix') format('embedded-opentype'), resolve('iconfont.woff') format('woff'), resolve('iconfont.ttf') format('truetype'), resolve('iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
... ... @@ -73,7 +81,7 @@ a {
display: none;
text-align: center;
width: 70%;
padding: 18PX 55PX;
padding: 34PX 0;
top: 50%;
left: 50%;
margin-left: -35%;
... ... @@ -87,12 +95,12 @@ a {
}
.order-failure {
background-image: resolve("common/order-good.jpg");
background-image: resolve('common/order-good.jpg');
background-size: 100%;
}
.good-failure {
background-image: resolve("common/order-good.jpg");
background-image: resolve('common/order-good.jpg');
background-position-x: 40%;
background-size: 132px !important;
}
... ...
@import "common";
@import "register";
@import "login";
@import "sms-login";
@import "back";
@import "code";
@import "bind";
... ...