Authored by whb

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

... ... @@ -538,29 +538,35 @@ exports.init = function(page) {
var time = 0,
t,
refer = data.href;
refer;
t = setTimeout(function() {
time++;
}, 1000);
if (data.code === 200) {
$.ajax({
type: 'POST',
url: '/passport/register/mobileregister',
data: {
session: data.session
}
}).then(function(data) {
refer = data.data.href;
t = setTimeout(function() {
time++;
}, 1000);
$.ajax({
type: 'GET',
url: data.data.session
}).then(function(data) {
if (data.code === 200 && t < 3) {
clearInterval(t);
location.href = refer;
}
});
if (data.code === 200 && t < 3) {
if (t >= 3) {
clearInterval(t);
location.href = refer;
}
});
} else {
if (t >= 3) {
clearInterval(t);
location.href = refer;
//todo
console.log('网络超时~');
}
});
... ...