Authored by 沈志敏

增加 loading 动画

{
"name": "yoho-js-sdk",
"version": "1.1.3",
"version": "1.1.4",
"description": "YOHO!前端js的功能封装包,主要用于在活动页面中,对主要功能的封装。",
"keywords": [
"YOHO!",
... ...
... ... @@ -69,6 +69,7 @@ let _jsonp = function(el, param, cond){
}
}
let loading = el.find('.loading');
let imgwh = el.find('.imgwh').val() || ''; // 获取图片宽x高
imgwh = imgwh.split('x') || [];
... ... @@ -86,11 +87,13 @@ let _jsonp = function(el, param, cond){
$(goods[0]).remove();
} else {
goods.removeClass('novisible');
loading.hide();
}
return;
}
if (cloneitem) { // 可复制item
for (let indx = 0; indx < res.length; indx++) {
var cnt = isNaN(Number(cloneitem)) ? res.length : Number(cloneitem);
for (let indx = 0; indx < cnt; indx++) {
if (indx === 0) {
let gel = $(goods[0]);
let nel = _replaceData(gel, cond, res[indx], wh);
... ... @@ -113,12 +116,14 @@ let _jsonp = function(el, param, cond){
_replaceData(el, cond, res[indx], wh);
});
goods.removeClass('novisible');
loading.hide();
}
}, function(){
if (cloneitem) {
$(goods[0]).remove();
} else {
goods.removeClass('novisible');
loading.hide();
}
});
};
... ... @@ -152,7 +157,7 @@ let _abTest = function(uid) {
PAGE_URL: window.originUrl,
PAGE_NAME: decodeURI(window.qs.title || document.title),
ACTION_URL: actionUrl,
CROWD_CODE: mkt_code
CROWD_CODE: mkt_code + ''
})
}, true);
... ... @@ -164,7 +169,7 @@ let _abTest = function(uid) {
PAGE_URL: window.originUrl,
PAGE_NAME: decodeURI(window.qs.title || document.title),
F_URL: $(this).attr('href'),
CROWD_CODE: mkt_code
CROWD_CODE: mkt_code + ''
})
}, true);
});
... ...