{"inframe":true,"title":"移动登录","hidden":false,"roles":{"default":1},"children":[{"configs":{"title":"{#Str.login#}","loginRequired":"false","itemId":"sys.dialog.loginWin"},"events":{"initialize":"Wb.apply(app, {\n  changeVC: function() {\n    app.verifyImage.setSrc('m?xwl=sys/session/get-verify-image&' + Wb.getId());\n  },\n  loginSuccess: function(resp) {\n    if (app.saveToggle.getValue())\n      Wb.setCookie('sys.username', app.username.getValue());\n    window.location = app.referUrl || resp.responseText;\n  },\n  login: function() {\n    if (!Wb.verify(app.win))\n      return;\n    Wb.request({\n      url: 'm?xwl=sys/session/verify',\n      out: app.win,\n      message: Str.processLogin,\n      showError: false,\n      success: app.loginSuccess,\n      failure: function(resp) {\n        if (app.verifyEnabled)\n          app.changeVC();\n        Wb.except(resp, function() {\n          var s = resp.responseText;\n          switch (s) {\n            case Str.vcInvalid:\n            case Str.vcExpired:\n              if (!app.verifyCode.hidden)\n                app.verifyCode.focus(true, true);\n              break;\n            case Str.passwordInvalid:\n              app.password.focus(true, true);\n              break;\n            default:\n              app.username.focus(true, true);\n              break;\n          }\n        });\n      }\n    });\n  }\n});"},"children":[{"configs":{"fullscreen":"true","scrollable":"true","itemId":"win"},"events":{"painted":"if (!app.notSetData) {\n  var username = Wb.getCookie('sys.username');\n  app.saveToggle.setValue(username ? 1 : 0);\n  if (Wb.isEmpty(username)) {\n    //单独timeout防止focus任务被cancel\n    setTimeout(function() {\n      app.username.focus();\n    }, 50);\n  } else {\n    app.username.setValue(username);\n    setTimeout(function() {\n      app.password.focus();\n    }, 50);\n  }\n}","action":"app.login();","initialize":"app.verifyEnabled = '{#Var.sys.session.verifyImage.enabled#}' === 'true';\nif (app.verifyEnabled)\n  app.verifyImage.setSrc('m?xwl=sys/session/get-verify-image');\nelse\n  app.verifyContainer.hide();"},"children":[{"configs":{"title":"{#Var.sys.app.title#}","docked":"top","titleAlign":"left","itemId":"titlebar1"},"children":[{"configs":{"ui":"action","text":"@Str.login","align":"right","glyph":"f007","itemId":"loginBtn","handler":"app.login"},"children":[],"expanded":false,"type":"tbutton"}],"expanded":true,"type":"ttitlebar"},{"configs":{"instructions":"@Str.enterLogin","itemId":"tfieldset1"},"children":[{"configs":{"layout":"hbox","itemId":"container1"},"children":[{"configs":{"style":"color:#c8c8c8;","width":"30","html":"<span class='wb_glyph' style='position:relative;top:11px;left:10px;'>&#xf007;<\/span>","itemId":"icon"},"children":[],"expanded":false,"type":"tcomp"},{"configs":{"placeHolder":"@Str.username","required":"true","itemId":"username","flex":"1"},"children":[],"expanded":false,"type":"ttext"}],"expanded":true,"type":"tcontainer"},{"configs":{"style":"border-bottom:1px solid #c8c8c8;border-top:1px solid #c8c8c8;","layout":"hbox","itemId":"container2"},"children":[{"configs":{"style":"color:#c8c8c8;","width":"30","html":"<span class='wb_glyph' style='position:relative;top:13px;left:10px;'>&#xf023;<\/span>","itemId":"icon"},"children":[],"expanded":false,"type":"tcomp"},{"configs":{"placeHolder":"@Str.password","xtype":"passwordfield","required":"true","itemId":"password","flex":"1"},"children":[],"expanded":false,"type":"ttext"}],"expanded":true,"type":"tcontainer"},{"configs":{"style":"border-bottom:1px solid #c8c8c8;","layout":"hbox","itemId":"verifyContainer"},"children":[{"configs":{"style":"color:#c8c8c8;","width":"30","html":"<span class='wb_glyph' style='position:relative;top:13px;left:10px;'>&#xf046;<\/span>","itemId":"icon"},"children":[],"expanded":false,"type":"tcomp"},{"configs":{"placeHolder":"@Str.verifyCode","border":"0","required":"true","itemId":"verifyCode","flex":"1"},"children":[],"expanded":false,"type":"ttext"},{"configs":{"height":"20","width":"90","margin":"15 5 0 2","itemId":"verifyImage"},"events":{"tap":"app.changeVC();\napp.verifyCode.focus(true, true);"},"children":[],"expanded":false,"type":"timage"}],"expanded":true,"type":"tcontainer"},{"configs":{"labelWidth":"160","label":"@Str.saveUserName","itemId":"saveToggle"},"events":{"change":"if (!newValue)\n  Ext.util.Cookies.clear('sys.username');"},"children":[],"expanded":false,"type":"ttoggle"}],"expanded":true,"type":"tfieldset"}],"expanded":true,"type":"tcontainer"}],"expanded":true,"type":"module"}],"pageLink":"","iconCls":""}