Authored by ccbikai

会员专享商品

... ... @@ -194,8 +194,6 @@ let filter = (req, res, next) => {
*/
let search = (req, res, next) => {
let params = Object.assign({}, req.query);
// uid = 9239279
let uid = req.user.uid || 0;
saleModel.getSearchData(params, uid).then((result) => {
... ...
... ... @@ -2,6 +2,6 @@
{{> common/floor-header-more}}
{{> resources/banner-top}}
{{/data}}
<div class="vip-floor">
<div class="vip-floor clearfix">
</div>
... ...
... ... @@ -5,7 +5,8 @@
*/
var $ = require('yoho-jquery'),
Swiper = require('yoho-swiper');
Swiper = require('yoho-swiper'),
lazyload = require('yoho-jquery-lazyload');
var search = require('./sale/search');
... ... @@ -29,8 +30,27 @@ $('.swiper-container').each(function() {
$(function() {
var $saleNavSelect = $('.sale-nav-select');
var $vipFloor = $('.vip-floor');
$('.sale-nav').on('click', function() {
$saleNavSelect.toggleClass('show');
});
// 读取会员专享商品
$.ajax({
url: '/product/sale/search',
data: {
channel: window.queryString.channel || 'boys',
yh_channel: window.queryString.channel || 'boys',
saleType: '2',
type: 'all',
order: '0',
limit: '4'
}
}).then(function(res) {
if (/good-info/.test(res)) {
$vipFloor.html(res).addClass('goods-container');
lazyload($vipFloor.find('img.lazy'));
}
});
});
... ...
... ... @@ -85,6 +85,19 @@
.category-swiper {
height: auto;
}
.vip-floor {
padding-bottom: 30px;
.good-info {
margin-bottom: 20px;
height: 570px;
}
.tag-container {
display: none;
}
}
}
.sale-vip-page {
... ...