Authored by xuqi

my guang

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