Authored by yyq

Merge branch 'feature/browserTip' into gray

... ... @@ -164,6 +164,38 @@ function setTopBanner(data) {
$('body').prepend(topbanner);
}
function browserLowVersionPrompt() {
var prompt = '<div class="yoho-browser-notice">' +
'<div class="center-content">' +
'<h4 class="notice-title">YOHO!BUY有货</h4>' +
'<div class="notice-content">' +
'<p>尊敬的顾客:您好!您当前浏览器版本过低,存在安全风险,为了向您提供更优质的服务,请尽快升级浏览器,并设置安装的浏览器为默认浏览器!</p>' +
'<div class="browser-list">' +
'<a href="http://www.google.cn/intl/zh-CN/chrome/browser/desktop/index.html" target="_blank">' +
'<span class="chrome-img browser-img"></span>' +
'<span>谷歌浏览器</span>' +
'</a>' +
'<a href="http://www.firefox.com.cn/download/" target="_blank">' +
'<span class="firefox-img browser-img"></span>' +
'<span>火狐浏览器</span>' +
'</a>' +
'<a href="http://se.360.cn/" target="_blank">' +
'<span class="qihu360-img browser-img"></span>' +
'<span>360浏览器</span>' +
'</a>' +
'<label class="hide-notice">暂不,继续浏览 >></label>' +
'</div>' +
'</div>' +
'</div>' +
'</div>';
$('body').prepend(prompt);
$('.hide-notice').on('click', function() {
$('.yoho-browser-notice').remove();
});
}
// cookie集合
function exeCookieMap() {
var cookies = document.cookie;
... ... @@ -594,9 +626,16 @@ if (isSupportCss3Animation()) {
window.setTimeout(fadeAnimate, 3000);
}
syncPageChannel();
getBannerAndNotice(); // 获取头部banner
formatThirdMenu(); // 格式化三级菜单
(function() {
if (document.all && !document.querySelector) {
browserLowVersionPrompt(); // 低版本升级提示
} else {
getBannerAndNotice(); // 获取头部banner
}
}());
cartTimer = setInterval(syncCratInfo, 2000); // 定时同步购物车数量
// 获取头部登陆信息
... ...
... ... @@ -29,6 +29,73 @@
}
}
.yoho-browser-notice {
width: 100%;
font-size: 12px;
color: #fff;
background-color: #555;
font-family: "微软雅黑";
.notice-title {
height: 100px;
line-height: 130px;
font-size: 27px;
font-weight: bold;
position: absolute;
}
.notice-content {
line-height: 1.5;
padding-top: 10px;
padding-left: 250px;
}
.browser-list {
height: 90px;
margin-top: 10px;
position: relative;
a {
float: left;
color: #fff;
text-align: center;
margin-left: 200px;
}
a:first-child {
margin-left: 0;
}
span {
display: block;
}
.browser-img {
width: 60px;
height: 60px;
}
.hide-notice {
position: absolute;
right: 6px;
bottom: 11px;
cursor: pointer;
}
}
.chrome-img {
background: resolve("header/chrome.png");
}
.firefox-img {
background: resolve("header/firefox.png");
}
.qihu360-img {
background: resolve("header/360.png");
}
}
.yoho-header {
.tool-wrapper {
width: 100%;
... ...