Authored by 2586703@qq.com

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

冲突调试
Conflicts:
	web/js/public.js
	web/package.json
... ... @@ -8,8 +8,14 @@ window.tmp$ = null;
var $ = require('jquery'),
Swiper = require("yoho-idangerous.swiper");
require("lazyload");
$(".lazy").lazyload();
//菜单初始化所使用变量
var menuTmpl = $("#menuItemTmpl").html(),
dataKey = null,
mustache = require("mustache");
$.fn.top = function() {
if (arguments.length > 0) {
$(this).css("top", arguments[0]);
... ... @@ -28,8 +34,6 @@ $.fn.left = function() {
}
};
$(".lazy").lazyload();
//扩展jquery=================================================================
... ... @@ -130,16 +134,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 +144,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) {
... ... @@ -301,7 +292,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 +303,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 +333,7 @@ $(document.body).click(function() {
if (clientWidth <= 768) {
target.parent().removeAttr("style");
target.css({
width: "auto"
width: "65px"
});
} else {
target.animate({
... ... @@ -369,26 +348,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 +383,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) {
... ... @@ -412,3 +392,25 @@ window.scrollWindow = function() {
window.tmp$(window).scrollTop(600);
}
};
//初始化菜单============================================================================
$.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) {
mustacheHtml = mustache.render(menuTmpl, data);
_html = $(".submenu-" + dataKey).html();
$(".submenu-" + dataKey).html(mustacheHtml + _html);
}
}
});
//====================================================================================
\ 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"
},
"devDependencies": {
... ...
... ... @@ -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{
... ... @@ -1276,20 +1276,20 @@
.submenu-fashion {
left:-1px;
left:0px;
}
.submenu-sports {
left:-288px;
left:-287px;
}
.submenu-lifestyle {
left:-419px;
left:-418px;
}
.submenu-video {
left:-568px;
left:-567px;
}
.submenu-beauty {
left:-147px;
left:-146px;
}
... ...
... ... @@ -57,7 +57,7 @@
margin:0 auto;
position:relative;
.submenu{
width:668px;
width:628px;
height:395px;
background:url(../assets/images/submenubackground.png);
position:absolute;
... ... @@ -1151,16 +1151,16 @@
}
.submenu-sports {
left:--213px;
left:-177px;
}
.submenu-lifestyle {
left:--286px;
left:-254px;
}
.submenu-video {
left:-369px;
left:-329px;
}
.submenu-beauty {
left:-124px;
left:-88px;
}
... ...
... ... @@ -814,7 +814,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;
... ...