Authored by xuqi

init with eyes close

... ... @@ -25,12 +25,19 @@ var phoneRegx = {
'+61': /^[0-9]{11}$/
};
//密码显示隐藏
function bindEyesEvt() {
/**
* 密码显示隐藏
* @params opt 初始化参数
*/
function bindEyesEvt(opt) {
var $hasEye = $('.has-eye'),
$eye;
$hasEye.append('<div class="eye close"></div>');
if (opt && opt.status === 'open') {
$hasEye.append('<div class="eye"></div>');
} else {
$hasEye.append('<div class="eye close"></div>');
}
$eye = $hasEye.children('.eye');
$eye.on('tap', function(e) {
... ...
... ... @@ -14,7 +14,9 @@ var tip = require('../../plugin/tip');
var trim = $.trim;
var showErrTip = tip.show;
api.bindEyesEvt();
api.bindEyesEvt({
status: 'open' //默认眼睛打开
});
$pwd.bind('input', function() {
if (trim($pwd.val()) === '') {
... ...