...
|
...
|
@@ -25,46 +25,6 @@ var phoneRegx = { |
|
|
'+61': /^[0-9]{11}$/
|
|
|
};
|
|
|
|
|
|
//错误验证
|
|
|
var $errTip,
|
|
|
tipTime;
|
|
|
|
|
|
/**
|
|
|
* 初始化错误提示
|
|
|
*/
|
|
|
function initErrTip() {
|
|
|
var errTipHtml = '<div id="err-tip" class="err-tip"></div>';
|
|
|
|
|
|
//插入错误提示HTML
|
|
|
$('.passport-page').append(errTipHtml);
|
|
|
|
|
|
$errTip = $('#err-tip');
|
|
|
$errTip.on('touchstart', function() {
|
|
|
$errTip.fadeOut();
|
|
|
|
|
|
//清除Timeout
|
|
|
clearTimeout(tipTime);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 显示错误提示
|
|
|
*/
|
|
|
function showErrTip(content) {
|
|
|
if (typeof $errTip === 'undefined') {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
$errTip.text(content).show();
|
|
|
|
|
|
//若2秒内未点击则自动消失
|
|
|
tipTime = setTimeout(function() {
|
|
|
if ($errTip.css('display') === 'block') {
|
|
|
$errTip.fadeOut();
|
|
|
}
|
|
|
}, 2000);
|
|
|
}
|
|
|
|
|
|
//密码显示隐藏
|
|
|
function bindEyesEvt() {
|
|
|
var $hasEye = $('.has-eye'),
|
...
|
...
|
@@ -161,8 +121,6 @@ function selectCssHack($countrySelect) { |
|
|
module.exports = {
|
|
|
emailRegx: emailRegx,
|
|
|
phoneRegx: phoneRegx,
|
|
|
initErrTip: initErrTip,
|
|
|
showErrTip: showErrTip,
|
|
|
bindEyesEvt: bindEyesEvt,
|
|
|
bindClearEvt: bindClearEvt,
|
|
|
pwdValidate: pwdValidate,
|
...
|
...
|
|