...
|
...
|
@@ -2,15 +2,17 @@ |
|
|
* @Author: Targaryen
|
|
|
* @Date: 2017-03-23 11:31:51
|
|
|
* @Last Modified by: Targaryen
|
|
|
* @Last Modified time: 2017-04-14 11:17:55
|
|
|
* @Last Modified time: 2017-04-25 10:56:07
|
|
|
*/
|
|
|
|
|
|
/** *****************
|
|
|
* 红人店铺首页
|
|
|
********************/
|
|
|
const Swiper2 = require('yoho-swiper2');
|
|
|
const lazyLoad = require('yoho-jquery-lazyload');
|
|
|
let tip = require('../../plugin/tip');
|
|
|
let $goodsContainer = $('.index-goods-container');
|
|
|
let $indexGoodsContaniner = $('#indexGoodsContainer');
|
|
|
let $collect = $('#collect');
|
|
|
|
|
|
const shopId = $('#shopId').val();
|
...
|
...
|
@@ -134,3 +136,23 @@ $collect.on('click', function() { |
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
* 异步加载首页全部商品
|
|
|
*/
|
|
|
$.ajax({
|
|
|
type: 'GET',
|
|
|
url: '/product/search/search',
|
|
|
xhrFields: {
|
|
|
withCredentials: true
|
|
|
},
|
|
|
data: {
|
|
|
shop_id: shopId
|
|
|
},
|
|
|
success: function(result) {
|
|
|
let $result = $(result);
|
|
|
|
|
|
lazyLoad($result.find('img[class=lazy]'));
|
|
|
$indexGoodsContaniner.find('.container').html($result);
|
|
|
}
|
|
|
}); |
...
|
...
|
|