From 129f97a95e900ef1dbb8d00e57937e525151ca88 Mon Sep 17 00:00:00 2001 From: Lynnic <gunix@foxmail.com> Date: Tue, 24 Nov 2015 15:00:39 +0800 Subject: [PATCH] 添加为您优选 --- static/js/product/detail/desc.js | 17 ++++++++--------- static/js/product/detail/detail.js | 3 +-- static/sass/product/_detail.scss | 4 ++++ static/sass/product/_product-description.scss | 2 +- template/m.yohobuy.com/actions/product/detail/index.phtml | 3 ++- template/m.yohobuy.com/partials/product/product-description.phtml | 4 +--- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/static/js/product/detail/desc.js b/static/js/product/detail/desc.js index 99e7738..b19d94e 100644 --- a/static/js/product/detail/desc.js +++ b/static/js/product/detail/desc.js @@ -17,8 +17,7 @@ var introUrl = $('#introUrl').val(), end = false; var sizeSwiper, - refSwiper, - recommendSwiper; + refSwiper; require('../recommend-for-you.js'); @@ -50,13 +49,13 @@ function search() { }); //优选 - recommendSwiper = new Swiper('#swiper-recommend', { - slidesPerView: 'auto', - grabCursor: true, - slideElement: 'li', - lazyLoading: true, - watchSlidesVisibility: true - }); + // recommendSwiper = new Swiper('#swiper-recommend', { + // slidesPerView: 'auto', + // grabCursor: true, + // slideElement: 'li', + // lazyLoading: true, + // watchSlidesVisibility: true + // }); searching = false; end = true; diff --git a/static/js/product/detail/detail.js b/static/js/product/detail/detail.js index 0a9c131..95dc88c 100644 --- a/static/js/product/detail/detail.js +++ b/static/js/product/detail/detail.js @@ -11,8 +11,7 @@ var goodsSwiper; require('./desc'); require('./comments-consults'); - -// require('../recommend-for-you.js'); +require('../recommend-for-you.js'); lazyLoad($('img.lazy')); diff --git a/static/sass/product/_detail.scss b/static/sass/product/_detail.scss index 3d1dec5..9ede620 100644 --- a/static/sass/product/_detail.scss +++ b/static/sass/product/_detail.scss @@ -378,6 +378,10 @@ $basicBtnC:#eb0313; font-size: pxToRem(24px); } } + + .recommend-for-you{ + margin-bottom: pxToRem(120px); + } } @import "comments-consults"; @import "product-description"; \ No newline at end of file diff --git a/static/sass/product/_product-description.scss b/static/sass/product/_product-description.scss index 92a4359..8fbd218 100644 --- a/static/sass/product/_product-description.scss +++ b/static/sass/product/_product-description.scss @@ -90,7 +90,7 @@ } } margin-top: pxToRem(30px); - margin-bottom: pxToRem(120px); + margin-bottom: pxToRem(30px); } .detail-swiper { .swiper-wrapper { diff --git a/template/m.yohobuy.com/actions/product/detail/index.phtml b/template/m.yohobuy.com/actions/product/detail/index.phtml index b27263b..8db04c1 100644 --- a/template/m.yohobuy.com/actions/product/detail/index.phtml +++ b/template/m.yohobuy.com/actions/product/detail/index.phtml @@ -101,7 +101,8 @@ {{/ enterStore}} <div id="productDesc"></div> - + {{> product/recommend-for-you}} + {{#cartInfo}} <div class="cart-bar"> {{#if numInCart}} diff --git a/template/m.yohobuy.com/partials/product/product-description.phtml b/template/m.yohobuy.com/partials/product/product-description.phtml index 16230e3..d21f415 100644 --- a/template/m.yohobuy.com/partials/product/product-description.phtml +++ b/template/m.yohobuy.com/partials/product/product-description.phtml @@ -130,6 +130,4 @@ {{/list}} </div> </div> -{{/productDetail}} - -{{> product/recommend-for-you}} \ No newline at end of file +{{/productDetail}} \ No newline at end of file -- libgit2 0.24.0