Authored by biao

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

... ... @@ -109,18 +109,13 @@ $page.on('touchstart', '.del-icon', function() {
if (data.code === 200) {
dialog.showDialog({
dialogText: '删除浏览记录成功',
autoHide: true,
autoHide: 2000,
fast: true
});
setTimeout(function() {
window.history.go(0);
}, 1200);
}
},
complete: function() {
setTimeout(function() {
dialog.hideDialog();
}, 1500);
}
});
});
... ...
... ... @@ -37,6 +37,7 @@ exports.showDialog = function(data, callback) {
var dialogStr = dialogTemplate(data),
$dialogBox,
defaultHideDuraton,
dialogWrapperHammer;
$('.dialog-wrapper').remove();
... ... @@ -63,9 +64,13 @@ exports.showDialog = function(data, callback) {
//隐藏
if (data.autoHide) {
defaultHideDuraton = 1000;
if (data.autoHide > 1) {
defaultHideDuraton = data.autoHide;
}
setTimeout(function() {
$dialogWrapper.fadeOut();
}, 1000);
}, defaultHideDuraton);
}
dialogWrapperHammer.on('tap', function(event) {
... ... @@ -76,9 +81,5 @@ exports.showDialog = function(data, callback) {
callback();
}
});
};
exports.hideDialog = function() {
$dialogWrapper.fadeOut();
};
... ...