Authored by xuqi

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

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