Authored by xuqi

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

framework @ 119c247f
1 -Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2 1 +Subproject commit 119c247f5cf929aa1e059e40609bb16dd6b58f05
@@ -117,5 +117,5 @@ http { @@ -117,5 +117,5 @@ http {
117 #include /nginx/conf/vhosts/bbs.conf; 117 #include /nginx/conf/vhosts/bbs.conf;
118 #include /nginx/conf/vhosts/ezine.conf; 118 #include /nginx/conf/vhosts/ezine.conf;
119 #include /nginx/conf/vhosts/yohobill.conf; 119 #include /nginx/conf/vhosts/yohobill.conf;
120 - include /nginx/conf/vhosts/yohobuy.conf; 120 + include vhosts/yohobuy.conf;
121 } 121 }
@@ -4,7 +4,7 @@ server @@ -4,7 +4,7 @@ server
4 server_name m.dev.yohobuy.com *.dev.yohobuy.com; 4 server_name m.dev.yohobuy.com *.dev.yohobuy.com;
5 5
6 #access_log /nginx/logs/access_test_yoho_cn.log combined; 6 #access_log /nginx/logs/access_test_yoho_cn.log combined;
7 - error_log /nginx/logs/error_test_yoho_cn.log warn; 7 + error_log logs/error_test_yoho_cn.log warn;
8 8
9 root D:/workspace/yohobuy.git.dev.yoho.cn/yohobuy/m.yohobuy.com/public; 9 root D:/workspace/yohobuy.git.dev.yoho.cn/yohobuy/m.yohobuy.com/public;
10 10
@@ -22,7 +22,7 @@ server @@ -22,7 +22,7 @@ server
22 } 22 }
23 23
24 location ~ .*\.php?$ { 24 location ~ .*\.php?$ {
25 - fastcgi_pass 172.16.6.158:9000; 25 + fastcgi_pass 127.0.0.1:9000;
26 fastcgi_index index-dev.php; 26 fastcgi_index index-dev.php;
27 #fastcgi_param PATH_INFO $fastcgi_script_name; 27 #fastcgi_param PATH_INFO $fastcgi_script_name;
28 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 28 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
@@ -6,6 +6,10 @@ @@ -6,6 +6,10 @@
6 6
7 var $ = require('yoho.zepto'); 7 var $ = require('yoho.zepto');
8 8
  9 +var $searchBox = $('.search-box'),
  10 + $indexSearch = $('.index-search'),
  11 + $indexLogo = $('.index-logo');
  12 +
9 function downLoadApp() { 13 function downLoadApp() {
10 var appUrl = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&g_f=995445'; 14 var appUrl = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&g_f=995445';
11 var clickedAt = new Date(); 15 var clickedAt = new Date();
@@ -40,3 +44,42 @@ if (!window.cookie('_float-layer-app')) { @@ -40,3 +44,42 @@ if (!window.cookie('_float-layer-app')) {
40 $('#float-layer-app').hide(); 44 $('#float-layer-app').hide();
41 } 45 }
42 46
  47 +/**
  48 + * 频道选择页面顶部搜索
  49 + * @author: bikai<kai.bi@yoho.cn>
  50 + * @date: 2015/10/28
  51 + */
  52 +
  53 +$searchBox.find('input').on('focus', function () {
  54 + $indexLogo.css({
  55 + width: 0,
  56 + display: 'none'
  57 + });
  58 + $searchBox.css({
  59 + width: '12.8rem'
  60 + });
  61 + $indexSearch.css({
  62 + width: '15.5rem'
  63 + });
  64 + $('.clear-text, .no-search').show();
  65 +}).on('blur', function () {
  66 + $indexLogo.css({
  67 + width: '5.4rem',
  68 + display: 'block'
  69 + });
  70 + $searchBox.css({
  71 + width: '8.8rem'
  72 + });
  73 + $indexSearch.css({
  74 + width: '9.6rem'
  75 + });
  76 + $('.clear-text, .no-search').hide();
  77 +});
  78 +
  79 +$searchBox.find('.clear-text').tap(function () {
  80 + $searchBox.find('input').val('').trigger('focus');
  81 +});
  82 +
  83 +$searchBox.find('.search-icon').tap(function () {
  84 + $indexSearch.submit();
  85 +});
@@ -36,6 +36,14 @@ @@ -36,6 +36,14 @@
36 top: 0; 36 top: 0;
37 width: 50px; 37 width: 50px;
38 height: 50px; 38 height: 50px;
  39 +
  40 + .close-icon {
  41 + position: absolute;
  42 + left: 0;
  43 + top: 0;
  44 + color: #C0C0C0;
  45 + z-index: 2;
  46 + }
39 } 47 }
40 48
41 #float-layer-btn { 49 #float-layer-btn {
@@ -50,4 +58,16 @@ @@ -50,4 +58,16 @@
50 border-radius: 5px; 58 border-radius: 5px;
51 margin-top: -13px; 59 margin-top: -13px;
52 -webkit-tap-highlight-color: rgba(0, 0, 0, 0.5); 60 -webkit-tap-highlight-color: rgba(0, 0, 0, 0.5);
  61 +}
  62 +
  63 +.circle-rightbottom {
  64 + position: absolute;
  65 +
  66 + width: 25px;
  67 + height: 0px;
  68 + border:0 solid #323232;
  69 + border-bottom:25px solid #323232;
  70 + -moz-border-radius:0 0 25px 0;
  71 + -webkit-border-radius:0 0 25px 0;
  72 + border-radius:0 0 25px 0;
53 } 73 }
@@ -2,7 +2,71 @@ @@ -2,7 +2,71 @@
2 width: 100%; 2 width: 100%;
3 overflow: hidden; 3 overflow: hidden;
4 margin: 0 auto; 4 margin: 0 auto;
  5 + .index-header {
  6 + padding: 0 20rem / $pxConvertRem;
  7 + width: 100%;
  8 + height: 96rem / $pxConvertRem;
  9 + line-height: 96rem / $pxConvertRem;
5 10
  11 + .index-logo {
  12 + float: left;
  13 + font-size: 50rem / $pxConvertRem;
  14 + width: 216rem / $pxConvertRem;
  15 + color: #343434;
  16 + }
  17 +
  18 + .index-search {
  19 + float: right;
  20 + width: 384rem / $pxConvertRem;
  21 + .search-box {
  22 + float: left;
  23 + position: relative;
  24 + top: 20rem / $pxConvertRem;
  25 + width: 352rem / $pxConvertRem;
  26 + height: 56rem / $pxConvertRem;
  27 + padding-right: 40rem / $pxConvertRem;
  28 + z-index: 1;
  29 + transition: width 400ms;
  30 + box-sizing: border-box;
  31 + border: 1px solid #ccc;
  32 + overflow: hidden;
  33 + }
  34 + input {
  35 + float: left;
  36 + width: 100%;
  37 + font-size: 28rem / $pxConvertRem;
  38 + padding: 10rem / $pxConvertRem;
  39 + color: #999;
  40 + overflow: hidden;
  41 + border: none;
  42 + }
  43 + .iconfont {
  44 + position: absolute;
  45 + top: 8rem / $pxConvertRem;
  46 + width: 40rem / $pxConvertRem;
  47 + font-size: 28rem / $pxConvertRem;
  48 + z-index: 1;
  49 + line-height: 40rem / $pxConvertRem;
  50 + }
  51 + .clear-text {
  52 + display: none;
  53 + right: 50rem / $pxConvertRem;
  54 + color: #ccc;
  55 + }
  56 + .search-icon {
  57 + right: 10rem / $pxConvertRem;
  58 + color: #e6e6e6;
  59 + }
  60 + }
  61 +
  62 + .no-search {
  63 + display: none;
  64 + float: left;
  65 + margin-right: 10rem / $pxConvertRem;
  66 + color: #999;
  67 + font-size: 28rem / $pxConvertRem;
  68 + }
  69 + }
6 .index-container { 70 .index-container {
7 position: relative; 71 position: relative;
8 @include transition(transform 0.5s); 72 @include transition(transform 0.5s);
@@ -40,10 +40,10 @@ @@ -40,10 +40,10 @@
40 <p> 40 <p>
41 <a href="{{url}}">{{name}} 41 <a href="{{url}}">{{name}}
42 {{# isHot}} 42 {{# isHot}}
43 - <i class="icon-hot">H</i> 43 + <i class="icon-hot">Hot</i>
44 {{/ isHot}} 44 {{/ isHot}}
45 {{# isNew}} 45 {{# isNew}}
46 - <i class="icon-new">N</i> 46 + <i class="icon-new">New</i>
47 {{/ isNew}} 47 {{/ isNew}}
48 </a> 48 </a>
49 </p> 49 </p>
@@ -3,6 +3,17 @@ @@ -3,6 +3,17 @@
3 <div class="index-page yoho-page"> 3 <div class="index-page yoho-page">
4 4
5 <div class="index-container"> 5 <div class="index-container">
  6 + <div class="index-header clearfix">
  7 + <div class="iconfont index-logo">&#xe60e;</div>
  8 + <form action="http://search.m.yohobuy.com" class="index-search">
  9 + <a href="javascript:void(0);" class="no-search">取消</a>
  10 + <div class="search-box">
  11 + <input type="text" name="query" placeholder="搜索">
  12 + <span class="iconfont clear-text">&#xe623;</span>
  13 + <span class="iconfont search-icon">&#xe60f;</span>
  14 + </div>
  15 + </form>
  16 + </div>
6 17
7 <div class="index-channel"> 18 <div class="index-channel">
8 <img class="img" src="{{background}}" alt=""> 19 <img class="img" src="{{background}}" alt="">
@@ -5,7 +5,8 @@ @@ -5,7 +5,8 @@
5 <p>新用户首单减10元</p> 5 <p>新用户首单减10元</p>
6 </div> 6 </div>
7 <a href="javascript:void(0);" id="float-layer-close" > 7 <a href="javascript:void(0);" id="float-layer-close" >
8 - <img src="http://static.yohobuy.com/m/v1/img/close_new.png" width="22"> 8 + <i class="close-icon iconfont">&#xe623;</i>
  9 + <div class="circle-rightbottom"></div>
9 </a> 10 </a>
10 <a href="http://m.yohobuy.com/download/hyapp" id="float-layer-btn"> 11 <a href="http://m.yohobuy.com/download/hyapp" id="float-layer-btn">
11 立即下载 12 立即下载
@@ -14,4 +15,4 @@ @@ -14,4 +15,4 @@
14 {{/showDownloadApp}} 15 {{/showDownloadApp}}
15 16
16 17
17 -  
  18 +
@@ -5,8 +5,9 @@ @@ -5,8 +5,9 @@
5 {{# list}} 5 {{# list}}
6 <li class="swiper-slide"> 6 <li class="swiper-slide">
7 <a href="{{url}}"> 7 <a href="{{url}}">
8 - <img src="{{img}}" alt=""> 8 + <img class="swiper-lazy" data-src="{{img}}">
9 </a> 9 </a>
  10 + <div class="swiper-lazy-preloader"></div>
10 </li> 11 </li>
11 {{/ list}} 12 {{/ list}}
12 </ul> 13 </ul>
@@ -20,4 +21,5 @@ @@ -20,4 +21,5 @@
20 <a href={{url}}> 21 <a href={{url}}>
21 <img class="img" src={{img}}> 22 <img class="img" src={{img}}>
22 </a> 23 </a>
23 -{{/if}}  
  24 +{{/if}}
  25 +