Authored by 姜枫

Merge branch 'feature/outlat-optim' into release/optim-3

Showing 37 changed files with 458 additions and 273 deletions
@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
8 const mRoot = '../models'; 8 const mRoot = '../models';
9 const plusstarModel = require(`${mRoot}/plusstar`); 9 const plusstarModel = require(`${mRoot}/plusstar`);
10 const headerModel = require('../../../doraemon/models/header'); // 头部model 10 const headerModel = require('../../../doraemon/models/header'); // 头部model
  11 +const _ = require('lodash');
11 let channels = { 12 let channels = {
12 boys: 1, 13 boys: 1,
13 girl: 2, 14 girl: 2,
@@ -33,16 +34,66 @@ exports.index = (req, res, next) => { @@ -33,16 +34,66 @@ exports.index = (req, res, next) => {
33 }; 34 };
34 } 35 }
35 36
36 - plusstarModel.getAllChannels({gender: gender, app_type: 0}).then(result => { 37 + let result = {};
  38 +
  39 + plusstarModel.getAllChannels({
  40 + gender: gender,
  41 + app_type: 0
  42 + }).then(data => {
  43 + result = Object.assign(result, data);
  44 + let focus = _.find(result.channel, d => d.focus) || {};
  45 + let code = focus.code || '';
  46 +
  47 + return plusstarModel.getResourcesData({
  48 + content_code: code,
  49 + yh_channel: 1
  50 + }, {
  51 + isApp: isApp
  52 + });
  53 + }).then(data => {
  54 + result = Object.assign(result, data);
37 res.render('plusstar/index', Object.assign({ 55 res.render('plusstar/index', Object.assign({
38 page: 'plusstar-index', 56 page: 'plusstar-index',
39 result: result, 57 result: result,
40 isApp: isApp, 58 isApp: isApp,
41 - title: title 59 + title: title,
  60 + localCss: true
42 }, parameter)); 61 }, parameter));
43 }).catch(next); 62 }).catch(next);
44 }; 63 };
45 64
  65 +exports.userSkn = (req, res, next) => {
  66 + let isApp = req.body.app_version || req.body.appVersion || false;
  67 + let uid = '';
  68 + let param = {};
  69 + let skns = req.body.skns || '';
  70 +
  71 + skns = skns.split(',') || [];
  72 +
  73 + if (req.yoho.isApp) {
  74 + uid = req.body.uid;
  75 + } else {
  76 + uid = req.user.uid;
  77 + }
  78 +
  79 + if (uid) {
  80 + param.uid = uid;
  81 + param.content_code = req.body.code || '';
  82 + param.yh_channel = req.body.yh_channel || 1;
  83 +
  84 + plusstarModel.getFashionPrefer(param, {
  85 + isApp: isApp
  86 + }).then(result => {
  87 + let preferSkns = result.data || [];
  88 +
  89 + skns = _.uniq(skns.concat(preferSkns));
  90 + res.json(skns);
  91 + }).catch(next);
  92 + } else {
  93 + res.json(skns);
  94 + }
  95 +};
  96 +
46 /** 97 /**
47 * 潮流优选首页-资源位 98 * 潮流优选首页-资源位
48 */ 99 */
@@ -94,7 +145,8 @@ exports.resourcesGoodsList = (req, res, next) => { @@ -94,7 +145,8 @@ exports.resourcesGoodsList = (req, res, next) => {
94 res.render('plusstar/resources-goodsList', { 145 res.render('plusstar/resources-goodsList', {
95 layout: false, 146 layout: false,
96 result: result, 147 result: result,
97 - title: '潮流优选' 148 + title: '潮流优选',
  149 + _noLazy: true
98 }); 150 });
99 }).catch(next); 151 }).catch(next);
100 }; 152 };
@@ -12,6 +12,8 @@ const plustarModel = require(`${mRoot}/plustar`); @@ -12,6 +12,8 @@ const plustarModel = require(`${mRoot}/plustar`);
12 const htmlProcess = require(`${global.utils}/html-process`); 12 const htmlProcess = require(`${global.utils}/html-process`);
13 const headerModel = require('../../../doraemon/models/header'); // 头部model 13 const headerModel = require('../../../doraemon/models/header'); // 头部model
14 const crypto = global.yoho.crypto; 14 const crypto = global.yoho.crypto;
  15 +const _ = require('lodash');
  16 +
15 let channels = { 17 let channels = {
16 boys: '1,3', 18 boys: '1,3',
17 girl: '2,3', 19 girl: '2,3',
@@ -36,6 +38,14 @@ const getListData = (req, res, next) => { @@ -36,6 +38,14 @@ const getListData = (req, res, next) => {
36 38
37 if (type === '2') { 39 if (type === '2') {
38 plustarModel.getBrandsData(gender, starBrand, originalBrand, channel, isRecommend).then((result) => { 40 plustarModel.getBrandsData(gender, starBrand, originalBrand, channel, isRecommend).then((result) => {
  41 +
  42 + _.forEach(result, r => {
  43 + let list = r.list || [];
  44 + let head3 = _.take(list, 3);
  45 + _.forEach(head3, d => d._noLazy = true);
  46 + });
  47 +
  48 +
39 res.render('plustar/list', { 49 res.render('plustar/list', {
40 module: 'guang', 50 module: 'guang',
41 page: 'plustar-list', 51 page: 'plustar-list',
@@ -44,12 +54,17 @@ const getListData = (req, res, next) => { @@ -44,12 +54,17 @@ const getListData = (req, res, next) => {
44 navTitle: '明星原创' 54 navTitle: '明星原创'
45 }), 55 }),
46 pageFooter: true, 56 pageFooter: true,
47 - ps: result 57 + ps: result,
  58 + localCss: true
48 }); 59 });
49 }).catch(next); 60 }).catch(next);
50 } else { 61 } else {
51 plustarModel.getListData(gender, recom, all).then((result) => { 62 plustarModel.getListData(gender, recom, all).then((result) => {
52 - 63 + _.forEach(result, r => {
  64 + let list = r.list || [];
  65 + let head3 = _.take(list, 3);
  66 + _.forEach(head3, d => d._noLazy = true);
  67 + });
53 res.render('plustar/list', { 68 res.render('plustar/list', {
54 module: 'guang', 69 module: 'guang',
55 page: 'plustar-list', 70 page: 'plustar-list',
@@ -58,7 +73,8 @@ const getListData = (req, res, next) => { @@ -58,7 +73,8 @@ const getListData = (req, res, next) => {
58 navTitle: '国际优选' 73 navTitle: '国际优选'
59 }), 74 }),
60 pageFooter: true, 75 pageFooter: true,
61 - ps: result 76 + ps: result,
  77 + localCss: true
62 }); 78 });
63 }).catch(next); 79 }).catch(next);
64 } 80 }
@@ -102,7 +118,8 @@ const getDetailData = (req, res, next) => { @@ -102,7 +118,8 @@ const getDetailData = (req, res, next) => {
102 pageHeader: headerModel.setNav({ 118 pageHeader: headerModel.setNav({
103 navTitle: result.brand_name 119 navTitle: result.brand_name
104 }), 120 }),
105 - ps: result 121 + ps: result,
  122 + localCss: true
106 }); 123 });
107 } else { 124 } else {
108 res.render('plustar/detail', { 125 res.render('plustar/detail', {
@@ -111,7 +128,8 @@ const getDetailData = (req, res, next) => { @@ -111,7 +128,8 @@ const getDetailData = (req, res, next) => {
111 title: result.brand_name, 128 title: result.brand_name,
112 ps: result, 129 ps: result,
113 uid: uid, 130 uid: uid,
114 - isApp: isApp ? true : false 131 + isApp: isApp ? true : false,
  132 + localCss: true
115 }); 133 });
116 } 134 }
117 135
@@ -93,7 +93,6 @@ const getResources = (params, options) => { @@ -93,7 +93,6 @@ const getResources = (params, options) => {
93 if (options.isApp) { 93 if (options.isApp) {
94 params.platform = 'iphone'; 94 params.platform = 'iphone';
95 } 95 }
96 -  
97 return serviceAPI.get('operations/api/v5/resource/get', params, { 96 return serviceAPI.get('operations/api/v5/resource/get', params, {
98 cache: true 97 cache: true
99 }).then(result => { 98 }).then(result => {
@@ -69,7 +69,7 @@ const getContentData = (gender, type, channel, isRecommend) => { @@ -69,7 +69,7 @@ const getContentData = (gender, type, channel, isRecommend) => {
69 param.is_recommend = isRecommend; 69 param.is_recommend = isRecommend;
70 } 70 }
71 71
72 - return serviceAPI.get('guang/api/v3/plustar/getlist', param).then((result) => { 72 + return serviceAPI.get('guang/api/v3/plustar/getlist', param, {cache: true}).then((result) => {
73 if (result && result.code === 200) { 73 if (result && result.code === 200) {
74 return formaData(result.data.data.list[0].data, gender); 74 return formaData(result.data.data.list[0].data, gender);
75 } else { 75 } else {
@@ -133,7 +133,7 @@ const getNewProduct = (brandId, gender, url, isApp) => { @@ -133,7 +133,7 @@ const getNewProduct = (brandId, gender, url, isApp) => {
133 limit: 6, 133 limit: 6,
134 order: 's_t_desc', 134 order: 's_t_desc',
135 page: 1 135 page: 1
136 - }).then((result) => { 136 + }, {cache: true}).then((result) => {
137 137
138 if (result && result.code === 200) { 138 if (result && result.code === 200) {
139 139
@@ -301,7 +301,7 @@ const getDetailData = (id, uid, udid, gender, isApp, clientType) => { @@ -301,7 +301,7 @@ const getDetailData = (id, uid, udid, gender, isApp, clientType) => {
301 return serviceAPI.get('guang/api/v1/plustar/getbrandinfo', { 301 return serviceAPI.get('guang/api/v1/plustar/getbrandinfo', {
302 id: id, 302 id: id,
303 client_type: clientType 303 client_type: clientType
304 - }).then((result) => { 304 + }, {cache: true}).then((result) => {
305 if (result && result.code === 200) { 305 if (result && result.code === 200) {
306 let list = result.data || []; 306 let list = result.data || [];
307 let jumpToApp; 307 let jumpToApp;
@@ -325,12 +325,12 @@ const getDetailData = (id, uid, udid, gender, isApp, clientType) => { @@ -325,12 +325,12 @@ const getDetailData = (id, uid, udid, gender, isApp, clientType) => {
325 325
326 list.brand_ico = imageProcess.getSourceUrl(list.brand_ico, 'brandLogo'); 326 list.brand_ico = imageProcess.getSourceUrl(list.brand_ico, 'brandLogo');
327 327
328 - return Promise.all([isCollection(brandId, clientType, uid), getRelatedEditorial(brandId, uid, udid, clientType, isApp), getNewProduct(brandId, gender, url, isApp)]).then((result) => { 328 + return Promise.all([getRelatedEditorial(brandId, uid, udid, clientType, isApp), getNewProduct(brandId, gender, url, isApp)]).then((result) => {
329 329
330 list = _.assign(list, { 330 list = _.assign(list, {
331 - isLike: result[0],  
332 - infos: result[1],  
333 - newArrival: result[2], 331 + isLike: false,
  332 + infos: result[0],
  333 + newArrival: result[1],
334 jumpToApp: jumpToApp, 334 jumpToApp: jumpToApp,
335 shareLink: '//guang.m.yohobuy.com/plustar/brandinfo?id=' + id, 335 shareLink: '//guang.m.yohobuy.com/plustar/brandinfo?id=' + id,
336 shareTitle: list.brand_name, 336 shareTitle: list.brand_name,
@@ -32,6 +32,7 @@ router.post('/star/setFavorite', star.setFavorite); // 收藏文章 @@ -32,6 +32,7 @@ router.post('/star/setFavorite', star.setFavorite); // 收藏文章
32 router.get('/', homeController.index); // 逛首页 32 router.get('/', homeController.index); // 逛首页
33 33
34 router.get('/plusstar', plusstar.index); // 潮流优选 34 router.get('/plusstar', plusstar.index); // 潮流优选
  35 +router.post('/plusstar/userSkn', plusstar.userSkn); // 用户推荐skn
35 router.get('/plusstar/resources-template', plusstar.resourcesTemplate); // 潮流优选首页-资源位 36 router.get('/plusstar/resources-template', plusstar.resourcesTemplate); // 潮流优选首页-资源位
36 router.post('/plusstar/resources-goodsList', plusstar.resourcesGoodsList); // 潮流优选首页-资源位-商品列表 37 router.post('/plusstar/resources-goodsList', plusstar.resourcesGoodsList); // 潮流优选首页-资源位-商品列表
37 router.get('/', index.index); // 逛首页 38 router.get('/', index.index); // 逛首页
1 <div class='yoho-page plusstar-page'> 1 <div class='yoho-page plusstar-page'>
2 - {{#if result.channel}}  
3 - <div class="tab-nav">  
4 - <ul>  
5 - {{#each result.channel}}  
6 - <li class='{{#if focus}} focus {{/if}}' data-code='{{code}}'>  
7 - <span>{{mame}}</span>  
8 - </li>  
9 - {{/each}}  
10 - </ul>  
11 - </div>  
12 - {{/if}}  
13 - <!--/tab-nav--> 2 + {{#if result.channel}}
  3 + <div class="tab-nav {{#if isApp}}isApp{{/if}}">
  4 + <ul>
  5 + {{#each result.channel}}
  6 + <li class='{{#if focus}} focus {{/if}}' data-code='{{code}}'>
  7 + <span>{{mame}}</span>
  8 + </li>
  9 + {{/each}}
  10 + </ul>
  11 + </div>
  12 + {{/if}}
  13 + <!--/tab-nav-->
14 14
15 <div class="plusstar-resources"> 15 <div class="plusstar-resources">
16 - <!--资源位数据模板-->  
17 - </div><!--/plusstar-resources-->  
18 - {{> common/suspend-home}}  
19 -</div><!--/plusstar-page-->  
  16 + <!--资源位数据模板-->
  17 +
  18 + {{> plusstar/resources}}
  19 +
  20 + </div>
  21 + <!--/plusstar-resources-->
  22 + {{> common/suspend-home}}
  23 +</div>
  24 +<!--/plusstar-page-->
1 -<div class="resources">  
2 - <!--banner-->  
3 - {{#if result.focus1}}  
4 - <div class="banner-top">  
5 - <div class="banner-swiper swiper-container">  
6 - <ul class="swiper-wrapper" data-id={{result.focus1.id}}>  
7 - {{#each result.focus1.data}}  
8 - {{#if @first}}  
9 - <li class="swiper-slide">  
10 - <a href="{{url}}">  
11 - <img src="{{image src 750 364}}">  
12 - </a>  
13 - </li>  
14 - {{^}}  
15 - <li class="swiper-slide">  
16 - <a href="{{url}}">  
17 - <img class="swiper-lazy" data-src="{{image src 750 364}}">  
18 - </a>  
19 - </li>  
20 - {{/if}}  
21 - {{/each}}  
22 - </ul>  
23 - </div>  
24 - <div class="swiper-pagination">  
25 - <div class="pagination-inner">  
26 - </div>  
27 - </div>  
28 - </div>  
29 - {{/if}}  
30 -  
31 - {{#each result.title_image}}  
32 - <div class='speck-title-image' data-fid='{{id}}' data-name='{{title}}'>  
33 - <div class="header-title">  
34 - {{title}}  
35 - {{#if moreName}}  
36 - <a class="more" href="{{moreUrl}}">{{moreName}}</a>  
37 - {{/if}}  
38 - </div>  
39 - <div class="title-image">  
40 - <a class="image" href="{{image.url}}">  
41 - <img class="lazy" data-original="{{image image.src 750 364}}">  
42 - </a>  
43 - </div>  
44 - </div>  
45 - {{/each}}  
46 -  
47 - {{#if result.focus2.data}}  
48 - <div class="focus-left-right speck-title-image" data-fid='{{result.focus2.id}}' data-name='焦点图'>  
49 - {{#each result.focus2.data}}  
50 - <a href="{{url}}" title="{{title}}">  
51 - <img src="{{image src 250 250}}">  
52 - </a>  
53 - {{/each}}  
54 - </div>  
55 - {{/if}}  
56 - <!--/focus-left-right-->  
57 -  
58 - {{#if result.recommend}}  
59 - <div class='speck-title-image' data-fid='{{result.recommend.id}}' data-name='{{result.recommend.title.name}}'>  
60 - {{#if result.recommend.title}}  
61 - <div class="header-title">  
62 - {{result.recommend.title.name}}  
63 - {{#if result.recommend.title.moreName}}  
64 - <a class="more" href="{{result.recommend.title.moreUrl}}">  
65 - {{result.recommend.title.moreName}}  
66 - </a>  
67 - {{/if}}  
68 - </div>  
69 - {{/if}}  
70 - {{#if result.recommend.data}}  
71 - <div class="recommend-content-five">  
72 - {{#each result.recommend.data}}  
73 - <a href="{{url}}">  
74 - <img class="lazy" data-original="{{image src 375 375}}">  
75 - </a>  
76 - {{/each}}  
77 - </div>  
78 - {{/if}}  
79 - </div>  
80 - {{/if}}  
81 -  
82 - {{#if result.goods.title}}  
83 - <div class="header-title">  
84 - {{result.goods.title.name}}  
85 - {{#if result.goods.title.moreName}}  
86 - <a class="more" href="{{result.goods.title.moreUrl}}">  
87 - {{result.goods.title.moreName}}  
88 - </a>  
89 - {{/if}}  
90 - <input type='hidden' value='{{result.goods.productSkns}}' class='product-skns' />  
91 - </div>  
92 -  
93 - <div class="goods clearfix">  
94 - <!--商品--->  
95 -  
96 - </div><!--/goods-->  
97 - {{/if}}  
98 -  
99 -</div><!--/resources-->  
100 - 1 +{{> plusstar/resources}}
1 <div class="ps-detail-page ps-page yoho-page"> 1 <div class="ps-detail-page ps-page yoho-page">
2 {{# ps}} 2 {{# ps}}
3 <div id="brand-info" class="header brand-info ps-block" data-id="{{brand_id}}"> 3 <div id="brand-info" class="header brand-info ps-block" data-id="{{brand_id}}">
4 - <img class="banner lazy" data-original="{{image cover_img 640 309}}">  
5 - <img class="logo lazy" src="{{brand_ico}}"> 4 + <img class="banner" src="{{image2 cover_img w=640 h=309 q=60}}">
  5 + <img class="logo" src="{{image2 brand_ico q=60}}">
6 <div class="header-content clearfix"> 6 <div class="header-content clearfix">
7 <p class="name-islike-container"> 7 <p class="name-islike-container">
8 <span class="name">{{brand_name}}</span> 8 <span class="name">{{brand_name}}</span>
@@ -114,4 +114,4 @@ @@ -114,4 +114,4 @@
114 114
115 <input type="hidden" name="uid" value="{{uid}}"> 115 <input type="hidden" name="uid" value="{{uid}}">
116 <input type="hidden" name="isApp" value="{{isApp}}"> 116 <input type="hidden" name="isApp" value="{{isApp}}">
117 -</div>  
  117 +</div>
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 </div> 25 </div>
26 <div class="good-detail-img"> 26 <div class="good-detail-img">
27 <a class="good-thumb buriedpoint" href="{{url}}" data-bp-id="shop_good_{{thumb}}_0"> 27 <a class="good-thumb buriedpoint" href="{{url}}" data-bp-id="shop_good_{{thumb}}_0">
28 - <img class="lazy" data-original="{{thumb}}"> 28 + <img src="{{thumb}}">
29 </a> 29 </a>
30 {{# is_soon_sold_out}} 30 {{# is_soon_sold_out}}
31 <p class="few-tag">即将售罄</p> 31 <p class="few-tag">即将售罄</p>
@@ -55,4 +55,4 @@ @@ -55,4 +55,4 @@
55 </div> 55 </div>
56 </div> 56 </div>
57 </div> 57 </div>
58 -{{/if}}  
  58 +{{/if}}
  1 +<div class="resources">
  2 + <!--banner-->
  3 + {{#if result.focus1}}
  4 + <div class="banner-top">
  5 + <div class="banner-swiper swiper-container">
  6 + <ul class="swiper-wrapper" data-id={{result.focus1.id}}>
  7 + {{#each result.focus1.data}}
  8 + {{#if @first}}
  9 + <li class="swiper-slide">
  10 + <a href="{{url}}">
  11 + <img src="{{image2 src w=750 h=364 q=60}}">
  12 + </a>
  13 + </li>
  14 + {{^}}
  15 + <li class="swiper-slide">
  16 + <a href="{{url}}">
  17 + <img class="swiper-lazy" data-src="{{image2 src w=750 h=364 q=60}}">
  18 + </a>
  19 + </li>
  20 + {{/if}}
  21 + {{/each}}
  22 + </ul>
  23 + </div>
  24 + <div class="swiper-pagination">
  25 + <div class="pagination-inner">
  26 + </div>
  27 + </div>
  28 + </div>
  29 + {{/if}}
  30 +
  31 + {{#each result.title_image}}
  32 + <div class='speck-title-image' data-fid='{{id}}' data-name='{{title}}'>
  33 + <div class="header-title">
  34 + {{title}}
  35 + {{#if moreName}}
  36 + <a class="more" href="{{moreUrl}}">{{moreName}}</a>
  37 + {{/if}}
  38 + </div>
  39 + <div class="title-image">
  40 + <a class="image" href="{{image.url}}">
  41 + <img src="{{image2 image.src w=750 h=364 q=60}}">
  42 + </a>
  43 + </div>
  44 + </div>
  45 + {{/each}}
  46 +
  47 + {{#if result.focus2.data}}
  48 + <div class="focus-left-right speck-title-image" data-fid='{{result.focus2.id}}' data-name='焦点图'>
  49 + {{#each result.focus2.data}}
  50 + <a href="{{url}}" title="{{title}}">
  51 + <img src="{{image2 src w=250 h=250 q=60}}">
  52 + </a>
  53 + {{/each}}
  54 + </div>
  55 + {{/if}}
  56 + <!--/focus-left-right-->
  57 +
  58 + {{#if result.recommend}}
  59 + <div class='speck-title-image' data-fid='{{result.recommend.id}}' data-name='{{result.recommend.title.name}}'>
  60 + {{#if result.recommend.title}}
  61 + <div class="header-title">
  62 + {{result.recommend.title.name}}
  63 + {{#if result.recommend.title.moreName}}
  64 + <a class="more" href="{{result.recommend.title.moreUrl}}">
  65 + {{result.recommend.title.moreName}}
  66 + </a>
  67 + {{/if}}
  68 + </div>
  69 + {{/if}}
  70 + {{#if result.recommend.data}}
  71 + <div class="recommend-content-five">
  72 + {{#each result.recommend.data}}
  73 + <a href="{{url}}">
  74 + <img class="lazy" data-original="{{image2 src w=375 h=375 q=60}}">
  75 + </a>
  76 + {{/each}}
  77 + </div>
  78 + {{/if}}
  79 + </div>
  80 + {{/if}}
  81 +
  82 + {{#if result.goods.title}}
  83 + <div class="header-title">
  84 + {{result.goods.title.name}}
  85 + {{#if result.goods.title.moreName}}
  86 + <a class="more" href="{{result.goods.title.moreUrl}}">
  87 + {{result.goods.title.moreName}}
  88 + </a>
  89 + {{/if}}
  90 + <input type='hidden' value='{{result.goods.productSkns}}' class='product-skns' />
  91 + </div>
  92 +
  93 + <div class="goods clearfix">
  94 + <!--商品--->
  95 +
  96 + </div><!--/goods-->
  97 + {{/if}}
  98 +
  99 +</div><!--/resources-->
  100 +
@@ -5,7 +5,11 @@ @@ -5,7 +5,11 @@
5 {{# imgs}} 5 {{# imgs}}
6 <div class="swiper-slide"> 6 <div class="swiper-slide">
7 <a href={{url}}> 7 <a href={{url}}>
8 - <img class="swiper-lazy" data-src={{image img 640 310 2}}> 8 + {{#if @first}}
  9 + <img src={{image2 img w=640 h=310 mode=2 q=60}}>
  10 + {{^}}
  11 + <img class="swiper-lazy" data-src={{image2 img w=640 h=310 mode=2 q=60}}>
  12 + {{/if}}
9 </a> 13 </a>
10 </div> 14 </div>
11 {{/ imgs}} 15 {{/ imgs}}
@@ -17,10 +21,14 @@ @@ -17,10 +21,14 @@
17 </div> 21 </div>
18 {{^}} 22 {{^}}
19 <a href={{url}}> 23 <a href={{url}}>
20 - <img class="lazy" data-original={{image img 640 310 2}}> 24 + {{#if _noLazy}}
  25 + <img src={{image2 img w=640 h=310 mode=2 q=60}}>
  26 + {{^}}
  27 + <img class="lazy" data-original={{image2 img w=640 h=310 mode=2 q=60}}>
  28 + {{/if}}
21 </a> 29 </a>
22 {{/if}} 30 {{/if}}
23 {{# deps}} 31 {{# deps}}
24 <p class="brand-deps">{{.}}</p> 32 <p class="brand-deps">{{.}}</p>
25 {{/ deps}} 33 {{/ deps}}
26 -</li>  
  34 +</li>
@@ -35,6 +35,7 @@ exports.index = (req, res, next) => { @@ -35,6 +35,7 @@ exports.index = (req, res, next) => {
35 35
36 outletModel.getContent(categoryId, yhChannel, contentcode).then(result => { 36 outletModel.getContent(categoryId, yhChannel, contentcode).then(result => {
37 res.render('outlet', Object.assign({ 37 res.render('outlet', Object.assign({
  38 + localCss: true,
38 pageHeader: headerData, 39 pageHeader: headerData,
39 title: '奥莱 | Yoho!Buy有货 | 潮流购物逛不停', 40 title: '奥莱 | Yoho!Buy有货 | 潮流购物逛不停',
40 }, result)); 41 }, result));
@@ -43,6 +44,7 @@ exports.index = (req, res, next) => { @@ -43,6 +44,7 @@ exports.index = (req, res, next) => {
43 44
44 // 奥莱活动详情页 45 // 奥莱活动详情页
45 exports.activityDetail = (req, res, next) => { 46 exports.activityDetail = (req, res, next) => {
  47 +
46 outletModel.getActivity(req.query.id).then(result => { 48 outletModel.getActivity(req.query.id).then(result => {
47 let headerData = headerModel.setNav({ 49 let headerData = headerModel.setNav({
48 navTitle: result.activityTitle, 50 navTitle: result.activityTitle,
@@ -50,9 +52,11 @@ exports.activityDetail = (req, res, next) => { @@ -50,9 +52,11 @@ exports.activityDetail = (req, res, next) => {
50 }); 52 });
51 53
52 res.render('outlet/activity', Object.assign({ 54 res.render('outlet/activity', Object.assign({
  55 + localCss: true,
53 page: 'outlet-detail', 56 page: 'outlet-detail',
54 pageHeader: headerData, 57 pageHeader: headerData,
55 - pageFooter: true 58 + pageFooter: true,
  59 + _noLazy: true
56 }, result)); 60 }, result));
57 }).catch(next); 61 }).catch(next);
58 }; 62 };
@@ -226,7 +226,8 @@ let search = (req, res, next) => { @@ -226,7 +226,8 @@ let search = (req, res, next) => {
226 res.render('sale/product', Object.assign({ 226 res.render('sale/product', Object.assign({
227 layout: false, 227 layout: false,
228 params: params, 228 params: params,
229 - goods: result[0] 229 + goods: result[0],
  230 + _noLazy: params._noLazy || false
230 }, vipObj)); 231 }, vipObj));
231 }).catch(next); 232 }).catch(next);
232 }; 233 };
1 -<div class="outlet-page goods-page yoho-page"> 1 +<div class="outlet-page outlet-activity-page goods-page yoho-page">
2 {{#activity}} 2 {{#activity}}
3 {{> resources/acivity-outlets}} 3 {{> resources/acivity-outlets}}
4 {{/activity}} 4 {{/activity}}
1 <nav class="outlet-nav outlet-category-nav"> 1 <nav class="outlet-nav outlet-category-nav">
2 - <ul>  
3 - {{!  
4 - <li class='cartegory'><a href="?gender=1,3">全部</a></li>  
5 - }}  
6 - {{#data}}  
7 - <li class='category'>  
8 - <a href="{{url}}" {{#if @first}}class="active"{{/if}}>{{categoryName}}</a>  
9 - {{#unless @last}}  
10 - <span>|</span>  
11 - {{/unless}}  
12 - </li>  
13 - {{/data}}  
14 - </ul> 2 + <div class="nav-main">
  3 + <ul>
  4 + {{!
  5 + <li class='cartegory'><a href="?gender=1,3">全部</a></li>
  6 + }}
  7 + {{#data}}
  8 + <li class='category'>
  9 + <a href="{{url}}" {{#if @first}}class="active"{{/if}}>{{categoryName}}</a>
  10 + {{#unless @last}}
  11 + <span>|</span>
  12 + {{/unless}}
  13 + </li>
  14 + {{/data}}
  15 + </ul>
  16 + </div>
15 </nav> 17 </nav>
16 {{> sale/common}} 18 {{> sale/common}}
@@ -38,6 +38,9 @@ const cachePage = { @@ -38,6 +38,9 @@ const cachePage = {
38 '/guang/author/index': 1 * MINUTE, 38 '/guang/author/index': 1 * MINUTE,
39 '/guang/tags/index': 1 * MINUTE, 39 '/guang/tags/index': 1 * MINUTE,
40 '/guang/plustar': 1 * MINUTE, 40 '/guang/plustar': 1 * MINUTE,
  41 + '/guang/plustar/brandinfo': 1 * MINUTE,
  42 + '/guang/plusstar': 1 * MINUTE,
  43 + '/guang/plusstar/resources-goodsList': 1 * MINUTE,
41 '/guang/index/page': 1 * MINUTE, 44 '/guang/index/page': 1 * MINUTE,
42 45
43 // '/guang/plustar/brandinfo': 1 * MINUTE, 46 // '/guang/plustar/brandinfo': 1 * MINUTE,
1 <div class="active-list"> 1 <div class="active-list">
2 <a class="back-ground-white {{#if hide}} hidden {{/if}}" href="{{activityUrl}}" > 2 <a class="back-ground-white {{#if hide}} hidden {{/if}}" href="{{activityUrl}}" >
3 - <img class="back-image" src="{{image coverUrl 640 300}}"> 3 + {{#if @root._noLazy}}
  4 + <img class="back-image" src="{{image2 coverUrl w=640 h=300 q=60}}">
  5 + {{^}}
  6 + <img class="back-image lazy" data-original="{{image2 coverUrl w=640 h=300 q=60}}">
  7 + {{/if}}
4 <div class="center-square"> 8 <div class="center-square">
5 <div class="title">{{title}}</div> 9 <div class="title">{{title}}</div>
6 <div class="num"><span class="discount-num">{{discountNum}}</span> {{discountText}}</div> 10 <div class="num"><span class="discount-num">{{discountNum}}</span> {{discountText}}</div>
@@ -13,7 +13,6 @@ @@ -13,7 +13,6 @@
13 <a href="{{url}}"> 13 <a href="{{url}}">
14 <img class="swiper-lazy" data-src="{{image2 src w=640 h=240 q=60}}"> 14 <img class="swiper-lazy" data-src="{{image2 src w=640 h=240 q=60}}">
15 </a> 15 </a>
16 - <div class="swiper-lazy-preloader"></div>  
17 </li> 16 </li>
18 {{/if}} 17 {{/if}}
19 {{/each}} 18 {{/each}}
@@ -3,14 +3,14 @@ @@ -3,14 +3,14 @@
3 <div class="left-container"> 3 <div class="left-container">
4 {{# left}} 4 {{# left}}
5 <a href="{{url}}"> 5 <a href="{{url}}">
6 - <div class="thumb-row-box left-thumb-row-box" style="background-image:url({{image src 276 296}})"></div> 6 + <div class="thumb-row-box left-thumb-row-box" style="background-image:url({{image2 src w=276 h=296 q=60}})"></div>
7 </a> 7 </a>
8 {{/ left}} 8 {{/ left}}
9 </div> 9 </div>
10 <div class="right-container"> 10 <div class="right-container">
11 {{# right}} 11 {{# right}}
12 <a href="{{url}}"> 12 <a href="{{url}}">
13 - <div class="thumb-row-box right-thumb-row-box {{#if @first}}first{{/if}}" style="background-image:url({{image src 276 134}})"></div> 13 + <div class="thumb-row-box right-thumb-row-box {{#if @first}}first{{/if}}" style="background-image:url({{image2 src w=276 h=134 q=60}})"></div>
14 </a> 14 </a>
15 {{/ right}} 15 {{/ right}}
16 </div> 16 </div>
1 <div class="thumb-row"> 1 <div class="thumb-row">
2 {{# data}} 2 {{# data}}
3 <a href="{{url}}"> 3 <a href="{{url}}">
4 - <div class="thumb-row-box" style="background-image:url({{image src 275 160}})"></div> 4 + <div class="thumb-row-box" style="background-image:url({{image2 src w=275 h=160 q=60}})"></div>
5 </a> 5 </a>
6 {{/ data}} 6 {{/ data}}
7 </div> 7 </div>
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <div class="trend-coll-content clearfix"> 4 <div class="trend-coll-content clearfix">
5 {{# article}} 5 {{# article}}
6 <div class="lspan"> 6 <div class="lspan">
7 - <a href="{{url}}"><img class="lazy rspanimg" data-original="{{image src 400 400}}" ></a> 7 + <a href="{{url}}"><img class="lazy rspanimg" data-original="{{image2 src w=400 h=400 q=60}}" ></a>
8 </div> 8 </div>
9 {{/ article}} 9 {{/ article}}
10 </div> 10 </div>
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 <div class="recommend-swiper"> 13 <div class="recommend-swiper">
14 <ul class="recommend-list swiper-wrapper clearfix"> 14 <ul class="recommend-list swiper-wrapper clearfix">
15 {{# recommend_collocation}} 15 {{# recommend_collocation}}
16 - <li class="recommend-item swiper-slide"><a href="{{url}}"><img class="img" src="{{image src 140 140}}" alt="" /></a></li> 16 + <li class="recommend-item swiper-slide"><a href="{{url}}"><img class="img" src="{{image2 src w=140 h=140 q=60}}" alt="" /></a></li>
17 {{/ recommend_collocation}} 17 {{/ recommend_collocation}}
18 </ul> 18 </ul>
19 </div> 19 </div>
1 var $ = require('yoho-jquery'), 1 var $ = require('yoho-jquery'),
2 tip = require('../plugin/tip'), 2 tip = require('../plugin/tip'),
3 - Swiper = require('yoho-swiper'), 3 + Swiper = require('yoho-swiper2'),
4 loading = require('../plugin/loading'), 4 loading = require('../plugin/loading'),
5 debounce = require('lodash/debounce'); 5 debounce = require('lodash/debounce');
6 6
@@ -15,6 +15,8 @@ var scrollFn, @@ -15,6 +15,8 @@ var scrollFn,
15 resourcesTp = {}, 15 resourcesTp = {},
16 CID; 16 CID;
17 17
  18 +require('guang/plusstar/index.page.css');
  19 +
18 require('yoho-jquery-lazyload'); 20 require('yoho-jquery-lazyload');
19 require('../common'); 21 require('../common');
20 22
@@ -87,8 +89,8 @@ plusstar = { @@ -87,8 +89,8 @@ plusstar = {
87 $tabUlDom.find('li').removeClass('focus'); 89 $tabUlDom.find('li').removeClass('focus');
88 $liDom.addClass('focus'); 90 $liDom.addClass('focus');
89 that.ParentLiDom = $liDom;// 保留当前tab先中的对象 91 that.ParentLiDom = $liDom;// 保留当前tab先中的对象
90 - that.tabNav($liDom.data('code'));  
91 - 92 + // that.tabNav($liDom.data('code'));
  93 + that.resInit();
92 // ent -- 默认选中 94 // ent -- 默认选中
93 setTimeout(function() { 95 setTimeout(function() {
94 that._yas(); 96 that._yas();
@@ -175,7 +177,6 @@ plusstar = { @@ -175,7 +177,6 @@ plusstar = {
175 searching = false;// 初始化翻页 177 searching = false;// 初始化翻页
176 178
177 function execResData(data) { 179 function execResData(data) {
178 - var productSkns = '';  
179 180
180 $('.plusstar-resources').html(data); 181 $('.plusstar-resources').html(data);
181 182
@@ -192,14 +193,6 @@ plusstar = { @@ -192,14 +193,6 @@ plusstar = {
192 193
193 that.resInit(); 194 that.resInit();
194 195
195 - $('.plusstar-resources').find('img.lazy').lazyload();  
196 -  
197 - productSkns = $(data).find('.product-skns').val();  
198 - if (productSkns) {  
199 - that.common.productSkns = productSkns.split(',');  
200 - }  
201 -  
202 - that.common.pageTotal = Math.ceil(that.common.productSkns.length / that.common.pagesize);  
203 } 196 }
204 197
205 if (resourcesTp[tabId]) { 198 if (resourcesTp[tabId]) {
@@ -218,7 +211,6 @@ plusstar = { @@ -218,7 +211,6 @@ plusstar = {
218 success: function(data) { 211 success: function(data) {
219 resourcesTp[tabId] = data; 212 resourcesTp[tabId] = data;
220 execResData(data); 213 execResData(data);
221 -  
222 // 页面中下拉曝光 214 // 页面中下拉曝光
223 setTimeout(function() { 215 setTimeout(function() {
224 if (window._yas && window._yas.sendAppLogs) { 216 if (window._yas && window._yas.sendAppLogs) {
@@ -273,6 +265,40 @@ plusstar = { @@ -273,6 +265,40 @@ plusstar = {
273 pagination: '.banner-top .pagination-inner' 265 pagination: '.banner-top .pagination-inner'
274 }); 266 });
275 } 267 }
  268 +
  269 + $('.plusstar-resources').find('img.lazy').lazyload();
  270 + var productSkns = '';
  271 + productSkns = $('.product-skns').val();
  272 + if (productSkns) {
  273 + this.common.productSkns = productSkns.split(',');
  274 + }
  275 +
  276 + this.common.pageTotal = Math.ceil(this.common.productSkns.length / this.common.pagesize);
  277 +
  278 + var that = this;
  279 + var tabId = that.ParentLiDom.index() + 1;
  280 + setTimeout(function() {
  281 + $.ajax({
  282 + type: 'POST',
  283 + url: '/guang/plusstar/userSkn',
  284 + data: {
  285 + skns: productSkns,
  286 + uid: window.queryString.uid,
  287 + app_version: isApp,
  288 + yh_channel: tabId
  289 + },
  290 + dataType: 'json',
  291 + success: function(data) {
  292 + if (data) {
  293 + that.common.productSkns = data;
  294 + }
  295 + that.common.pageTotal = Math.ceil(that.common.productSkns.length / that.common.pagesize);
  296 + },
  297 + error: function() {
  298 + tip.show('网络断开连接了~');
  299 + }
  300 + });
  301 + }, 300);
276 }, 302 },
277 goodsList: function() { 303 goodsList: function() {
278 var that = this, 304 var that = this,
@@ -353,13 +379,13 @@ scrollFn = debounce(function() { @@ -353,13 +379,13 @@ scrollFn = debounce(function() {
353 $(function() { 379 $(function() {
354 isApp = window.queryString.app_version || window.queryString.appVersion; 380 isApp = window.queryString.app_version || window.queryString.appVersion;
355 381
356 - if (isApp) {  
357 - $('.plusstar-resources').css({'margin-top': $('.tab-nav').height()});  
358 - } else {  
359 - $('.tab-nav').css({  
360 - position: 'relative'  
361 - });  
362 - } 382 + // if (isApp) {
  383 + // $('.plusstar-resources').css({'margin-top': $('.tab-nav').height()});
  384 + // } else {
  385 + // $('.tab-nav').css({
  386 + // position: 'relative'
  387 + // });
  388 + // }
363 389
364 // 男:1,女:2,潮童:3,创意生活:4 390 // 男:1,女:2,潮童:3,创意生活:4
365 CID = window.queryString.yh_channel || window._ChannelVary[window.cookie('_Channel')] || 1; 391 CID = window.queryString.yh_channel || window._ChannelVary[window.cookie('_Channel')] || 1;
@@ -27,6 +27,7 @@ var mIntro, aIntro, logoImg; @@ -27,6 +27,7 @@ var mIntro, aIntro, logoImg;
27 27
28 var moreHammer, likeHammer, $goodName, $title; 28 var moreHammer, likeHammer, $goodName, $title;
29 29
  30 +require('guang/plustar-detail.page.css');
30 require('../plugin/wx-share'); 31 require('../plugin/wx-share');
31 require('../common'); 32 require('../common');
32 require('./plustar-detail-render')(function() { 33 require('./plustar-detail-render')(function() {
@@ -49,11 +50,11 @@ if ($('.good-detail-text .name').length > 0) { @@ -49,11 +50,11 @@ if ($('.good-detail-text .name').length > 0) {
49 }); 50 });
50 } 51 }
51 52
52 -// 文字介绍文字截取  
53 -$intro[0].mlellipsis(3);  
54 -  
55 // 获取截取文字和完整文字 53 // 获取截取文字和完整文字
56 setTimeout(function() { 54 setTimeout(function() {
  55 + $intro.css('height', 'auto');
  56 + // 文字介绍文字截取
  57 + $intro[0].mlellipsis(3);
57 mIntro = $intro.text(); 58 mIntro = $intro.text();
58 aIntro = $intro.attr('title'); 59 aIntro = $intro.attr('title');
59 }); 60 });
@@ -5,10 +5,9 @@ var $ = require('yoho-jquery'), @@ -5,10 +5,9 @@ var $ = require('yoho-jquery'),
5 var $navs = $('#nav-tab > li'), 5 var $navs = $('#nav-tab > li'),
6 $contents = $('#ps-content > .content'); 6 $contents = $('#ps-content > .content');
7 7
  8 +require('guang/plustar-list.page.css');
8 require('../common'); 9 require('../common');
9 10
10 -var mySwiper;  
11 -  
12 lazyLoad($('img.lazy')); 11 lazyLoad($('img.lazy'));
13 12
14 $('#nav-tab').bind('contextmenu', function(e) { 13 $('#nav-tab').bind('contextmenu', function(e) {
@@ -31,10 +30,13 @@ $('#nav-tab').on('touchend touchcancel', function(e) { @@ -31,10 +30,13 @@ $('#nav-tab').on('touchend touchcancel', function(e) {
31 $this.swiper = false; 30 $this.swiper = false;
32 $contents.find('li').each(function(key, item) { 31 $contents.find('li').each(function(key, item) {
33 $(item).find('.swiper-container').addClass('swiper-' + key); 32 $(item).find('.swiper-container').addClass('swiper-' + key);
34 - mySwiper = new Swiper('.swiper-' + key, {  
35 - lazyLoading: true,  
36 - pagination: '.swiper-' + key + ' .pagination-inner'  
37 - }); 33 + if (!$(item).swiper) {
  34 + $(item).swiper = true;
  35 + new Swiper('.swiper-' + key, {
  36 + lazyLoading: true,
  37 + pagination: '.swiper-' + key + ' .pagination-inner'
  38 + });
  39 + }
38 }); 40 });
39 } 41 }
40 42
@@ -7,7 +7,9 @@ var search = require('./sale/search'); @@ -7,7 +7,9 @@ var search = require('./sale/search');
7 7
8 // var el = $('.cd-lite'); 8 // var el = $('.cd-lite');
9 9
10 -search.start(); 10 +require('../../scss/product/outlet/activity.page.css');
  11 +
  12 +search.start({}, {_noLazy: true});
11 13
12 ajaxActivityTime({ 14 ajaxActivityTime({
13 sort: 1, // 接口规定传1 15 sort: 1, // 接口规定传1
@@ -19,4 +21,4 @@ ajaxActivityTime({ @@ -19,4 +21,4 @@ ajaxActivityTime({
19 // el: el 21 // el: el
20 // }); 22 // });
21 23
22 -$('.back-ground-white').css('padding', '0'); 24 +// $('.back-ground-white').css('padding', '0');
1 var $ = require('yoho-jquery'), 1 var $ = require('yoho-jquery'),
2 - Swiper = require('yoho-swiper'), 2 + Swiper = require('yoho-swiper2'),
3 lazyLoad = require('yoho-jquery-lazyload'), 3 lazyLoad = require('yoho-jquery-lazyload'),
4 ajaxActivityTime = require('./outlet/ajaxActivityTime'); 4 ajaxActivityTime = require('./outlet/ajaxActivityTime');
5 5
@@ -8,9 +8,12 @@ var $categoryNavItem = $('.outlet-category-nav a'); @@ -8,9 +8,12 @@ var $categoryNavItem = $('.outlet-category-nav a');
8 var $categoryNav = $('.outlet-category-nav'); 8 var $categoryNav = $('.outlet-category-nav');
9 9
10 var search = require('./sale/search'); 10 var search = require('./sale/search');
11 -var iscroll = require('./outlet/nav');  
12 11
13 12
  13 +require('../../scss/product/outlet/_index.css');
  14 +
  15 +require('./outlet/nav');
  16 +
14 require('./outlet/fix-nav'); 17 require('./outlet/fix-nav');
15 require('./outlet/set-backurl'); 18 require('./outlet/set-backurl');
16 19
@@ -39,10 +42,12 @@ function searchInitParam(dom) { @@ -39,10 +42,12 @@ function searchInitParam(dom) {
39 } 42 }
40 43
41 if ($el.length > 0) { 44 if ($el.length > 0) {
42 - ajaxActivityTime({  
43 - type: 0, // 获取全部奥莱活动列表, 不区分是否将开始或结束  
44 - yh_channel: window.queryString.yh_channel  
45 - }); 45 + setTimeout(function(){
  46 + ajaxActivityTime({
  47 + type: 0, // 获取全部奥莱活动列表, 不区分是否将开始或结束
  48 + yh_channel: window.queryString.yh_channel
  49 + });
  50 + }, 500);
46 } 51 }
47 52
48 53
@@ -76,43 +81,44 @@ $categoryNavItem.on('click', function(e) { @@ -76,43 +81,44 @@ $categoryNavItem.on('click', function(e) {
76 // 触发第一个search 81 // 触发第一个search
77 if ($categoryNavItem.length > 0) { 82 if ($categoryNavItem.length > 0) {
78 // $categoryNavItem.eq(0).trigger('click'); 83 // $categoryNavItem.eq(0).trigger('click');
79 -  
80 - search.start({  
81 - type: 'category'  
82 - }, searchInitParam($categoryNavItem.eq(0))); 84 + setTimeout(function(){
  85 + search.start({
  86 + type: 'category'
  87 + }, searchInitParam($categoryNavItem.eq(0)));
  88 + }, 500);
83 } 89 }
84 90
85 // 导航滚动 91 // 导航滚动
86 -if ($('#index_nav').length > 0) {  
87 - iscroll({  
88 - el: '#index_nav'  
89 - }).goto($('#index_nav').find('.active').index());  
90 -}  
91 -  
92 -if ($('.outlet-category-nav').length > 0) {  
93 - iscroll({  
94 - el: '.outlet-category-nav'  
95 - }).goto(0);  
96 -} 92 +// if ($('#index_nav').length > 0) {
  93 +// iscroll({
  94 +// el: '#index_nav'
  95 +// }).goto($('#index_nav').find('.active').index());
  96 +// }
  97 +
  98 +// if ($('.outlet-category-nav').length > 0) {
  99 +// iscroll({
  100 +// el: '.outlet-category-nav'
  101 +// }).goto(0);
  102 +// }
97 103
98 // 更多活动按钮 104 // 更多活动按钮
99 -if ($('.back-ground-white').length > 10) {  
100 - $('.more-activity').show();  
101 - $('.back-ground-white').each(function(index, e) {  
102 - if (index > 9) {  
103 - $(e).hide();  
104 - }  
105 - });  
106 -}  
107 -  
108 -$('.more-activity').click(function() {  
109 - $('.more-activity').hide();  
110 - $('.back-ground-white').each(function(index, e) {  
111 - if (index > 9) {  
112 - $(e).show();  
113 - }  
114 - });  
115 -}); 105 +// if ($('.back-ground-white').length > 10) {
  106 +// $('.more-activity').show();
  107 +// $('.back-ground-white').each(function(index, e) {
  108 +// if (index > 9) {
  109 +// $(e).hide();
  110 +// }
  111 +// });
  112 +// }
  113 +
  114 +// $('.more-activity').click(function() {
  115 +// $('.more-activity').hide();
  116 +// $('.back-ground-white').each(function(index, e) {
  117 +// if (index > 9) {
  118 +// $(e).show();
  119 +// }
  120 +// });
  121 +// });
116 122
117 // 页面(包括图片在内)全部加载完才能设置导航悬浮效果,否则位置结算会不准 123 // 页面(包括图片在内)全部加载完才能设置导航悬浮效果,否则位置结算会不准
118 124
1 -var $ = require('yoho-jquery'),  
2 - IScroll = require('yoho-iscroll'); 1 +var $ = require('yoho-jquery');
3 2
4 var WILL_BEGIN = '即将开始'; 3 var WILL_BEGIN = '即将开始';
5 var WILL_END = '即将结束'; 4 var WILL_END = '即将结束';
6 var ONLINE_FORECAST = '上线预告'; 5 var ONLINE_FORECAST = '上线预告';
7 6
8 // nav 滚动 7 // nav 滚动
9 -function initNavScroll(opt) {  
10 - var $navBox,  
11 - iScroll,  
12 - _default = {  
13 - el: '.outlet-nav'  
14 - },  
15 - options;  
16 -  
17 - options = $.extend({}, _default, opt);  
18 - $navBox = $(options.el);  
19 -  
20 - function scroll(index) {  
21 - var $ele;  
22 -  
23 - $ele = $navBox.find('li').eq(index);  
24 - if ($ele.length > 0) {  
25 - setTimeout(function() {  
26 - iScroll.scrollToElement($ele[0], 400);  
27 - }, 1);  
28 - }  
29 - }  
30 -  
31 - iScroll = new IScroll($navBox[0], {  
32 - scrollX: true,  
33 - scrollY: false,  
34 - tap: true,  
35 - eventPassthrough: true,  
36 - preventDefault: true  
37 - });  
38 -  
39 - return {  
40 - goto: scroll  
41 - };  
42 -} 8 +// function initNavScroll(opt) {
  9 +// var $navBox,
  10 +// iScroll,
  11 +// _default = {
  12 +// el: '.outlet-nav'
  13 +// },
  14 +// options;
  15 +
  16 +// options = $.extend({}, _default, opt);
  17 +// $navBox = $(options.el);
  18 +
  19 +// function scroll(index) {
  20 +// var $ele;
  21 +
  22 +// $ele = $navBox.find('li').eq(index);
  23 +// if ($ele.length > 0) {
  24 +// setTimeout(function() {
  25 +// iScroll.scrollToElement($ele[0], 400);
  26 +// }, 1);
  27 +// }
  28 +// }
  29 +
  30 +// iScroll = new IScroll($navBox[0], {
  31 +// scrollX: true,
  32 +// scrollY: false,
  33 +// tap: true,
  34 +// eventPassthrough: true,
  35 +// preventDefault: true
  36 +// });
  37 +
  38 +// return {
  39 +// goto: scroll
  40 +// };
  41 +// }
43 42
44 // 获取url中的参数 43 // 获取url中的参数
45 function getUrlParam(name, url) { 44 function getUrlParam(name, url) {
@@ -118,5 +117,5 @@ function activeNav() { @@ -118,5 +117,5 @@ function activeNav() {
118 activeNav(); 117 activeNav();
119 118
120 119
121 -module.exports = initNavScroll; 120 +// module.exports = initNavScroll;
122 121
@@ -121,7 +121,6 @@ @@ -121,7 +121,6 @@
121 text-align: center; 121 text-align: center;
122 font-size: 18px; 122 font-size: 18px;
123 line-height: 32px; 123 line-height: 32px;
124 - z-index: 1;  
125 } 124 }
126 125
127 .no-storage { 126 .no-storage {
@@ -157,6 +157,8 @@ @@ -157,6 +157,8 @@
157 font-size: 24px; 157 font-size: 24px;
158 color: #444; 158 color: #444;
159 line-height: 150%; 159 line-height: 150%;
  160 + height: 108px;
  161 + overflow: hidden;
160 } 162 }
161 163
162 .more-intro { 164 .more-intro {
@@ -15,11 +15,15 @@ @@ -15,11 +15,15 @@
15 height: 80px; 15 height: 80px;
16 font-size: 26px; 16 font-size: 26px;
17 text-align: center; 17 text-align: center;
18 - position: fixed; 18 + position: relative;
19 z-index: 10; 19 z-index: 10;
20 background-color: #fff; 20 background-color: #fff;
21 top: 0; 21 top: 0;
22 22
  23 + &.isApp {
  24 + position: fixed;
  25 + }
  26 +
23 li { 27 li {
24 display: block; 28 display: block;
25 float: left; 29 float: left;
  1 +@import "../../layout/_swiper.css";
  2 +@import "../../common/_good.css";
  3 +@import './index';
  1 +
  2 +@import "../common/_good.css";
  3 +@import '../channel/floor-header';
  4 +@import './info';
  5 +@import './tvls';
  6 +@import './plus-star';
  1 +@import "../layout/_swiper.css";
  2 +@import './plus-star';
  3 +
@@ -37,10 +37,10 @@ @@ -37,10 +37,10 @@
37 position: relative; 37 position: relative;
38 padding: 20px 0; 38 padding: 20px 0;
39 width: 100%; 39 width: 100%;
  40 + height: 300px;
40 41
41 .back-image { 42 .back-image {
42 width: 100%; 43 width: 100%;
43 - height: auto;  
44 } 44 }
45 45
46 .center-square { 46 .center-square {
@@ -78,6 +78,7 @@ @@ -78,6 +78,7 @@
78 .time { 78 .time {
79 text-align: center; 79 text-align: center;
80 font-size: 22px; 80 font-size: 22px;
  81 + height: 32px;
81 } 82 }
82 83
83 } 84 }
1 @import "nav"; 1 @import "nav";
2 @import "left-right"; 2 @import "left-right";
3 @import "activity"; 3 @import "activity";
  4 +@import "../../layout/_swiper.css";
  5 +@import "../../channel/_banner-top.css";
  6 +@import "../../channel/_hot-category.css";
  7 +@import "../../channel/_icons-enter.css";
  8 +@import "../../channel/_banner-center.css";
  9 +@import "../../channel/_thumb-row.css";
  10 +@import "../../channel/_left-right.css";
  11 +@import "../../channel/_hot-brands.css";
  12 +@import "../../channel/_trendsetter-collocation.css";
  13 +@import "../../channel/_goods-category.css";
  14 +@import "../../channel/_creative-life.css";
  15 +@import "../../channel/_plus-star.css";
  16 +@import "../../channel/_floor-header.css";
  17 +@import "../../common/_good.css";
4 18
5 .outlet-page { 19 .outlet-page {
6 .good-tag, 20 .good-tag,
@@ -5,8 +5,16 @@ @@ -5,8 +5,16 @@
5 border-bottom: 1px solid #e0e0e0; 5 border-bottom: 1px solid #e0e0e0;
6 white-space: nowrap; 6 white-space: nowrap;
7 position: relative; 7 position: relative;
8 - overflow: hidden;  
9 background: #fff; 8 background: #fff;
  9 + overflow: hidden;
  10 +
  11 + .nav-main {
  12 + width: 100%;
  13 + height: 98px;
  14 + overflow-x: auto;
  15 + overflow-y: hidden;
  16 + -webkit-overflow-scrolling: touch;
  17 + }
10 18
11 ul { 19 ul {
12 padding: 0 20px; 20 padding: 0 20px;
  1 +
  2 +@import "activity";
  3 +@import "../../common/_good.css";
  4 +@import "../../common/_filter.css";
  5 +@import "../sale/_goods-list.css";
  6 +
  7 +
  8 +.outlet-activity-page {
  9 + .back-ground-white {
  10 + padding: 0;
  11 + }
  12 +}