Authored by htoooth

调整样式名

{{> layout/header}}
<div class="passport-page yoho-page clearfix">
{{# passport}}
{{> passport/cover}}
<div class="content">
{{> passport/register}}
</div>
{{/ passport}}
<div class="page-tip clearfix">为了给您更好的购物体验, 建议您创建YOHO!Family账号</div>
</div>
{{> layout/footer}}
\ No newline at end of file
... ... @@ -45,14 +45,16 @@ function disableSMSBtn() {
second = 60;
$smsCaptchaCtrl.text('获取短信验证码');
$smsCaptchaCtrl.removeClass('disable');
$smsCaptchaCtrl.removeClass('second-progress');
} else {
$smsCaptchaCtrl.addClass('second-progress');
$smsCaptchaCtrl.text(second + '秒后可重新操作');
window.setTimeout(disableSMSBtn, 1000);
}
}
$smsCaptchaCtrl.click(function() {
if ($smsCaptchaCtrl.hasClass('disable')) {
if ($smsCaptchaCtrl.hasClass('disable') || $smsCaptchaCtrl.hasClass('second-progress')) {
return;
}
... ...
... ... @@ -48,8 +48,9 @@ function disableSMSBtn() {
second = 60;
$smsCaptchaCtrl.text('获取短信验证码');
$smsCaptchaCtrl.removeClass('disable');
$smsCaptchaCtrl.removeClass('progress');
$smsCaptchaCtrl.removeClass('second-progress');
} else {
$smsCaptchaCtrl.addClass('second-progress');
$smsCaptchaCtrl.text(second + '秒后可重新操作');
window.setTimeout(disableSMSBtn, 1000);
}
... ... @@ -113,7 +114,7 @@ $('#region').change(function() {
});
ep.tail('phoneNum', 'img-captcha', function(phoneAuth, imgAuth) {
if (phoneAuth && imgAuth && !$smsCaptchaCtrl.hasClass('progress')) {
if (phoneAuth && imgAuth && !$smsCaptchaCtrl.hasClass('second-progress')) {
$smsCaptchaCtrl.removeClass('disable');
} else {
$smsCaptchaCtrl.addClass('disable');
... ... @@ -210,12 +211,11 @@ $smsCaptchaInput.on('blur', function() {
});
$smsCaptchaCtrl.on('click', function() {
if ($smsCaptchaCtrl.hasClass('disable')) {
if ($smsCaptchaCtrl.hasClass('disable') || $smsCaptchaCtrl.hasClass('second-progress')) {
return;
}
$smsCaptchaCtrl.addClass('disable');
$smsCaptchaCtrl.addClass('progress');
disableSMSBtn();
sendSMSCaptcha();
... ...
... ... @@ -423,9 +423,9 @@ function disableSMSBtn() {
second = 60;
$smsCaptchaCtrl.text('获取短信验证码');
$smsCaptchaCtrl.removeClass('disable');
$smsCaptchaCtrl.removeClass('progress');
$smsCaptchaCtrl.removeClass('second-progress');
} else {
$smsCaptchaCtrl.add('progress');
$smsCaptchaCtrl.addClass('second-progress');
$smsCaptchaCtrl.text(second + '秒后可重新操作');
window.setTimeout(disableSMSBtn, 1000);
}
... ... @@ -459,7 +459,7 @@ exports.init = function() {
// 图形验证通过时,发送短信按钮可点击
ep.tail('captcha-img', 'phone-num', function(captchaAuth, phoneAuth) {
if (captchaAuth && phoneAuth && !$smsCaptchaCtrl.hasClass('progress')) {
if (captchaAuth && phoneAuth && !$smsCaptchaCtrl.hasClass('second-progress')) {
$smsCaptchaCtrl.removeClass('disable');
} else {
$smsCaptchaCtrl.addClass('disable');
... ... @@ -505,7 +505,7 @@ exports.init = function() {
// 点击发送验证码
$smsCaptchaCtrl.on('click', function() {
if ($(this).hasClass('disable')) {
if ($smsCaptchaCtrl.hasClass('disable') || $smsCaptchaCtrl.hasClass('second-progress')) {
return;
}
... ...
... ... @@ -14,44 +14,34 @@ var jQuery = require('yoho-jquery'),
var tplFn = Handlebars.compile(tpl);
var _that = this;
var $tips = null;
var methods = {
show: function() {
var topLeft = this.offset();
if (_that.isInit) {
var $parent = this.parent(),
topLeft = $parent.offset(),
$tips = this.find('.tips');
this.find('.rectangle').text(arguments[0]);
if ($tips.length !== 0) {
$tips.find('.rectangle').text(arguments[0]).removeClass('hide');
} else {
_that.isInit = true;
this.append(tplFn({content: arguments[0]}));
$tips = this.find('.tips').removeClass('hide');
$parent.append(tplFn({content: arguments[0]}));
$tips = $parent.find('.tips').removeClass('hide');
$tips.css({
top: topLeft.top + this.height() - 2,
top: $parent.height() - 2,
left: topLeft.left,
width: this.width() + 2,
height: this.height
});
}
return this;
return $tips;
},
hide: function() {
if (_that.isInit) {
this.find('.tips').addClass('hide');
_that.isInit = false;
}
var $parent = this.parent();
return this;
},
status: function() {
return _that.isInit;
return $parent.find('.tips').addClass('hide');
}
};
_that.isInit = false;
};
$.fn.tips = function(method) {
... ...