Authored by 徐炜

Merge branch 'hotfix/wechat' into 'master'

Hotfix/wechat



See merge request !19
... ... @@ -28,6 +28,14 @@
(function(d,c){var e=d.documentElement,a="orientationchange" in window?"orientationchange":"resize",b=function(){var f=e.clientWidth;if(!f){return}if(f>=640){e.style.fontSize="40px"}else{e.style.fontSize=40*(f/640)+"px"}};if(!d.addEventListener){return}b();c.addEventListener(a,b,false);d.addEventListener("DOMContentLoaded",b,false)})(document,window);
</script>
{{/if}}
{{#if isWechat}}
{{!--Android机器页面不再受到用户字体缩放强制改变大小 http://m.blog.csdn.net/article/details?id=51275080 --}}
<script type="text/javascript">
(function(){if(typeof(WeixinJSBridge)=="undefined"){document.addEventListener("WeixinJSBridgeReady",function(a){setTimeout(function(){WeixinJSBridge.invoke("setFontSizeCallback",{fontSize:0},function(b){})},0)})}else{setTimeout(function(){WeixinJSBridge.invoke("setFontSizeCallback",{fontSize:0},function(a){})},0)}})();
</script>
{{/if}}
{{#if devEnv}}
{{#if localCss}}
<link rel="stylesheet" media="all" href="//{{devHost}}:5001/bundle/common.css">
... ...
... ... @@ -77,6 +77,10 @@ $categoryContainer.on('touchend', function(e) {
if ($this[0] && $this[0].tagName === 'LI' && $this.find('a').attr('href')) {
location.href = $this.find('a').attr('href');
}
if ($this[0] && $this[0].tagName === 'A' && $this.attr('href')) {
location.href = $this.attr('href');
}
});
$categoryContainer.find('.primary-level').on('touchstart touchend touchcancel', 'li', function() {
... ...
... ... @@ -35,6 +35,8 @@ var brandCoupon = {
self.$entry.removeClass('hide');
}
window.rePosFooter && window.rePosFooter();
})
.fail();
}, 200);
... ...
... ... @@ -131,6 +131,8 @@ function search() {
}),
}, true);
});
window.rePosFooter && window.rePosFooter();
},
error: function() {
tip.show('网络断开连接了~');
... ...
... ... @@ -77,6 +77,8 @@ function request() {
// return false;
});
window.rePosFooter && window.rePosFooter();
}).fail(function() {
$recommendForYou.hide();
});
... ...
... ... @@ -16,6 +16,8 @@ require('./detail/desc');
// 喂你优选
require('./detail/recommend-for-you-product-desc');
window.rePosFooter && window.rePosFooter();
setTimeout(() => {
var Swiper = require('yoho-swiper');
... ... @@ -175,6 +177,8 @@ setTimeout(() => {
});
}
});
window.rePosFooter && window.rePosFooter();
}
});
}, 150);
... ... @@ -274,6 +278,7 @@ setTimeout(() => {
require('./detail/comments-consults');
require('./detail/consultform'); // TODO
promotionInit();
window.rePosFooter && window.rePosFooter();
});
}, 200);
}(productSkn, productId, brandId));
... ...
... ... @@ -12,7 +12,7 @@
width: 100%;
height: 90px;
line-height: 90px;
z-index: 2;
z-index: 99;
background: rgba(0, 0, 0, 0.6);
}
... ...
.mobile-container {
margin-left: auto;
margin-right: auto;
width: 100%;
max-width: 640px;
overflow: hidden;
}
.mobile-wrap {
position: relative;
z-index: 2;
background: #f0f0f0;
transition: transform 0.3s;
.creative-life .classify-name {
display: none;
}
.banner-top .banner-swiper:first-child {
height: 312px;
}
}
.mobile-wrap.menu-open {
transform: translateX(540px);
}
.overlay {
display: none;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #000;
z-index: 4;
transition: opacity 1s;
}
.overlay.show {
display: block;
opacity: 0.3;
}
... ...
... ... @@ -33,47 +33,5 @@
@import "shop-recommand";
@import "sale-floor";
@import "divide-image";
@import "home-main";
.mobile-container {
margin-left: auto;
margin-right: auto;
width: 100%;
max-width: 640px;
overflow: hidden;
}
.mobile-wrap {
position: relative;
z-index: 2;
background: #f0f0f0;
transition: transform 0.3s;
.creative-life .classify-name {
display: none;
}
.banner-top .banner-swiper:first-child {
height: 312px;
}
}
.mobile-wrap.menu-open {
transform: translateX(540px);
}
.overlay {
display: none;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #000;
z-index: 4;
transition: opacity 1s;
}
.overlay.show {
display: block;
opacity: 0.3;
}
... ...
.index-page {
overflow: hidden;
margin: 0 auto;
width: 100%;
#double11 {
display: block;
width: 432px;
height: 100px;
margin: 0 auto;
background-color: transparent;
background-image: resolve("channel/11.11.png");
background-size: 100%;
&:active {
background-image: resolve("channel/11.11-touch.png");
}
}
#yohood {
border: none;
border-bottom: 8px solid #fff;
background-color: transparent;
background-image: resolve("channel/yohood.png");
background-position-x: 26%;
background-position-y: 36%;
background-size: 40%;
background-repeat: no-repeat;
}
#yohood:active {
border-bottom-color: #000;
background-color: rgba(255, 255, 255, 0.4);
background-image: resolve("channel/yohood-tapped.png");
.right-icon {
color: #000;
}
}
.index-header {
box-sizing: border-box;
padding: 0 20px;
width: 100%;
height: 96px;
line-height: 96px;
.index-logo {
float: left;
width: 288px;
height: 96px;
background: resolve("channel/yohologo.png") left center no-repeat;
background-size: 280px 60px;
opacity: 1;
transition: all 400ms;
img {
width: 207px;
height: 49px;
vertical-align: middle;
}
&.action {
width: 0;
opacity: 0;
}
}
.box {
position: relative;
z-index: 1;
overflow: hidden;
&.action {
.no-search,
.clear-text {
display: block;
}
}
}
.index-search {
overflow: hidden;
height: 96px;
background: #fff;
transition: width 0.4s;
.search-box {
position: relative;
top: 20px;
overflow: hidden;
box-sizing: border-box;
padding-right: 80px;
height: 56px;
border: 1px solid #ccc;
transition: width 400ms;
transition: margin-left 0.4s;
}
input {
float: left;
overflow: hidden;
padding: 10px;
width: 96%;
border: none;
color: #999;
font-size: 28px;
-webkit-appearance: none;
}
.iconfont {
position: absolute;
top: 8px;
z-index: 1;
width: 40px;
font-size: 28px;
line-height: 40px;
}
.clear-text {
right: 50px;
display: none;
color: #ccc;
}
.search-icon {
right: 10px;
color: #666;
&.empty {
color: #e6e6e6;
}
}
}
.no-search {
display: none;
float: left;
margin-right: 10px;
color: #999;
font-size: 28px;
}
}
.index-container {
position: relative;
background-color: white;
transition: transform 0.5s;
.index-channel {
position: relative;
min-height: 800px;
background-color: #000;
color: #fff;
text-align: center;
img {
width: 100%;
}
.index-channel-list {
position: absolute;
top: 50%;
margin-top: -300px;
width: 100%;
.list-item {
position: relative;
display: block;
margin: 0 auto 40px;
width: 432px;
height: 100px;
border: 8px solid #fff;
background-color: #000;
color: #fff;
text-align: center;
font-weight: bold;
font-size: 32px;
line-height: 82px;
}
.list-item:last-child {
margin-bottom: 0;
}
.lighter {
font-weight: lighter;
}
.right-icon {
position: absolute;
top: 0;
right: 10px;
font-weight: bold;
}
.homestyle {
margin-bottom: 50px;
width: 287.3px;
}
}
}
}
}
\ No newline at end of file
... ...
.index-page {
overflow: hidden;
margin: 0 auto;
width: 100%;
#double11 {
display: block;
width: 432px;
height: 100px;
margin: 0 auto;
background-color: transparent;
background-image: resolve("channel/11.11.png");
background-size: 100%;
&:active {
background-image: resolve("channel/11.11-touch.png");
}
}
#yohood {
border: none;
border-bottom: 8px solid #fff;
background-color: transparent;
background-image: resolve("channel/yohood.png");
background-position-x: 26%;
background-position-y: 36%;
background-size: 40%;
background-repeat: no-repeat;
}
#yohood:active {
border-bottom-color: #000;
background-color: rgba(255, 255, 255, 0.4);
background-image: resolve("channel/yohood-tapped.png");
.right-icon {
color: #000;
}
}
.index-header {
box-sizing: border-box;
padding: 0 20px;
width: 100%;
height: 96px;
line-height: 96px;
.index-logo {
float: left;
width: 288px;
height: 96px;
background: resolve("channel/yohologo.png") left center no-repeat;
background-size: 280px 60px;
opacity: 1;
transition: all 400ms;
img {
width: 207px;
height: 49px;
vertical-align: middle;
}
&.action {
width: 0;
opacity: 0;
}
}
.box {
position: relative;
z-index: 1;
overflow: hidden;
&.action {
.no-search,
.clear-text {
display: block;
}
}
}
.index-search {
overflow: hidden;
height: 96px;
background: #fff;
transition: width 0.4s;
.search-box {
position: relative;
top: 20px;
overflow: hidden;
box-sizing: border-box;
padding-right: 80px;
height: 56px;
border: 1px solid #ccc;
transition: width 400ms;
transition: margin-left 0.4s;
}
input {
float: left;
overflow: hidden;
padding: 10px;
width: 96%;
border: none;
color: #999;
font-size: 28px;
-webkit-appearance: none;
}
.iconfont {
position: absolute;
top: 8px;
z-index: 1;
width: 40px;
font-size: 28px;
line-height: 40px;
}
.clear-text {
right: 50px;
display: none;
color: #ccc;
}
.search-icon {
right: 10px;
color: #666;
&.empty {
color: #e6e6e6;
}
}
}
.no-search {
display: none;
float: left;
margin-right: 10px;
color: #999;
font-size: 28px;
}
}
.index-container {
position: relative;
background-color: white;
transition: transform 0.5s;
.index-channel {
position: relative;
min-height: 800px;
background-color: #000;
color: #fff;
text-align: center;
img {
width: 100%;
}
.index-channel-list {
position: absolute;
top: 50%;
margin-top: -300px;
width: 100%;
.list-item {
position: relative;
display: block;
margin: 0 auto 40px;
width: 432px;
height: 100px;
border: 8px solid #fff;
background-color: #000;
color: #fff;
text-align: center;
font-weight: bold;
font-size: 32px;
line-height: 82px;
}
.list-item:last-child {
margin-bottom: 0;
}
.lighter {
font-weight: lighter;
}
.right-icon {
position: absolute;
top: 0;
right: 10px;
font-weight: bold;
}
.homestyle {
margin-bottom: 50px;
width: 287.3px;
}
}
}
}
}
@import "index-main";
@import "brand";
@import "home";
... ...
@import "../layout/_loading.css";
@import "../layout/_swiper.css";
@import "../layout/_loading.css";
@import "../layout/_swiper.css";
@import "../common/_filter.css";
@import "../common/_good.css";
@import "../common/_loading.css";
@import "../common/_suspend-home.css";
@import "../common/_filter.css";
@import "../common/_good.css";
@import "../common/_loading.css";
@import "../common/_suspend-home.css";
@import "_banner-bottom.css";
@import "_banner-center.css";
@import "_banner-top.css";
@import "_brand.css";
@import "_cate.css";
@import "_creative-life.css";
@import "_divide-image.css";
@import "_fine-brands.css";
@import "_floor-header.css";
@import "_footer-tab.css";
@import "_fresh-only.css";
@import "_goods-category.css";
@import "_home-header.css";
@import "_home.css";
@import "_hot-brands.css";
@import "_hot-category.css";
@import "_hot-single.css";
@import "_icons-enter.css";
@import "_index.css";
@import "_left-right.css";
@import "_maybe-like.css";
@import "_new-first.css";
@import "_new-user-floor.css";
@import "_notice.css";
@import "_plus-star.css";
@import "_sale-floor.css";
@import "_search-input.css";
@import "_search.css";
@import "_seckill.css";
@import "_shop-recommand.css";
@import "_side-nav.css";
@import "_six-lines-floor.css";
@import "_three-picture.css";
@import "_thumb-row.css";
@import "_trend-topics.css";
@import "_trend-tops.css";
@import "_trendsetter-collocation.css";
@import "_two-column-goods.css";
@import "_vip-only.css";
@import "_index-main.css";
@import "_brand.css";
@import "_banner-bottom.css";
@import "_banner-center.css";
@import "_banner-top.css";
@import "_cate.css";
@import "_creative-life.css";
@import "_divide-image.css";
@import "_fine-brands.css";
@import "_floor-header.css";
@import "_footer-tab.css";
@import "_fresh-only.css";
@import "_goods-category.css";
@import "_hot-brands.css";
@import "_hot-category.css";
@import "_home-header.css";
@import "_hot-single.css";
@import "_icons-enter.css";
@import "_left-right.css";
@import "_maybe-like.css";
@import "_new-first.css";
@import "_new-user-floor.css";
@import "_notice.css";
@import "_plus-star.css";
@import "_sale-floor.css";
@import "_search.css";
@import "_seckill.css";
@import "_shop-recommand.css";
@import "_side-nav.css";
@import "_six-lines-floor.css";
@import "_three-picture.css";
@import "_thumb-row.css";
@import "_trend-topics.css";
@import "_trend-tops.css";
@import "_trendsetter-collocation.css";
@import "_two-column-goods.css";
@import "_vip-only.css";
@import "_home-main.css";
... ...
... ... @@ -141,3 +141,8 @@ section,
summary {
display: block;
}
body {
-webkit-text-size-adjust: 100% !important;
text-size-adjust: 100% !important;
}
... ...
... ... @@ -7,4 +7,5 @@
@import "../../channel/banner-top";
@import "../../common/good";
@import "../../cart/chose-panel";
@import "../../common/_suspend-home.css";
... ...
@import "../../channel/banner-top";
@import "../../common/good";
@import "../../common/filter";
@import "../../common/_suspend-home.css";
@import "search";
@import "list";
@import "search-index";
... ...