Login.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /**
  2. * 登录页面
  3. */
  4. Ext.define('saas.view.auth.Login', {
  5. extend: 'Ext.container.Container',
  6. xtype: 'login',
  7. controller: 'login',
  8. cls: 'auth-login',
  9. layout: {
  10. type: 'vbox',
  11. align: 'center',
  12. pack: 'center'
  13. },
  14. defaultFocus: 'authdialog',
  15. items: [
  16. {
  17. xtype: 'authdialog',
  18. reference: 'authdialog',
  19. defaultButton : 'loginButton',
  20. autoComplete: true,
  21. bodyPadding: '20 20',
  22. cls: 'auth-dialog-login',
  23. header: false,
  24. width: 415,
  25. layout: {
  26. type: 'vbox',
  27. align: 'stretch'
  28. },
  29. defaults : {
  30. margin : '5 0'
  31. },
  32. items: [
  33. {
  34. html: '账 户 登 录'
  35. },
  36. {
  37. xtype: 'textfield',
  38. cls: 'auth-textbox',
  39. name: 'username',
  40. bind: '{username}',
  41. height: 55,
  42. hideLabel: true,
  43. allowBlank : false,
  44. emptyText: '账号/邮箱/手机号',
  45. triggers: {
  46. glyphed: {
  47. cls: 'trigger-glyph-noop auth-email-trigger'
  48. }
  49. }
  50. },
  51. {
  52. xtype: 'textfield',
  53. cls: 'auth-textbox',
  54. height: 55,
  55. hideLabel: true,
  56. emptyText: '密码',
  57. inputType: 'password',
  58. name: 'password',
  59. bind: '{password}',
  60. allowBlank : false,
  61. triggers: {
  62. glyphed: {
  63. cls: 'trigger-glyph-noop auth-password-trigger'
  64. }
  65. }
  66. },
  67. {
  68. xtype: 'container',
  69. layout: 'hbox',
  70. items: [
  71. {
  72. xtype: 'checkboxfield',
  73. flex : 1,
  74. cls: 'form-panel-font-color rememberMeCheckbox',
  75. height: 30,
  76. bind: '{persist}',
  77. boxLabel: '记住账户'
  78. },
  79. {
  80. xtype: 'box',
  81. html: '<a href="#passwordreset" class="link-forgot-password"> 忘记密码 ?</a>'
  82. }
  83. ]
  84. },
  85. {
  86. xtype: 'button',
  87. reference: 'loginButton',
  88. scale: 'large',
  89. ui: 'soft-green',
  90. iconAlign: 'right',
  91. iconCls: 'x-fa fa-angle-right',
  92. text: '登录',
  93. formBind: true,
  94. listeners: {
  95. click: 'onLoginButton'
  96. }
  97. },
  98. {
  99. xtype: 'box',
  100. html: '<div class="outer-div"><div class="seperator">或</div></div>',
  101. margin: '10 0'
  102. },
  103. {
  104. xtype: 'button',
  105. scale: 'large',
  106. ui: 'weixin',
  107. iconAlign: 'right',
  108. iconCls: 'x-fa fa-weixin',
  109. text: '微信登录',
  110. listeners: {
  111. click: 'onWeixinLogin'
  112. }
  113. },
  114. {
  115. xtype: 'box',
  116. html: '<div class="outer-div"><div class="seperator">或</div></div>',
  117. margin: '10 0'
  118. },
  119. {
  120. xtype: 'button',
  121. scale: 'large',
  122. ui: 'gray',
  123. iconAlign: 'right',
  124. iconCls: 'x-fa fa-user-plus',
  125. text: '创建账户',
  126. listeners: {
  127. click: 'onNewAccount'
  128. }
  129. }
  130. ]
  131. }
  132. ]
  133. });