diff --git a/demo/yohood3.0/detail.html b/demo/yohood3.0/detail.html index c44147c..0bc7621 100644 --- a/demo/yohood3.0/detail.html +++ b/demo/yohood3.0/detail.html @@ -362,125 +362,7 @@ </div> </div> <div class="ft"> - <div class="limited-goods"> - <h2>限量商品</h2> - <div class="limited-slide-box"> - <div class="slide-wrap clearfix"> - <div class="box"> - <ul class="goods-list clearfix"> - <li> - <a href="javascript:;"> - <div class="img-box"> - <img src="http://img11.static.yhbimg.com/goodsimg/2014/01/22/05/0159a2768841aff6715fb6df15353de841.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90" alt=""> - <span class="red">TOP 1</span> - </div> - <p class="goods-name">MACROPUS 暗夜系列双肩背包</p> - <p class="price">¥339.00</p> - </a> - </li> - <li> - <a href="javascript:;"> - <div class="img-box"> - <img src="http://img11.static.yhbimg.com/goodsimg/2014/01/22/05/0159a2768841aff6715fb6df15353de841.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90" alt=""> - <span class="red">TOP 2</span> - </div> - <p class="goods-name">MACROPUS 暗夜系列双肩背包</p> - <p class="price">¥339.00</p> - </a> - </li> - <li> - <a href="javascript:;"> - <div class="img-box"> - <img src="http://img11.static.yhbimg.com/goodsimg/2014/01/22/05/0159a2768841aff6715fb6df15353de841.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90" alt=""> - <span class="red">TOP 3</span> - </div> - <p class="goods-name">MACROPUS 暗夜系列双肩背包</p> - <p class="price">¥339.00</p> - </a> - </li> - <li> - <a href="javascript:;"> - <div class="img-box"> - <img src="http://img11.static.yhbimg.com/goodsimg/2014/01/22/05/0159a2768841aff6715fb6df15353de841.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90" alt=""> - <span>TOP 4</span> - </div> - <p class="goods-name">MACROPUS 暗夜系列双肩背包</p> - <p class="price">¥339.00</p> - </a> - </li> - <li> - <a href="javascript:;"> - <div class="img-box"> - <img src="http://img11.static.yhbimg.com/goodsimg/2014/01/22/05/0159a2768841aff6715fb6df15353de841.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90" alt=""> - <span>TOP 5</span> - </div> - <p class="goods-name">MACROPUS 暗夜系列双肩背包</p> - <p class="price">¥339.00</p> - </a> - </li> - </ul> - </div> - <div class="box"> - <ul class="goods-list clearfix"> - <li> - <a href="javascript:;"> - <div class="img-box"> - <img src="http://img11.static.yhbimg.com/goodsimg/2014/01/22/05/0159a2768841aff6715fb6df15353de841.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90" alt=""> - <span class="red">TOP 1</span> - </div> - <p class="goods-name">MACROPUS 暗夜系列双肩背包</p> - <p class="price">¥339.00</p> - </a> - </li> - <li> - <a href="javascript:;"> - <div class="img-box"> - <img src="http://img11.static.yhbimg.com/goodsimg/2014/01/22/05/0159a2768841aff6715fb6df15353de841.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90" alt=""> - <span class="red">TOP 2</span> - </div> - <p class="goods-name">MACROPUS 暗夜系列双肩背包</p> - <p class="price">¥339.00</p> - </a> - </li> - <li> - <a href="javascript:;"> - <div class="img-box"> - <img src="http://img11.static.yhbimg.com/goodsimg/2014/01/22/05/0159a2768841aff6715fb6df15353de841.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90" alt=""> - <span class="red">TOP 3</span> - </div> - <p class="goods-name">MACROPUS 暗夜系列双肩背包</p> - <p class="price">¥339.00</p> - </a> - </li> - <li> - <a href="javascript:;"> - <div class="img-box"> - <img src="http://img11.static.yhbimg.com/goodsimg/2014/01/22/05/0159a2768841aff6715fb6df15353de841.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90" alt=""> - <span>TOP 4</span> - </div> - <p class="goods-name">MACROPUS 暗夜系列双肩背包</p> - <p class="price">¥339.00</p> - </a> - </li> - <li> - <a href="javascript:;"> - <div class="img-box"> - <img src="http://img11.static.yhbimg.com/goodsimg/2014/01/22/05/0159a2768841aff6715fb6df15353de841.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90" alt=""> - <span>TOP 5</span> - </div> - <p class="goods-name">MACROPUS 暗夜系列双肩背包</p> - <p class="price">¥339.00</p> - </a> - </li> - </ul> - </div> - </div> - </div> - <div class="limited-slide-control"> - <a class="limited-slide-prev iconfont" href="javascript:void(0);"></a> - <a class="limited-slide-next iconfont" href="javascript:void(0);"></a> - </div> - </div> + </div> <div style="display: none" class="share" data-link="http://newgirls.test.yoho.cn/channel/detail/index/id/2315" cover-url="http://cmsimg01.qiniudn.com/contentimg/2015/05/12/13/0147a071d80901d152ce04dc4341905d26.jpg"> <h4>share</h4> diff --git a/demo/yohood3.0/index.html b/demo/yohood3.0/index.html index f4dbf0f..430d2d1 100644 --- a/demo/yohood3.0/index.html +++ b/demo/yohood3.0/index.html @@ -38,7 +38,7 @@ </ul> <a class="contact-btn" href="javascript:;">contact</a> </div> - <!-- 主站导航 end --> + <!-- 主站导航 end -->c <!-- 页眉 start --> <div class="header"> <!-- 页首 logo start --> @@ -206,7 +206,7 @@ </div> <div class="content"> <h2 class="volupia"> - <a href="/news/detail/id/169">test test test test test test test test </a> + <a href="/news/detail/id/169">test test test test test test test test test test test test test </a> </h2> <p class="text-content">content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content </p> </div> @@ -245,7 +245,7 @@ </div> <div class="content"> <h2 class="volupia"> - <a href="/news/detail/id/169">test test test test test test test test </a> + <a href="/news/detail/id/169">test test test test test test test test test test test test</a> </h2> <p class="text-content">content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content </p> </div> @@ -526,7 +526,7 @@ </div> <div class="return-top"> <a href="javascript:void(0);" id="toTop" class="ifont" style="display: inline;"> - <span class="iconfont"></span> TOP + <span class="iconfont"></span> </a> </div> </body> diff --git a/res/js/channel.js b/res/js/channel.js index 1687a2a..17ff3c1 100644 --- a/res/js/channel.js +++ b/res/js/channel.js @@ -228,34 +228,63 @@ define('channel', function(require, exports) { swiperLen, changeCooperationClass; - var pageRightBanner = null; - - pageRightBanner = function() { - var rightBanner = $("#right_banner_warp .right-banner")[0], - $banners = $(rightBanner).find(".image-box"), - len = $banners.length, - $pageContent = $("#content"), - $layoutItems = $pageContent.find(".layout-item"), - placeholderItems = ""; - - if (len <= 0) { - return; - } + /** + * 将固定banner位插入资讯右侧 + */ + ({ + init: function() { + var rightBanner = $("#right_banner_warp .right-banner")[0], + $banners = $(rightBanner).find(".image-box"), + len = $banners.length, + $pageContent = $("#content"), + $layoutItems = $pageContent.find(".layout-item"), + placeholderItems = ""; + + if (len <= 0) { + return; + } - if ($layoutItems.length < 2) { - placeholderItems = "<div class='fluid-item layout-item tiled'></div>"; - placeholderItems += placeholderItems; - $pageContent.prepend($(placeholderItems)); - $layoutItems = $pageContent.find(".layout-item"); - } + if ($layoutItems.length < 2) { + placeholderItems = "<div class='fluid-item layout-item tiled'></div>"; + placeholderItems += placeholderItems; + $pageContent.prepend($(placeholderItems)); + $layoutItems = $pageContent.find(".layout-item"); + } - $(rightBanner).insertAfter($layoutItems[1]); + $(rightBanner).insertAfter($layoutItems[1]); - //插入新元素、重新瀑布流布局 - setLayout(); - } + //插入新元素、重新瀑布流布局 + setLayout(); + } + }).init(); - pageRightBanner(); + + /** + * 页面所有标题为两行的资讯、调整内容margin 使得所有资讯内容对齐 + */ + ({ + getComputedStyle: function(element) { + if (typeof window.getComputedStyle === "function") { + return window.getComputedStyle(element, null); + } else { + return element.currentStyle; + } + }, + init: function() { + var content = $("#content"), + volupia = content.find(".volupia"), + style = null; + i = 0, + len = 0; + + for (i = 0, len = volupia.length; i < len; i++) { + style = this.getComputedStyle(volupia[i]); + if (parseInt(style.height) > 30) { + $(volupia[i]).next(".text-content").css("margin", "20px 0 0 0"); + } + } + } + }).init(); if ($(".show-goods").size() > 0) { productGenders = $(".show-goods").attr("product_genders").split(','); @@ -270,28 +299,9 @@ define('channel', function(require, exports) { loop: true, slideClass: 'box', slidesPerView: 'auto', - loopedSlides: 4, - onSlideChangeStart: function() { - var swiperLen = $('.cooperation-slide-box').find('.box').size(); - // $('.cooperation-slide-prev,.cooperation-slide-next').removeClass('disable'); - // if (cooperateSwiper.activeIndex === swiperLen - 1) { - // $('.cooperation-slide-next').addClass('disable'); - // } else if (cooperateSwiper.activeIndex === 0) { - // $('.cooperation-slide-prev').addClass('disable'); - // } - } + loopedSlides: 4 }); - /** - * 若下一个滑动块的下一个有"big-size" 类名 则滑动后只显示下一个滑动块 - * @param {Swiper} swiper 滑动块对象 - */ - ({ - init: function(swiper) { - - } - }).init(cooperateSwiper); - function nextChagneSileSize(swiper) { var activeIndex = swiper.activeIndex, @@ -308,7 +318,7 @@ define('channel', function(require, exports) { } function prevChangeSlideSize(swiper) { - var activeIndex = swiper.activeIndex, + var activeIndex = swiper.activeIndex, slides = swiper.slides, activeSlide = slides[activeIndex], prevSlide = slides[activeIndex - 1]; diff --git a/res/js/yohood.js b/res/js/yohood.js index e3279d2..5143db6 100644 --- a/res/js/yohood.js +++ b/res/js/yohood.js @@ -780,7 +780,7 @@ define('yohood', function(require, exports) { { var href = $(this).attr("href"); $(this).attr("href","javascript:void(0)"); - if(window.confirm("切换后已填信息将被清空,是否切换?")) + if(window.confirm('切换后已填信息将被清空,是否切换?')) { window.location.href = href; } @@ -1061,7 +1061,7 @@ define('yohood', function(require, exports) { setTimeout(function () { $('.dialog-w').fadeOut(); window.location.reload(); - }, 5000); + }, 2000); } else { alert(d.message); @@ -1210,7 +1210,7 @@ define('yohood', function(require, exports) { setTimeout(function () { $('.dialog-w').fadeOut(); window.location.reload(); - }, 5000); + }, 2000); } else { alert("失败"); @@ -1309,7 +1309,7 @@ define('yohood', function(require, exports) { setTimeout(function () { $('.dialog-w').fadeOut(); window.location.reload(); - }, 5000); + }, 2000); } else { alert("失败"); diff --git a/res/sass/style/_common.scss b/res/sass/style/_common.scss index 711c44e..4a413be 100644 --- a/res/sass/style/_common.scss +++ b/res/sass/style/_common.scss @@ -622,6 +622,8 @@ $pageMainWidth: 1180px; } span { display: block; + border: 1px solid #000; + padding: .5em; } } diff --git a/website/view/script/onlinereg/media.php b/website/view/script/onlinereg/media.php index a40ca6c..d7d6583 100644 --- a/website/view/script/onlinereg/media.php +++ b/website/view/script/onlinereg/media.php @@ -34,7 +34,13 @@ </li> <li> <div class="form-leading">性别:</div> - <div class="form-control"><input type="text" name="sex"/></div> + <div class="form-control"> + <input type="radio" name="sex" id="yoho-yes" value="1" checked/> + <label for="yoho-yes">男</label> + + <input type="radio" name="sex" id="yoho-no" value="0"/> + <label for="yoho-no">女</label> + </div> </li> <li> <div class="form-leading">媒体名/公司名:</div> diff --git a/website/view/script/onlinereg/sponsor.php b/website/view/script/onlinereg/sponsor.php index 8b714a8..ed93f0f 100644 --- a/website/view/script/onlinereg/sponsor.php +++ b/website/view/script/onlinereg/sponsor.php @@ -9,9 +9,9 @@ <div class="pull-left"> <div class="content-sub"> <ul> - <li><span>联系人:</span><p>Eva.Gong</p></li> - <li><span>邮 箱:</span><p>eva.gong@yoho.cn</p></li> - <li><span>电 话:</span><p>+86 18616740570</p></li> + <li><span>联系人:</span><p>Cherry.Wu</p></li> + <li><span>邮 箱:</span><p>Cherry.wu@yoho.cn</p></li> + <li><span>电 话:</span><p>+86 18810361483</p></li> </ul> </div> </div> diff --git a/website/view/script/onlinereg/sponsoren.php b/website/view/script/onlinereg/sponsoren.php index c8878e7..252fdcc 100644 --- a/website/view/script/onlinereg/sponsoren.php +++ b/website/view/script/onlinereg/sponsoren.php @@ -9,9 +9,9 @@ <div class="pull-left"> <div class="content-sub"> <ul> - <li><span>联系人:</span><p>Eva.Gong</p></li> - <li><span>邮 箱:</span><p>eva.gong@yoho.cn</p></li> - <li><span>电 话:</span><p>+86 18616740570</p></li> + <li><span>联系人:</span><p>Cherry.Wu</p></li> + <li><span>邮 箱:</span><p>Cherry.wu@yoho.cn</p></li> + <li><span>电 话:</span><p>+86 18810361483</p></li> </ul> </div> </div>