Authored by whb

index js

... ... @@ -2255,62 +2255,62 @@ $countPerPage.click(function() {
});
});
define("js/product/latest-walk", ["jquery","handlebars","source-map","lazyload"], function(require, exports, module){
/**
* 最近浏览取接口渲染模板
* @author: xuqi<qi.xu@yoho.cn>
8 @date: 2016/1/20
*/
var $ = require("jquery");
var Handlebars = require("handlebars");
var lazyLoad = require("lazyload");
var $latestWalkCount = $('#latest-walk-count');
(function() {
var tpl;
if ($latestWalkCount.lenght < 0) {
return;
}
tpl = Handlebars.compile($('#latest-walk-tpl').html());
$.ajax({
url: 'http://itemapi.yohobuy.com/item/item/recentreview',
dataType: 'jsonp',
data: {
limit: $latestWalkCount.val()
},
success: function(data) {
var latestWalk = [],
res, i, cur;
if (data.code === 200) {
res = data.data;
for (i = 0; i < res.length; i++) {
cur = res[i];
latestWalk.push({
href: cur.url,
img: cur.pic_url,
name: cur.product_name,
salePrice: cur.price,
marketPrice: cur.market_price
});
}
if (latestWalk.length > 0) {
$('#latest-walk-goods').html(tpl({
latestWalk: latestWalk
}));
lazyLoad($('#latest-walk-goods .lazy'));
}
}
}
});
/**
* 最近浏览取接口渲染模板
* @author: xuqi<qi.xu@yoho.cn>
8 @date: 2016/1/20
*/
var $ = require("jquery");
var Handlebars = require("handlebars");
var lazyLoad = require("lazyload");
var $latestWalkCount = $('#latest-walk-count');
(function() {
var tpl;
if ($latestWalkCount.length < 0) {
return;
}
tpl = Handlebars.compile($('#latest-walk-tpl').html());
$.ajax({
url: 'http://itemapi.yohobuy.com/item/item/recentreview',
dataType: 'jsonp',
data: {
limit: $latestWalkCount.val()
},
success: function(data) {
var latestWalk = [],
res, i, cur;
if (data.code === 200) {
res = data.data;
for (i = 0; i < res.length; i++) {
cur = res[i];
latestWalk.push({
href: cur.url,
img: cur.pic_url,
name: cur.product_name,
salePrice: cur.price,
marketPrice: cur.market_price
});
}
if (latestWalk.length > 0) {
$('#latest-walk-goods').html(tpl({
latestWalk: latestWalk
}));
lazyLoad($('#latest-walk-goods .lazy'));
}
}
}
});
}());
});
define("js/product/product", ["jquery","lazyload"], function(require, exports, module){
... ...
This diff could not be displayed because it is too large.