Authored by lijing

品牌页

@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 'use strict'; 7 'use strict';
8 8
9 var api = global.yoho.API; 9 var api = global.yoho.API;
10 - 10 +const service = global.yoho.ServiceAPI;
11 11
12 /* 男生频道取品牌广告及热门品牌数据的位置码 */ 12 /* 男生频道取品牌广告及热门品牌数据的位置码 */
13 let CODE_TOPPOS_BOYS = 'ce6ac059493ec26241a8cbe0bfa1b17a'; 13 let CODE_TOPPOS_BOYS = 'ce6ac059493ec26241a8cbe0bfa1b17a';
@@ -26,15 +26,20 @@ let CODE_TOPPOS_LIFESTYLE = 'f1aa914fd23cbcda71a87de6f5416c75'; @@ -26,15 +26,20 @@ let CODE_TOPPOS_LIFESTYLE = 'f1aa914fd23cbcda71a87de6f5416c75';
26 */ 26 */
27 27
28 const _packageAd = (params) => { 28 const _packageAd = (params) => {
29 - return api.get('', {  
30 - method: 'app.brand.newBrandList',  
31 - yh_channel: params.channel  
32 29
33 - }, { code: 200 }).then(result => { 30 + return service.get('/operations/api/v5/resource/home', {
  31 + content_code: '5a9b5bcfd2e13d56c9ba6b867a325dc1',
  32 + gender: 1,
  33 + limit: 1000,
  34 + page: 1
  35 + }).then(result => {
  36 +
  37 + console.log(result);
34 38
35 - return result; 39 + return result;
36 40
37 }); 41 });
  42 +
38 }; 43 };
39 44
40 const _packageList = (params) => { 45 const _packageList = (params) => {
@@ -44,7 +49,7 @@ const _packageList = (params) => { @@ -44,7 +49,7 @@ const _packageList = (params) => {
44 49
45 }, { code: 200 }).then(result => { 50 }, { code: 200 }).then(result => {
46 51
47 - return result; 52 + return result;
48 53
49 }); 54 });
50 }; 55 };
@@ -52,46 +57,46 @@ const _packageList = (params) => { @@ -52,46 +57,46 @@ const _packageList = (params) => {
52 const _package = (params) => { 57 const _package = (params) => {
53 return api.all([ 58 return api.all([
54 59
55 - _packageAd(params), 60 + _packageAd(params),
56 //_packageList(params) 61 //_packageList(params)
57 62
58 ]).then(result => { 63 ]).then(result => {
59 64
60 - console.log(result[0]); 65 + //console.log(result[0]);
61 66
62 - return result; 67 + return result;
63 68
64 }); 69 });
65 }; 70 };
66 71
67 const getBrandByChannel = (channel) => { 72 const getBrandByChannel = (channel) => {
68 73
69 - let params = {}; 74 + let params = {};
70 75
71 - /* 根据频道调用接口 */ 76 + /* 根据频道调用接口 */
72 switch (channel) { 77 switch (channel) {
73 - case '1': // 男生 78 + case '1': // 男生
74 params = { 79 params = {
75 - contentCode: CODE_TOPPOS_BOYS,  
76 - channel: 1 80 + contentCode: CODE_TOPPOS_BOYS,
  81 + channel: 1
77 }; 82 };
78 break; 83 break;
79 - case '2': // 女生 84 + case '2': // 女生
80 params = { 85 params = {
81 - contentCode: CODE_TOPPOS_GIRLS,  
82 - channel: 2 86 + contentCode: CODE_TOPPOS_GIRLS,
  87 + channel: 2
83 }; 88 };
84 break; 89 break;
85 - case '3': // 潮童 90 + case '3': // 潮童
86 params = { 91 params = {
87 - contentCode: CODE_TOPPOS_KIDS,  
88 - channel: 3 92 + contentCode: CODE_TOPPOS_KIDS,
  93 + channel: 3
89 }; 94 };
90 break; 95 break;
91 - case '4': // 创意生活 96 + case '4': // 创意生活
92 params = { 97 params = {
93 - contentCode: CODE_TOPPOS_LIFESTYLE,  
94 - channel: 4 98 + contentCode: CODE_TOPPOS_LIFESTYLE,
  99 + channel: 4
95 }; 100 };
96 break; 101 break;
97 default: 102 default:
@@ -44,6 +44,14 @@ a { @@ -44,6 +44,14 @@ a {
44 outline: none; 44 outline: none;
45 } 45 }
46 46
  47 +.hide {
  48 + display: none;
  49 +}
  50 +
  51 +.overflow-hidden {
  52 + overflow: hidden;
  53 +}
  54 +
47 .main-wrap { 55 .main-wrap {
48 position: relative; 56 position: relative;
49 margin-right: auto; 57 margin-right: auto;
@@ -54,8 +62,8 @@ a { @@ -54,8 +62,8 @@ a {
54 62
55 @font-face { 63 @font-face {
56 font-family: "iconfont"; 64 font-family: "iconfont";
57 - src: resolve("iconfont.eot"); /* IE9 */  
58 - 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- */ 65 + src: resolve('iconfont.eot'); /* IE9 */
  66 + 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- */
59 } 67 }
60 68
61 .iconfont { 69 .iconfont {
@@ -73,7 +81,7 @@ a { @@ -73,7 +81,7 @@ a {
73 display: none; 81 display: none;
74 text-align: center; 82 text-align: center;
75 width: 70%; 83 width: 70%;
76 - padding: 18PX 55PX; 84 + padding: 34PX 0;
77 top: 50%; 85 top: 50%;
78 left: 50%; 86 left: 50%;
79 margin-left: -35%; 87 margin-left: -35%;
@@ -87,12 +95,12 @@ a { @@ -87,12 +95,12 @@ a {
87 } 95 }
88 96
89 .order-failure { 97 .order-failure {
90 - background-image: resolve("common/order-good.jpg"); 98 + background-image: resolve('common/order-good.jpg');
91 background-size: 100%; 99 background-size: 100%;
92 } 100 }
93 101
94 .good-failure { 102 .good-failure {
95 - background-image: resolve("common/order-good.jpg"); 103 + background-image: resolve('common/order-good.jpg');
96 background-position-x: 40%; 104 background-position-x: 40%;
97 background-size: 132px !important; 105 background-size: 132px !important;
98 } 106 }
1 @import "common"; 1 @import "common";
2 @import "register"; 2 @import "register";
3 @import "login"; 3 @import "login";
4 -@import "sms-login";  
5 @import "back"; 4 @import "back";
6 @import "code"; 5 @import "code";
7 @import "bind"; 6 @import "bind";