Authored by Rock Zhang

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

... ... @@ -16,12 +16,13 @@ $resend.on('touchstart', function(e) {
$.ajax({
url: $resend.data('url'),
type: 'GET'
}).then(function(data) {
if (data.code === 200) {
showErrTip(data.message);
} else {
showErrTip(data.message);
type: 'GET',
success: function(data) {
if (data.code === 200) {
showErrTip(data.message);
} else {
showErrTip(data.message);
}
}
});
});
\ No newline at end of file
... ...
... ... @@ -37,12 +37,13 @@ $btnSure.on('touchstart', function() {
type: 'POST',
data: {
email: email
}
}).then(function(data) {
if (data.code === 200) {
location.href = data.data;
} else {
showErrTip(data.message);
},
success: function(data) {
if (data.code === 200) {
location.href = data.data;
} else {
showErrTip(data.message);
}
}
});
} else {
... ...
... ... @@ -45,12 +45,13 @@ $btnNext.on('touchstart', function() {
data: {
area: country.split('+')[1],
mobile: pn
}
}).then(function(data) {
if (data.code === 200) {
location.href = '/passport/back/code';
} else {
showErrTip(data.message);
},
success: function(data) {
if (data.code === 200) {
location.href = '/passport/back/code';
} else {
showErrTip(data.message);
}
}
});
} else {
... ...
... ... @@ -37,17 +37,18 @@ $btnOk.on('touchstart', function() {
url: '/passport/back/update',
data: {
password: pwd
}
}).then(function(data) {
if (data.code === 200) {
showErrTip('密码修改成功');
//1000ms后跳转页面
setTimeout(function() {
location.href = '/';
}, 1000);
} else {
showErrTip(data.message);
},
success: function(data) {
if (data.code === 200) {
showErrTip('密码修改成功');
//1000ms后跳转页面
setTimeout(function() {
location.href = '/';
}, 1000);
} else {
showErrTip(data.message);
}
}
});
} else {
... ...
... ... @@ -50,15 +50,16 @@ module.exports = function(useInRegister) {
$.ajax({
type: 'POST',
url: '/passport/' + urlMid + '/sendPhone'
}).then(function (data) {
if (data.code === 200) {
$captchaTip.text('重发验证码 (60秒)').addClass('disable');
countDown();
} else {
url: '/passport/' + urlMid + '/sendPhone',
success: function(data) {
if (data.code === 200) {
$captchaTip.text('重发验证码 (60秒)').addClass('disable');
countDown();
} else {
//验证码不正确,显示提示
showErrTip(data.message);
//验证码不正确,显示提示
showErrTip(data.message);
}
}
});
});
... ... @@ -73,14 +74,15 @@ module.exports = function(useInRegister) {
url: '/passport/' + urlMid + '/verifycode',
data: {
verifyCode: trim($captcha.val())
}
}).then(function (data) {
if (data.code === 200) {
location.href = data.data;
} else {
},
success: function(data) {
if (data.code === 200) {
location.href = data.data;
} else {
//验证码不正确,显示提示
showErrTip(data.message);
//验证码不正确,显示提示
showErrTip(data.message);
}
}
});
});
... ...
... ... @@ -81,20 +81,22 @@ $loginBtn.on('touchstart', function() {
area: country.split('+')[1],
account: pn,
pwd: pwd
},
success: function(data) {
if (data.code === 200) {
showErrTip('登录成功');
//1000ms后跳转页面
setTimeout(function() {
location.href = data.data;
}, 1000);
} else {
showErrTip(data.message);
}
},
error: function() {
showErrTip('网络断开连接啦~');
}
}).then(function(data) {
if (data.code === 200) {
showErrTip('登录成功');
//1000ms后跳转页面
setTimeout(function() {
location.href = data.data;
}, 1000);
} else {
showErrTip(data.message);
}
}, function() {
showErrTip('网络断开连接啦~');
});
} else {
showErrTip('账号或密码有错误,请重新输入');
... ...
... ... @@ -84,20 +84,22 @@ $loginBtn.on('touchstart', function() {
data: {
account: acc,
pwd: pwd
},
success: function(data) {
if (data.code === 200) {
showErrTip('登录成功');
//1s后跳转页面
setTimeout(function() {
location.href = data.data;
}, 1000);
} else {
showErrTip(data.message);
}
},
error: function() {
showErrTip('网络断开连接啦~');
}
}).then(function(data) {
if (data.code === 200) {
showErrTip('登录成功');
//1s后跳转页面
setTimeout(function() {
location.href = data.data;
}, 1000);
} else {
showErrTip(data.message);
}
}, function() {
showErrTip('网络断开连接啦~');
});
} else {
showErrTip('账号或密码有错误,请重新输入');
... ...
... ... @@ -39,23 +39,24 @@ $btnSure.on('touchstart', function() {
url: '/passport/register/regmobile',
data: {
password: pwd
}
}).then(function(data) {
if (data.code === 200) {
showErrTip('注册成功');
//1000ms后跳转页面
setTimeout(function() {
location.href = data.data;
}, 1000);
} else {
if (data.code === 401 || data.code === 404 || data.code === 505) {
showErrTip(data.message);
} else {
showErrTip(data.message);
},
success: function(data) {
if (data.code === 200) {
showErrTip('注册成功');
//1000ms后跳转页面
setTimeout(function() {
location.href = data.data;
}, 1000);
} else {
if (data.code === 401 || data.code === 404 || data.code === 505) {
showErrTip(data.message);
} else {
showErrTip(data.message);
setTimeout(function() {
location.href = data.data;
}, 1000);
}
}
}
});
... ...
... ... @@ -45,12 +45,13 @@ $btnNext.on('touchstart', function() {
data: {
area: country.split('+')[1],
profile: pn
}
}).then(function(data) {
if (data.code === 200) {
location.href = '/passport/register/code';
} else {
showErrTip(data.message);
},
success: function(data) {
if (data.code === 200) {
location.href = '/passport/register/code';
} else {
showErrTip(data.message);
}
}
});
} else {
... ...
... ... @@ -4,50 +4,64 @@
<script>
seajs.use('js/guang/plus-star/list');
</script>
{{else if psDetail}}
{{/if}}
{{#if psDetail}}
<script>
seajs.use('js/guang/plus-star/detail');
</script>
{{/if}}
{{!-- 注册 --}}
{{else if regIndex}}
{{#if regIndex}}
<script>
seajs.use('js/passport/register/register');
</script>
{{else if regCode}}
{{/if}}
{{#if regCode}}
<script>
seajs.use('js/passport/register/code');
</script>
{{else if regPwd}}
{{/if}}
{{#if regPwd}}
<script>
seajs.use('js/passport/register/password');
</script>
{{/if}}
{{!-- 登陆 --}}
{{else if loginIndex}}
{{#if loginIndex}}
<script>
seajs.use('js/passport/login/login');
</script>
{{else if loginInterational}}
{{/if}}
{{#if loginInterational}}
<script>
seajs.use('js/passport/login/interational');
</script>
{{/if}}
{{!-- 密码找回 --}}
{{else if backEmail}}
{{#if backEmail}}
<script>
seajs.use('js/passport/back/email');
</script>
{{else if backEmailSuccess}}
{{/if}}
{{#if backEmailSuccess}}
<script>
seajs.use('js/passport/back/email-success');
</script>
{{else if backMobile}}
{{/if}}
{{#if backMobile}}
<script>
seajs.use('js/passport/back/mobile');
</script>
{{else if backCode}}
{{/if}}
{{#if backCode}}
<script>
seajs.use('js/passport/back/code');
</script>
{{else if backNewPwd}}
{{/if}}
{{#if backNewPwd}}
<script>
seajs.use('js/passport/back/new-password');
</script>
... ...