Authored by 梁志锋

gulp ge文件

@@ -35,26 +35,26 @@ @@ -35,26 +35,26 @@
35 35
36 <div class="limit-good-page yoho-page"> 36 <div class="limit-good-page yoho-page">
37 <div class="goodDesc"> 37 <div class="goodDesc">
38 - {{#mainImg}}  
39 - <img class="lazy" src="{{mainImg}}" alt="">  
40 - {{/mainImg}} 38 + {{# goodDescList}}
41 39
42 - {{#goodDescription}}  
43 - <p class="desc">{{goodDescription}}</p>  
44 - {{/goodDescription}} 40 + {{# item}}
  41 + {{#if img}}
  42 + <img class="lazy" src="{{.}}" alt="">
  43 + {{/if}}
45 44
46 - {{#imgList}}  
47 - <img class="lazy" src="{{img}}" alt="">  
48 - {{/imgList}} 45 + {{#if text}}
  46 + <p class=" desc">{{.}}</p>
  47 + {{/if}}
49 48
50 - {{#vedio}} 49 + {{#if video}}
51 <video poster="{{img}}" controls="controls" controls="controls" preload="metadata" loop="loop" width="100%" name="media"> 50 <video poster="{{img}}" controls="controls" controls="controls" preload="metadata" loop="loop" width="100%" name="media">
52 - {{#list}}  
53 <source src="{{src}}" type="video/ogg;codecs=" theora,vorbis"" media="screen" /> 51 <source src="{{src}}" type="video/ogg;codecs=" theora,vorbis"" media="screen" />
54 <source src="{{src}}"/> 52 <source src="{{src}}"/>
55 - {{/list}}  
56 </video> 53 </video>
57 - {{/vedio}} 54 + {{/if}}
  55 + {{/ item}}
  56 +
  57 + {{/ goodDescList}}
58 </div> 58 </div>
59 </div> 59 </div>
60 </body> 60 </body>
@@ -1689,6 +1689,7 @@ define("js/home/home", ["jquery","swiper","lazyload","hammer","index"], function @@ -1689,6 +1689,7 @@ define("js/home/home", ["jquery","swiper","lazyload","hammer","index"], function
1689 var $ = require("jquery"), 1689 var $ = require("jquery"),
1690 Swiper = require("swiper"), 1690 Swiper = require("swiper"),
1691 lazyLoad = require("lazyload"), 1691 lazyLoad = require("lazyload"),
  1692 + noticeScroll = require("js/plugin/notice-scroll"),
1692 $mobileWrap = $('.mobile-wrap'), 1693 $mobileWrap = $('.mobile-wrap'),
1693 $overlay = $('.overlay'), 1694 $overlay = $('.overlay'),
1694 $sideNav = $('.side-nav'), 1695 $sideNav = $('.side-nav'),
@@ -1707,6 +1708,7 @@ var start = 0, @@ -1707,6 +1708,7 @@ var start = 0,
1707 isen = true; 1708 isen = true;
1708 1709
1709 lazyLoad($('img.lazy')); 1710 lazyLoad($('img.lazy'));
  1711 +noticeScroll('.notice', $('.notice').data('time') * 1000);
1710 1712
1711 $('.nav-btn').on('touchstart', function() { 1713 $('.nav-btn').on('touchstart', function() {
1712 $sideNav.css('pointer-events', 'none'); 1714 $sideNav.css('pointer-events', 'none');
@@ -1907,6 +1909,38 @@ exports.set = function(c) { @@ -1907,6 +1909,38 @@ exports.set = function(c) {
1907 require("js/home/maybe-like")(); 1909 require("js/home/maybe-like")();
1908 1910
1909 }); 1911 });
  1912 +define("js/plugin/notice-scroll", ["jquery"], function(require, exports, module){
  1913 +/**
  1914 + * 公告栏目滚动
  1915 + * bikai kai.bi@yoho.cn
  1916 + */
  1917 +
  1918 +var $ = require("jquery");
  1919 +
  1920 +function noticeScroll(selecter, time) {
  1921 + var $notice = $(selecter),
  1922 + $noticeItem = $notice.find('.notice-item'),
  1923 + count = $noticeItem.length,
  1924 + i = 1;
  1925 +
  1926 + selecter = selecter || '.notice';
  1927 + time = time || 3000;
  1928 +
  1929 + if (count > 1) {
  1930 + setInterval(function() {
  1931 + if (i >= count) {
  1932 + i = 0;
  1933 + }
  1934 + $noticeItem.fadeOut();
  1935 + $notice.find('.item-' + i).fadeIn();
  1936 + i++;
  1937 + }, time);
  1938 + }
  1939 +}
  1940 +
  1941 +module.exports = noticeScroll;
  1942 +
  1943 +});
1910 define("js/home/maybe-like", ["jquery","hammer","lazyload"], function(require, exports, module){ 1944 define("js/home/maybe-like", ["jquery","hammer","lazyload"], function(require, exports, module){
1911 /** 1945 /**
1912 * “你可能喜欢”模块JS 1946 * “你可能喜欢”模块JS
@@ -7049,6 +7083,8 @@ var $ = require("jquery"), @@ -7049,6 +7083,8 @@ var $ = require("jquery"),
7049 7083
7050 var diaLog = require("js/me/dialog"); 7084 var diaLog = require("js/me/dialog");
7051 7085
  7086 +var tip = require("js/plugin/tip");
  7087 +
7052 var $navLi = $('#fav-tab > li'), 7088 var $navLi = $('#fav-tab > li'),
7053 $favContainer = $('.fav-content > .fav-type'), 7089 $favContainer = $('.fav-content > .fav-type'),
7054 swiperObj = {}, 7090 swiperObj = {},
@@ -7130,11 +7166,13 @@ function loadData($parent, url, page) { @@ -7130,11 +7166,13 @@ function loadData($parent, url, page) {
7130 if (data === ' ') { 7166 if (data === ' ') {
7131 $loadingMask.addClass('hide'); 7167 $loadingMask.addClass('hide');
7132 $parent.closest('.fav-type').find('.fav-null-box').removeClass('hide'); 7168 $parent.closest('.fav-type').find('.fav-null-box').removeClass('hide');
  7169 + window.rePosFooter();
7133 } else if (data === 'end') { 7170 } else if (data === 'end') {
7134 7171
7135 //处理data等于end时如果loadingMask存在且没有hide样式的情况 7172 //处理data等于end时如果loadingMask存在且没有hide样式的情况
7136 if ($loadingMask && !$loadingMask.hasClass('hide')) { 7173 if ($loadingMask && !$loadingMask.hasClass('hide')) {
7137 $loadingMask.addClass('hide'); 7174 $loadingMask.addClass('hide');
  7175 +
7138 //$parent.closest('.fav-type').find('.fav-null-box').removeClass('hide'); 7176 //$parent.closest('.fav-type').find('.fav-null-box').removeClass('hide');
7139 } 7177 }
7140 7178
@@ -7297,7 +7335,7 @@ $(document).on('touchend', '.swiper-header', function() { @@ -7297,7 +7335,7 @@ $(document).on('touchend', '.swiper-header', function() {
7297 } 7335 }
7298 }); 7336 });
7299 7337
7300 -$('.invalidGoods').on('touchstart touchend', function() { 7338 +$('.invalidGoods').on('touchstart touchend', function(e) {
7301 var $this = $(e.target).closest('span'); 7339 var $this = $(e.target).closest('span');
7302 7340
7303 if ($this.hasClass('del-fav')) { 7341 if ($this.hasClass('del-fav')) {
@@ -7306,6 +7344,7 @@ $('.invalidGoods').on('touchstart touchend', function() { @@ -7306,6 +7344,7 @@ $('.invalidGoods').on('touchstart touchend', function() {
7306 tip.show('商品已下架'); 7344 tip.show('商品已下架');
7307 return false; 7345 return false;
7308 }); 7346 });
  7347 +
7309 }); 7348 });
7310 define("js/me/suggest", ["jquery","hammer","lazyload","handlebars","source-map"], function(require, exports, module){ 7349 define("js/me/suggest", ["jquery","hammer","lazyload","handlebars","source-map"], function(require, exports, module){
7311 /** 7350 /**
@@ -8376,7 +8415,9 @@ define("js/me/index", ["jquery","swiper","index"], function(require, exports, mo @@ -8376,7 +8415,9 @@ define("js/me/index", ["jquery","swiper","index"], function(require, exports, mo
8376 * @author: bikai<kai.bi@yoho.cn> 8415 * @author: bikai<kai.bi@yoho.cn>
8377 * @date: 2015/11/12 8416 * @date: 2015/11/12
8378 */ 8417 */
8379 -var $ = require("jquery"); 8418 +var $ = require("jquery"),
  8419 + noticeScroll = require("js/plugin/notice-scroll");
  8420 +
8380 var $userAvatar = $('.user-avatar'), 8421 var $userAvatar = $('.user-avatar'),
8381 $listItem = $('.list-item'); 8422 $listItem = $('.list-item');
8382 var myImage = new Image(), 8423 var myImage = new Image(),
@@ -8392,6 +8433,8 @@ myImage.onload = function() { @@ -8392,6 +8433,8 @@ myImage.onload = function() {
8392 $userAvatar.css('background-image', 'url(' + avatar + ')'); 8433 $userAvatar.css('background-image', 'url(' + avatar + ')');
8393 }; 8434 };
8394 8435
  8436 +noticeScroll('.notice', $('.notice').data('time') * 1000);
  8437 +
8395 $('.yoho-page').on('touchstart', '.list-item, .type-item, .order-title', function() { 8438 $('.yoho-page').on('touchstart', '.list-item, .type-item, .order-title', function() {
8396 $listItem.removeClass('highlight'); 8439 $listItem.removeClass('highlight');
8397 $(this).addClass('highlight'); 8440 $(this).addClass('highlight');
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.

23.3 KB | W: | H:

17.3 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin