Authored by xuqi

my guang

@@ -1043,8 +1043,11 @@ @@ -1043,8 +1043,11 @@
1043 ### 我的逛 1043 ### 我的逛
1044 1044
1045 { 1045 {
1046 - myGuang: [  
1047 - {...} //逛资讯  
1048 - ..  
1049 - ] 1046 + myGuang: {
  1047 + infos: [
  1048 + {...} //逛资讯
  1049 + ..
  1050 + ],
  1051 + //若无收藏则不传infos
  1052 + }
1050 } 1053 }
@@ -18,10 +18,13 @@ var setting = { @@ -18,10 +18,13 @@ var setting = {
18 end: false 18 end: false
19 }; 19 };
20 20
21 -info.initInfosEvt($infoList); 21 +//对于有逛收藏的页面进行事件处理
  22 +if ($infoList.length > 0) {
  23 + info.initInfosEvt($infoList);
22 24
23 -$(window).scroll(function() {  
24 - if ($(window).scrollTop() + winH >= $(document).height() - 0.25 * $infoList.height()) {  
25 - loadMore($infoList, setting, '/home/myguang');  
26 - }  
27 -});  
  25 + $(window).scroll(function() {
  26 + if ($(window).scrollTop() + winH >= $(document).height() - 0.25 * $infoList.height()) {
  27 + loadMore($infoList, setting, '/home/myguang');
  28 + }
  29 + });
  30 +}
1 -$fav: sprite-map("me/fav/*.png",$spacing: 5px);  
2 -  
3 .yoho-favorite-page { 1 .yoho-favorite-page {
4 width: 100%; 2 width: 100%;
5 height: auto; 3 height: auto;
1 $vip: sprite-map("me/vip/*.png", $spacing: 10px); 1 $vip: sprite-map("me/vip/*.png", $spacing: 10px);
  2 +$fav: sprite-map("me/fav/*.png", $spacing: 5px);
2 3
3 -@import "home", "vip-grade", "order", "order-detail", "coupons", "personal-details", "yoho-coin", "fav", "suggest", "address", "online-service"; 4 +@import "home", "vip-grade", "order", "order-detail", "coupons", "personal-details", "yoho-coin", "fav", "suggest", "address", "online-service", "my-guang";
4 5
  1 +.my-guang-page {
  2 +
  3 + .null {
  4 + height: 240rem / $pxConvertRem;
  5 + width: 100%;
  6 + position: absolute;
  7 + text-align: center;
  8 + top: 50%;
  9 + margin-top: -120rem / $pxConvertRem;
  10 +
  11 + span {
  12 + color: #b0b0b0;
  13 + font-size: 24rem / $pxConvertRem;
  14 + margin-top: 20rem / $pxConvertRem;
  15 + }
  16 + }
  17 +
  18 + .icon-null {
  19 + width: pxToRem(188px);
  20 + height: pxToRem(171px);
  21 + @include rem-sprite($fav, fav-null);
  22 + margin: 0 auto;
  23 + margin-bottom: 30rem / $pxConvertRem;
  24 + }
  25 +}
1 {{> layout/header}} 1 {{> layout/header}}
2 <div class="my-guang-page yoho-page"> 2 <div class="my-guang-page yoho-page">
3 - <div id="info-list" class="info-list">  
4 - {{# myGuang}}  
5 - {{> guang/info}}  
6 - {{/ myGuang}}  
7 - </div> 3 + {{# myGuang}}
  4 + {{#if infos}}
  5 + <div id="info-list" class="info-list">
  6 + {{#each infos}}
  7 + {{> guang/info}}
  8 + {{/each}}
  9 + </div>
  10 + {{^}}
  11 + <div class="null">
  12 + <div class="icon-null"></div>
  13 + <span>您当前还未收藏任何资讯!</span>
  14 + </div>
  15 + {{/if}}
  16 + {{/ myGuang}}
8 </div> 17 </div>
9 {{> layout/footer}} 18 {{> layout/footer}}