Authored by QC-L

首页及我的拼团添加 tab 切换

... ... @@ -43,7 +43,21 @@ function newIndex(req, res, next) {
floors: result.index,
tabs: result.tabData,
filterList: result.filterGroupList,
shareInfo: result.shareInfo
shareInfo: result.shareInfo,
tabbarItems: {
active: 0,
items: [{
title: '拼团首页',
url: '/activity/group/newIndex',
style: 'group-tab-home',
style_unselect: 'group-tab-home-unselect',
}, {
title: '我的拼团',
url: '/activity/group/order',
style: 'my-group-tab',
style_unselect: 'my-group-tab-unselect',
}]
}
});
}).catch(next);
}
... ... @@ -354,8 +368,21 @@ function order(req, res, next) {
{
title: '全部',
src: '/activity/group/order?type=1&selectIndex=1'
}
],
}],
tabbarItems: {
active: 1,
items: [{
title: '拼团首页',
url: '/activity/group/newIndex',
style: 'group-tab-home',
style_unselect: 'group-tab-home-unselect',
}, {
title: '我的拼团',
url: '/activity/group/order',
style: 'my-group-tab',
style_unselect: 'my-group-tab-unselect',
}]
},
selectIndex: Number(selectIndex) || 0
});
}).catch(next);
... ...
... ... @@ -49,6 +49,8 @@
</div>
{{!-- {{> group/resources/filter-page}} --}}
</div>
<a class="bottom" href="/activity/group/order">我的拼团</a>
{{!-- <a class="bottom" href="/activity/group/order">我的拼团</a> --}}
{{#tabbarItems}}
{{> group/group-tabbar}}
{{/tabbarItems}}
</div>
\ No newline at end of file
... ...
... ... @@ -94,4 +94,7 @@
</div>
{{/if}}
<a class="back-home" href="/activity/group"></a>
{{#tabbarItems}}
{{> group/group-tabbar}}
{{/tabbarItems}}
</div>
... ...
<div class="group-tabbar">
{{#each items}}
<div class="group-tabbar-item">
{{#ifcond @index '==' ../active}}
<a class=" my-group-handler" href="{{url}}">
<div class="{{style}}"></div>
</a>
{{^}}
<a class=" my-group-handler" href="{{url}}">
<div class="{{style_unselect}}"></div>
</a>
{{/ifcond}}
</div>
{{/each}}
</div>
\ No newline at end of file
... ...
@import "group-tabbar";
.group-order-page {
background-color: #f0f0f0;
}
... ...
.group-tabbar {
position: fixed;
right: 0;
bottom: 0;
left: 0;
height: 90px;
padding: 0;
margin: 0;
background-color: #fff;
font-size: 28px;
color: #444;
letter-spacing: 0;
font-weight: 500;
text-align: center;
line-height: 90px;
border-top: 1px solid #e0e0e0;
z-index: 999;
border-radius: 0 !important;
display: flex;
flex-direction: row;
justify-content: space-around;
.group-tabbar-item {
width: 90px;
height: 90px;
}
.group-tab-home {
width: 90px;
height: 90px;
background: url("img/activity/group/group_home@3x.png") no-repeat;
background-size: contain;
}
.group-tab-home-unselect {
width: 90px;
height: 90px;
background: url("img/activity/group/group_home_unselect@3x.png") no-repeat;
background-size: contain;
}
.my-group-tab {
width: 90px;
height: 90px;
background: url("img/activity/group/my_group@3x.png") no-repeat;
background-size: contain;
}
.my-group-tab-unselect {
width: 90px;
height: 90px;
background: url("img/activity/group/my_group_unselect@3x.png") no-repeat;
background-size: contain;
}
&:after {
border-radius: 0;
border: none;
}
}
... ...
... ... @@ -9,6 +9,7 @@
@import "tabs";
@import "filter-list";
@import "new-filter-list";
@import "group-tabbar";
.group {
.resources {
... ...