...
|
...
|
@@ -277,55 +277,50 @@ setTimeout(() => { |
|
|
return false;
|
|
|
});
|
|
|
$('#limit-sale').on('touchend', function(e) {
|
|
|
let loginUrl = $('#loginUrl').val(),
|
|
|
time,
|
|
|
let time,
|
|
|
ifr;
|
|
|
|
|
|
e.stopPropagation();
|
|
|
|
|
|
if (loginUrl) {
|
|
|
window.location = loginUrl;
|
|
|
} else {
|
|
|
if ($('.is-mars-app').length > 0 && yoho && yoho.isMarsApp) {
|
|
|
let Limitcode = $('#limitProductCode').val();
|
|
|
if ($('.is-mars-app').length > 0 && yoho && yoho.isMarsApp) {
|
|
|
let Limitcode = $('#limitProductCode').val();
|
|
|
|
|
|
yoho.invokeMethod('go.minAppLimitDetail', {
|
|
|
url: '/pages/product/detail/detail?limitProductCode=' + Limitcode // eslint-disable-line
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
yoho.invokeMethod('go.minAppLimitDetail', {
|
|
|
url: '/pages/product/detail/detail?limitProductCode=' + Limitcode // eslint-disable-line
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
dialog.showDialog({
|
|
|
dialogText: '进入有货APP,获取限购码',
|
|
|
hasFooter: {
|
|
|
rightBtnText: '打开Yoho!Buy有货APP'
|
|
|
dialog.showDialog({
|
|
|
dialogText: '进入有货APP,获取限购码',
|
|
|
hasFooter: {
|
|
|
rightBtnText: '打开Yoho!Buy有货APP'
|
|
|
}
|
|
|
}, function() {
|
|
|
let appUrl = $('input[name="limitCodeUrl"]').val();
|
|
|
|
|
|
ifr = document.createElement('iframe');
|
|
|
ifr.src = appUrl;
|
|
|
ifr.style.display = 'none';
|
|
|
document.body.appendChild(ifr);
|
|
|
window.location.href = appUrl;
|
|
|
|
|
|
time = Date.now();
|
|
|
window.setTimeout(function() {
|
|
|
document.body.removeChild(ifr);
|
|
|
if (Date.now() - time < 3200) {
|
|
|
window.location.href = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho';
|
|
|
}
|
|
|
}, function() {
|
|
|
let appUrl = $('input[name="limitCodeUrl"]').val();
|
|
|
|
|
|
ifr = document.createElement('iframe');
|
|
|
ifr.src = appUrl;
|
|
|
ifr.style.display = 'none';
|
|
|
document.body.appendChild(ifr);
|
|
|
window.location.href = appUrl;
|
|
|
|
|
|
time = Date.now();
|
|
|
window.setTimeout(function() {
|
|
|
document.body.removeChild(ifr);
|
|
|
if (Date.now() - time < 3200) {
|
|
|
window.location.href = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho';
|
|
|
}
|
|
|
}, 3000);
|
|
|
}, 3000);
|
|
|
|
|
|
}, null, true);
|
|
|
}, null, true);
|
|
|
|
|
|
$('.dialog-wrapper').off('touchstart').on('touchstart', function(para) {
|
|
|
para.stopPropagation();
|
|
|
if ($(para.target).hasClass('dialog-wrapper')) {
|
|
|
dialog.hideDialog();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
$('.dialog-wrapper').off('touchstart').on('touchstart', function(para) {
|
|
|
para.stopPropagation();
|
|
|
if ($(para.target).hasClass('dialog-wrapper')) {
|
|
|
dialog.hideDialog();
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$('.mars-jump-min-app').on('click', function() {
|
...
|
...
|
|