Authored by htoooth

fix

... ... @@ -82,7 +82,7 @@ let index = (req, res) => {
captchaUrl: helpers.urlFormat('/passport/images', {t: Date.now()}),
itemUrl: helpers.urlFormat('/help/', {category_id: 9}),
referUrl: refer,
loginUrl: helpers.urlFormat('/signin', {refer: refer}),
loginUrl: helpers.urlFormat('/passport/login', {refer: refer}),
regBtnText: '立即注册'
}
});
... ...
... ... @@ -69,7 +69,7 @@
<li class="clearfix quick-login-container">
<div style="width: 100%;text-align: center">
已注册YOHO!BLK账号
<a class="blue go-login" href="">快速登录</a>
<a class="blue go-login" href="{{loginUrl}}">快速登录</a>
</div>
</li>
</ul>
... ...
... ... @@ -13,11 +13,11 @@ module.exports = {
app: 'web',
appVersion: '4.6.0', // 调用api接口版本
port: 6003,
siteUrl: '//www.yohoblk.com',
siteUrl: '//www.yohobuy.com',
subDomains: {
default: '//www.yohoblk.com'
default: '//www.yohobuy.com'
},
cookieDomain: 'yohoblk.com',
cookieDomain: 'yohobuy.com',
domains: {
api: 'http://testapi.yoho.cn:28078/', // devapi.yoho.cn:58078 testapi.yoho.cn:28078 devapi.yoho.cn:58078
service: 'http://devservice.yoho.cn:28077/', // testservice.yoho.cn:28077 devservice.yoho.cn:58077
... ...
... ... @@ -37,6 +37,10 @@ function errTip(ele, msg) {
}).removeClass('hide');
}
function hideTip() {
return $errTip.addClass('hide');
}
require('yoho-jquery-placeholder');
function refreshImgCaptcha() {
... ... @@ -147,7 +151,7 @@ function validateImgCaptchaLocal() {
}
function validateImgCaptchaAsync() {
$.ajax({
return $.ajax({
type: 'POST',
url: '/passport/images/check',
data: {
... ... @@ -172,7 +176,7 @@ function validateImgCaptcha() {
if (result) {
defer.resolve(true);
} else {
errTip($phone, '验证码不正确');
errTip($imgCaptchaInput, '验证码不正确');
defer.reject(false);
}
});
... ... @@ -200,6 +204,7 @@ $imgCaptchaInput.attr('maxlength', 4);
$('input').placeholder();
exports.init = function() {
ep.tail('phone-num', 'captcha-img', function(phoneAuth, imgAuth) {
if (phoneAuth && imgAuth) {
$nextBtn.removeClass('disable');
... ... @@ -208,6 +213,18 @@ exports.init = function() {
}
});
ep.on('phone-num', function(auth) {
if (auth) {
hideTip();
}
});
ep.on('captcha-img', function(auth) {
if (auth) {
hideTip();
}
});
$imgCaptchaInput.on('blur', function() {
validateImgCaptcha();
});
... ... @@ -234,10 +251,6 @@ exports.init = function() {
nextStep(url);
});
$phoneNumInput.on('blur', function() {
validatePhoneNum();
});
$('.change-captcha, #captcha-img').on('click', function() {
refreshImgCaptcha();
});
... ...
... ... @@ -92,3 +92,10 @@ $smsCaptchaInput.on('blur', function() {
$next.addClass('disable').attr('href', 'javascript:;');
}
});
function init() {
$smsCaptchaCtrl.addClass("disable");
disableSMSBtn();
}
init();
... ...