Authored by 2586703@qq.com

Merge branch 'develop' of http://git.dev.yoho.cn/ued/yohogirls-frontend into ly_develop

调试冲突
Conflicts:
	web/package.json
compass compile --force --trace --output-style compressed
\ No newline at end of file
spm build --idleading {{}} --include all
\ No newline at end of file
... ...
... ... @@ -5,13 +5,16 @@
* date :2015-4-23
*/
var $ = require("jquery");
var $ = require("jquery"),
mlellipsis=require("mlellipsis");
require("lazyload");
var Swiper = require("yoho-idangerous.swiper"), tips = require("yoho-tips"), box = require("yoho-box");
var Swiper = require("yoho-idangerous.swiper"),
tips = require("yoho-tips"),
box = require("yoho-box");
var isFixed = false, popTop = $(".pop-container").offset().top, popLeft = $(".content").offset().left + $(".content").width() - $(".pop-container").width(), limitTop = $(".pager-content-default").offset().top + $(".pager-content-default").height() + 2 - $(".pop-container").height(), stopTop = $(".pager-content-default").offset().top - $(".pop-container").height(), stopLeft = $(".bottom-item-container").offset().left + $(".bottom-item-container").width() - $(".pop-container").width();
var clientWidth = $(window).width();
mlellipsis.init();
//pop=============================================================================================
var pop = new Swiper('.swiper-container3', {
loop : true,
... ... @@ -82,6 +85,8 @@ window.onresize = function() {
}
};
var maxLineNum=5;
$(".pop-link").find(".detail").mlellipsis(3,"pop-detail");
//================================================================================================
//首页碎片交互=================================================================================================
... ... @@ -172,4 +177,6 @@ $(".followus-input").keydown(function(event) {
$(".followus-button").trigger("click");
}
});
//===================================================================================================================
\ No newline at end of file
//===================================================================================================================
//pop的文字截取
\ No newline at end of file
... ...
... ... @@ -8,8 +8,17 @@ window.tmp$ = null;
var $ = require('jquery'),
Swiper = require("yoho-idangerous.swiper");
require("lazyload");
$(".lazy").lazyload();
//菜单初始化所使用变量
var menuTmpl = $("#menuItemTmpl").html(),
dataKey = null,
mustache = require("mustache"),
menuTmplVideo = $("#menuItemTmplVideo").html();
$.fn.top = function() {
if (arguments.length > 0) {
$(this).css("top", arguments[0]);
... ... @@ -28,8 +37,6 @@ $.fn.left = function() {
}
};
$(".lazy").lazyload();
//扩展jquery=================================================================
... ... @@ -130,16 +137,9 @@ $(window).scroll(function() {
}).show();
minMenuHasShow = true;
$(".enterprise-header-fixed").show();
$(".search-input-box").hide();
$(".home-search-button").hide();
window.isSearching = false;
//$(".search-text").width(73);
$(".search-text").find(".search-text-content").html("Search...");
$(".search-input-box").val("").hide().trigger("blur");
$(".search-area").find(".icons").show();
$(".home-search-button").hide();
window.isSearching = false;
$(document.body).trigger("click");
} else if (scrollTop < 177 && minMenuHasShow === true) {
$(".search-input-box").trigger("blur");
$("#maxEnterprise").css({
... ... @@ -147,16 +147,10 @@ $(window).scroll(function() {
});
$(".enterprise-header-fixed").hide();
$("#minEnterprise").hide();
$(".search-input-box").hide();
$(".home-search-button").hide();
window.isSearching = false;
minMenuHasShow = false;
//搜索归位
$(".search-text").find(".search-text-content").html("Search...");
$(".search-input-box").val("").hide().trigger("blur");
$(".search-area").find(".icons").show();
$(".home-search-button").hide();
window.isSearching = false;
$(document.body).trigger("click");
}
if (scrollTop > 0 && isTop === true) {
... ... @@ -282,13 +276,13 @@ function getBrowType() {
var info = {};
var sUserAgent = navigator.userAgent.toLowerCase();
info.bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
// info.bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
// info.bIsMidp = sUserAgent.match(/midp/i) == "midp";
// info.bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
// info.bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
// info.bIsAndroid = sUserAgent.match(/android/i) == "android";
// info.bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
// info.bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
// info.bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
// info.bIsMidp = sUserAgent.match(/midp/i) == "midp";
// info.bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
// info.bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
// info.bIsAndroid = sUserAgent.match(/android/i) == "android";
// info.bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
// info.bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
return info;
}
... ... @@ -301,7 +295,7 @@ if (!isIpad && $(".share").size() > 0) {
if (shareOffsetTop - scrollTop - navHeight <= 0) {
$(".share").css({
"position": "fixed",
"top": navHeight + 10
"top": navHeight
});
} else {
$(".share").css({
... ... @@ -312,18 +306,6 @@ if (!isIpad && $(".share").size() > 0) {
});
}
window.scrollWindow = function() {
if (document.body.clientWidth >= 1190) {
//document.body.scrollTop=850;
window.tmp$(window).scrollTop(850);
} else if (document.body.clientWidth < 1190 && document.body.clientWidth > 768) {
window.tmp$(window).scrollTop(700);
} else if (document.body.clientWidth <= 768) {
window.tmp$(window).scrollTop(600);
}
};
//搜索按钮===========================================================================
var clientWidth = $(window).width();
$(".search-input-box").keypress(function(event) {
... ... @@ -354,7 +336,7 @@ $(document.body).click(function() {
if (clientWidth <= 768) {
target.parent().removeAttr("style");
target.css({
width: "auto"
width: "65px"
});
} else {
target.animate({
... ... @@ -369,26 +351,28 @@ $(".search-text").click(function() {
});
$(".search-text").click(function() {
var clientWidth = document.body.clientWidth,
parent = null;
$(this).find(".search-text-content").hide();
parent = $(this).parent();
if (clientWidth <= 768) {
$(this).parent().width(131);
$(this).find(".home-search-button").show();
$(this).find(".search-input-box").width(80).val("").show();
$(this).find(".search-input-box").focus();
parent.width(131);
parent.find(".home-search-button").show();
parent.find(".search-input-box").width(80).val("").show();
parent.find(".search-input-box").focus();
$(this).width(120);
} else if (clientWidth >= 924 && clientWidth < 1080) {
$(this).parent().width(198);
$(this).find(".search-input-box").width(150).val("").show();
} else if (clientWidth >= 924 && clientWidth < 1190) {
parent.width(198);
parent.find(".search-input-box").width(150).val("").show();
$(this).animate({
width: 190
}, 500, function() {
$(this).find(".home-search-button").show();
$(this).find(".search-input-box").focus();
});
} else {
$(this).parent().width(218);
$(this).find(".search-input-box").width(150).val("").show();
} else if (clientWidth >= 1190) {
parent.width(218);
parent.find(".search-input-box").width(150).val("").show();
$(this).animate({
width: 190
}, 500, function() {
... ... @@ -402,7 +386,6 @@ $(".search-text").click(function() {
window.scrollWindow = function() {
if (document.body.clientWidth >= 1190) {
//document.body.scrollTop=850;
window.tmp$(window).scrollTop(850);
} else if (document.body.clientWidth < 1190 && document.body.clientWidth > 768) {
... ... @@ -411,4 +394,33 @@ window.scrollWindow = function() {
} else if (document.body.clientWidth <= 768) {
window.tmp$(window).scrollTop(600);
}
};
\ No newline at end of file
};
//初始化菜单============================================================================
$.ajax({
url: "http://newgirls.test.yoho.cn/default/default/getnewest",
dataType: "jsonp",
jsonp:"callback",
success : function(tmp) {
var data=tmp.data,
dataKey=null,
mustacheHtml=null,
_html=null;
for(dataKey in data){
if(dataKey!="video"){
mustacheHtml=mustache.render(menuTmpl,data);
_html=$(".submenu-"+dataKey).html();
$(".submenu-"+dataKey).html(mustacheHtml+_html);
}
else{
mustacheHtml=mustache.render(menuTmplVideo,data);
$(".submenu-video").find(".right-content").html(mustacheHtml);
}
}
}
});
//====================================================================================
\ No newline at end of file
... ...
... ... @@ -26,7 +26,7 @@
"yoho-tips": "0.0.1",
"mustache": "2.0.0",
"jquery.autocomplete": "~0.0.2",
"mlellipsis": "0.0.3",
"mlellipsis": "~0.0.3",
"jquery.rotate2d": "0.0.3",
"yoho-jsonp": "0.0.1"
},
... ...
... ... @@ -27,7 +27,6 @@
float:left;
margin-left:95px;
padding-top:29px;
text-align:left;
}
.usermark{
... ...
... ... @@ -103,7 +103,7 @@
float:left;
position:relative;
.link{
.menu-link{
@include blockwh(100%,100%);
cursor:pointer;
position:absolute;
... ... @@ -127,7 +127,7 @@
height:100%;
}
}
.text{
.menu-text{
@include blockwh(298px,auto);
font-size:18px;
line-height:22px;
... ... @@ -141,7 +141,7 @@
color:#000;
}
}
.detail{margin-top:10px;}
.menu-detail{margin-top:10px;}
}
}
.menu-item{
... ... @@ -926,7 +926,6 @@
width: 342px;
height: 495px;
cursor: pointer;
background:#f00;
.img{
width: 342px;
... ... @@ -1273,25 +1272,121 @@
}
.submenu-fashion {
left:-1px;
left:0px;
}
.submenu-sports {
left:-288px;
left:-287px;
}
.submenu-lifestyle {
left:-419px;
left:-418px;
}
.submenu-video {
left:-568px;
left:-567px;
.left-menu {
width:198px;
height:100%;
background:#f5f5f5;
position:absolute;
left:0;
top:0;
.menu-text{
@include blockwh(auto,50px);
line-height:50px;
font-size:22px;
padding-left:30px;
color:#000;
cursor:pointer;
&:hover{
color:#c9caca;
}
}
}
.right-content{
width:881px;
position:absolute;
right:0;
height:342px;
overflow:hidden;
}
.right-more {
width:200px;
position:absolute;
height: 50px;
margin: 0 auto;
float: left;
right:20px;
color:#000;
bottom: 0;
.more-content-right{
color:#000;
width:50px;
@include blockwh(100%,100%);
text-align:right;
}
}
}
.submenu-beauty {
left:-147px;
left:-146px;
}
.submenu-video-side{
margin:18px;
}
.submenu-video-mid{
margin:18px 5px;
}
.submenu-video-item{
height:304px;
width:266px;
float:left;
.link {
position:absolute;
@include blockwh(100%,100%);
cursor:pointer;
}
.a-img {
@include blockwh(266px,154px);
position:relative;
.a-video{
position:absolute;
left:50%;
top:50%;
@include blockwh(50px,43px);
margin: -21px 0 0 -25px;
background:url(../assets/images/vedio.png);
cursor:pointer;
z-index:9;
}
img{
width:100%;
height:100%;
}
}
.menu-text {
@include blockwh(226px,auto);
line-height:30px;
font-size:20px;
color:#000;
cursor:pointer;
text-align:center;
}
}
.content-item-detail-a-img{
... ...
... ... @@ -57,13 +57,13 @@
margin:0 auto;
position:relative;
.submenu{
width:668px;
height:395px;
width:628px;
height:295px;
background:url(../assets/images/submenubackground.png);
position:absolute;
z-index:50;
padding:0 20px ;
top:43px;
top:28px;
display:none;
.arrow {
width: 0;
... ... @@ -98,8 +98,8 @@
}
}
.content-item-menu{
margin-top:30px;
width:346px;
margin:30px 4px;
width:200px;
height:313px;
float:left;
position:relative;
... ... @@ -110,7 +110,7 @@
position:absolute;
z-index:1;
}
.a-img{@include blockwh(320px,204px);position:relative;
.a-img{@include blockwh(200px,127px);position:relative;
margin:0 auto 20px auto;
.a-video{
... ... @@ -128,8 +128,8 @@
height:100%;
}
}
.text{
@include blockwh(298px,auto);
.menu-text{
@include blockwh(200px,auto);
font-size:18px;
line-height:22px;
margin:0 15px;
... ... @@ -142,7 +142,7 @@
color:#000;
}
}
.detail{margin-top:10px;}
.menu-detail{margin-top:10px;}
}
}
.menu-item{
... ... @@ -660,7 +660,6 @@
letter-spacing:0;
@include blockwh(100%,100%);
&:hover {
color:#fff;
background:url(../assets/images/menu_hover.png) center bottom no-repeat;
}
.menu{@include blockwh(100%,100%);position:absolute;top:0;left:0;z-index:10;}
... ... @@ -1151,20 +1150,119 @@
}
.submenu-sports {
left:--213px;
left:-177px;
}
.submenu-lifestyle {
left:--286px;
left:-254px;
}
.submenu-video {
left:-369px;
left:-329px;
.left-menu {
width:125px;
height:100%;
background:#f5f5f5;
position:absolute;
left:0;
top:0;
.menu-text{
@include blockwh(auto,50px);
line-height:50px;
font-size:14px;
padding-left:20px;
color:#000;
cursor:pointer;
&:hover{
color:#c9caca;
}
}
}
.right-content{
width:543px;
position:absolute;
right:0;
height:244px;
overflow:hidden;
}
.right-more {
width:200px;
position:absolute;
height: 50px;
margin: 0 auto;
float: left;
right:20px;
color:#000;
bottom: 0;
.more-content-right{
color:#000;
width:50px;
@include blockwh(100%,100%);
text-align:right;
}
}
}
.submenu-beauty {
left:-124px;
left:-88px;
}
.submenu-video-side{
margin:18px 8px;
}
.submenu-video-mid{
margin:18px 5px;
}
.submenu-video-item{
height:304px;
width:166px;
float:left;
.link {
position:absolute;
@include blockwh(100%,100%);
cursor:pointer;
}
.a-img {
@include blockwh(166px,100px);
position:relative;
.a-video{
position:absolute;
left:50%;
top:50%;
@include blockwh(50px,43px);
margin: -21px 0 0 -25px;
background:url(../assets/images/vedio.png);
cursor:pointer;
z-index:9;
}
img{
width:100%;
height:100%;
}
}
.menu-text {
@include blockwh(166px,auto);
line-height:30px;
font-size:20px;
color:#000;
overflow:hidden;
cursor:pointer;
text-align:center;
&:hover{color:#000;}
}
}
.content-item-detail-a-img{
display:block;
width:212px;
... ...
... ... @@ -10,7 +10,7 @@
.tag-icon{
@include blockwh(22px,22px);
background:url(../images/tag.png) no-repeat;
background:url(../assets/images/tag.png) no-repeat;
cursor:pointer;
float:left;
margin:12px 10px 0 50px;
... ...
... ... @@ -98,10 +98,11 @@
}
}
.content-item-menu{
margin-top:30px;
width:346px;
height:313px;
margin:30px 10px;
width:273px;
height:280px;
float:left;
overflow:hidden;
position:relative;
.link{
... ... @@ -110,7 +111,7 @@
position:absolute;
z-index:1;
}
.a-img{@include blockwh(320px,204px);position:relative;
.a-img{@include blockwh(273px,157px);position:relative;
margin:0 auto 20px auto;
.a-video{
... ... @@ -128,8 +129,8 @@
height:100%;
}
}
.text{
@include blockwh(298px,auto);
.menu-text{
@include blockwh(273px,auto);
font-size:18px;
line-height:22px;
margin:0 15px;
... ... @@ -142,7 +143,7 @@
color:#000;
}
}
.detail{margin-top:10px;}
.menu-detail{margin-top:10px;}
}
}
.menu-item{
... ... @@ -814,7 +815,7 @@
width:295px;
height:176px;
background:url(../assets/images/followusbackground.png) 0 -190px;
margin-top:32px;
margin:32px 0 20px 0;
.title{
@include blockwh(100%,70px);
line-height:90px;
... ... @@ -1165,11 +1166,108 @@
}
.submenu-video {
left:-469px;
.left-menu {
width:170px;
height:100%;
background:#f5f5f5;
position:absolute;
left:0;
top:0;
.menu-text{
@include blockwh(auto,50px);
line-height:50px;
font-size:18px;
padding-left:20px;
color:#000;
cursor:pointer;
&:hover{
color:#c9caca;
}
}
}
.right-content{
width:755px;
position:absolute;
right:0;
height:342px;
overflow:hidden;
}
.right-more {
width:200px;
position:absolute;
height: 50px;
margin: 0 auto;
float: left;
right:20px;
color:#000;
bottom: 0;
.more-content-right{
color:#000;
width:50px;
@include blockwh(100%,100%);
text-align:right;
}
}
}
.submenu-beauty {
left:-124px;
}
.submenu-video-side{
margin:18px 13px;
}
.submenu-video-mid{
margin:18px 5px;
}
.submenu-video-item{
height:304px;
width:230px;
float:left;
.link {
position:absolute;
@include blockwh(100%,100%);
cursor:pointer;
}
.a-img {
@include blockwh(230px,154px);
position:relative;
.a-video{
position:absolute;
left:50%;
top:50%;
@include blockwh(50px,43px);
margin: -21px 0 0 -25px;
background:url(../assets/images/vedio.png);
cursor:pointer;
z-index:9;
}
img{
width:100%;
height:100%;
}
}
.menu-text {
@include blockwh(230px,auto);
line-height:30px;
font-size:20px;
color:#000;
cursor:pointer;
text-align:center;
}
}
.content-item-detail-a-img{
... ...
... ... @@ -10,7 +10,7 @@
.tag-icon{
@include blockwh(22px,22px);
background:url(../images/tag.png) no-repeat;
background:url(../assets/images/tag.png) no-repeat;
cursor:pointer;
float:left;
margin:20px 10px 0 50px;
... ...