Authored by ccbikai

会员专享商品

@@ -194,8 +194,6 @@ let filter = (req, res, next) => { @@ -194,8 +194,6 @@ let filter = (req, res, next) => {
194 */ 194 */
195 let search = (req, res, next) => { 195 let search = (req, res, next) => {
196 let params = Object.assign({}, req.query); 196 let params = Object.assign({}, req.query);
197 -  
198 - // uid = 9239279  
199 let uid = req.user.uid || 0; 197 let uid = req.user.uid || 0;
200 198
201 saleModel.getSearchData(params, uid).then((result) => { 199 saleModel.getSearchData(params, uid).then((result) => {
@@ -2,6 +2,6 @@ @@ -2,6 +2,6 @@
2 {{> common/floor-header-more}} 2 {{> common/floor-header-more}}
3 {{> resources/banner-top}} 3 {{> resources/banner-top}}
4 {{/data}} 4 {{/data}}
5 -<div class="vip-floor"> 5 +<div class="vip-floor clearfix">
6 6
7 </div> 7 </div>
@@ -5,7 +5,8 @@ @@ -5,7 +5,8 @@
5 */ 5 */
6 6
7 var $ = require('yoho-jquery'), 7 var $ = require('yoho-jquery'),
8 - Swiper = require('yoho-swiper'); 8 + Swiper = require('yoho-swiper'),
  9 + lazyload = require('yoho-jquery-lazyload');
9 10
10 var search = require('./sale/search'); 11 var search = require('./sale/search');
11 12
@@ -29,8 +30,27 @@ $('.swiper-container').each(function() { @@ -29,8 +30,27 @@ $('.swiper-container').each(function() {
29 30
30 $(function() { 31 $(function() {
31 var $saleNavSelect = $('.sale-nav-select'); 32 var $saleNavSelect = $('.sale-nav-select');
  33 + var $vipFloor = $('.vip-floor');
32 34
33 $('.sale-nav').on('click', function() { 35 $('.sale-nav').on('click', function() {
34 $saleNavSelect.toggleClass('show'); 36 $saleNavSelect.toggleClass('show');
35 }); 37 });
  38 +
  39 + // 读取会员专享商品
  40 + $.ajax({
  41 + url: '/product/sale/search',
  42 + data: {
  43 + channel: window.queryString.channel || 'boys',
  44 + yh_channel: window.queryString.channel || 'boys',
  45 + saleType: '2',
  46 + type: 'all',
  47 + order: '0',
  48 + limit: '4'
  49 + }
  50 + }).then(function(res) {
  51 + if (/good-info/.test(res)) {
  52 + $vipFloor.html(res).addClass('goods-container');
  53 + lazyload($vipFloor.find('img.lazy'));
  54 + }
  55 + });
36 }); 56 });
@@ -85,6 +85,19 @@ @@ -85,6 +85,19 @@
85 .category-swiper { 85 .category-swiper {
86 height: auto; 86 height: auto;
87 } 87 }
  88 +
  89 + .vip-floor {
  90 + padding-bottom: 30px;
  91 +
  92 + .good-info {
  93 + margin-bottom: 20px;
  94 + height: 570px;
  95 + }
  96 +
  97 + .tag-container {
  98 + display: none;
  99 + }
  100 + }
88 } 101 }
89 102
90 .sale-vip-page { 103 .sale-vip-page {