登录界面细微调整

pull/105/head
Apex Liu 2017-12-13 19:45:28 +08:00
parent 1a025d3434
commit eb916b0c49
2 changed files with 15 additions and 5 deletions

View File

@ -21,11 +21,12 @@ var SLOGAN = [
]; ];
// $app.on_init = function (cb_stack, cb_args) {
$app.on_init = function (cb_stack) { $app.on_init = function (cb_stack) {
$app.login_type = TP_LOGIN_AUTH_USERNAME_PASSWORD_CAPTCHA; $app.login_type = TP_LOGIN_AUTH_USERNAME_PASSWORD_CAPTCHA;
$app.dom = { $app.dom = {
slogan: $('#msg-slogan'), slogan: $('#msg-slogan'),
auth_box: $('#auth-box-container'),
btn_login_type_password: $('#login-type-password'), btn_login_type_password: $('#login-type-password'),
btn_login_type_oath: $('#login-type-oath'), btn_login_type_oath: $('#login-type-oath'),
area_captcha: $('#login-area-captcha'), area_captcha: $('#login-area-captcha'),
@ -46,7 +47,7 @@ $app.on_init = function (cb_stack) {
$app.last_img_idx = 0; $app.last_img_idx = 0;
$app.last_slogan_idx = 0; $app.last_slogan_idx = 0;
console.log($app.options); // console.log($app.options);
if ($app.options.username.length > 0) { if ($app.options.username.length > 0) {
$app.dom.input_username.val($app.options.username); $app.dom.input_username.val($app.options.username);
} }
@ -55,7 +56,7 @@ $app.on_init = function (cb_stack) {
window.onresize = $app.on_screen_resize; window.onresize = $app.on_screen_resize;
$app.init_blur_bg(); $app.init_blur_bg();
$app.init_slogan(); //$app.init_slogan();
$app.dom.btn_login_type_password.click(function () { $app.dom.btn_login_type_password.click(function () {
$app.login_type = TP_LOGIN_AUTH_USERNAME_PASSWORD_CAPTCHA; $app.login_type = TP_LOGIN_AUTH_USERNAME_PASSWORD_CAPTCHA;
@ -233,6 +234,16 @@ $app.init_blur_bg = function () {
}); });
setInterval($app._update_blur_bg, 20500); setInterval($app._update_blur_bg, 20500);
setTimeout(function(){
$app.init_slogan();
}, 2000);
setTimeout(function(){
$app.dom.auth_box.fadeIn(800, function(){
$app.dom.input_username.focus();
});
}, 300);
}; };
$app._update_blur_bg = function () { $app._update_blur_bg = function () {
@ -250,7 +261,6 @@ $app.init_slogan = function () {
$app.last_slogan_idx = Math.floor(Math.random() * SLOGAN.length); $app.last_slogan_idx = Math.floor(Math.random() * SLOGAN.length);
$app.dom.slogan.html(SLOGAN[$app.last_slogan_idx]).fadeIn(1000); $app.dom.slogan.html(SLOGAN[$app.last_slogan_idx]).fadeIn(1000);
// $app._update_slogan();
setInterval($app._update_slogan, 8100); setInterval($app._update_slogan, 8100);
}; };

View File

@ -20,7 +20,7 @@
<div id="msg-slogan" style="display: none;"></div> <div id="msg-slogan" style="display: none;"></div>
</div> </div>
<div class="col-md-6"> <div id="auth-box-container" style="display: none;" class="col-md-6">
<div id="auth-box" class="auth-box auth-box-lg"> <div id="auth-box" class="auth-box auth-box-lg">
<div class="header"> <div class="header">
<a id="login-type-password" class="title selected" href="javascript:;">账号/密码登录</a> <a id="login-type-password" class="title selected" href="javascript:;">账号/密码登录</a>