Login.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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. xtype: 'label',
  35. text: '账户登录'
  36. },
  37. {
  38. xtype: 'textfield',
  39. cls: 'auth-textbox',
  40. name: 'username',
  41. bind: '{username}',
  42. height: 55,
  43. hideLabel: true,
  44. allowBlank : false,
  45. emptyText: '账号/邮箱/手机号',
  46. triggers: {
  47. glyphed: {
  48. cls: 'trigger-glyph-noop auth-email-trigger'
  49. }
  50. }
  51. },
  52. {
  53. xtype: 'textfield',
  54. cls: 'auth-textbox',
  55. height: 55,
  56. hideLabel: true,
  57. emptyText: '密码',
  58. inputType: 'password',
  59. name: 'password',
  60. bind: '{password}',
  61. allowBlank : false,
  62. triggers: {
  63. glyphed: {
  64. cls: 'trigger-glyph-noop auth-password-trigger'
  65. }
  66. }
  67. },
  68. {
  69. xtype: 'container',
  70. layout: 'hbox',
  71. items: [
  72. {
  73. xtype: 'checkboxfield',
  74. flex : 1,
  75. cls: 'form-panel-font-color rememberMeCheckbox',
  76. height: 30,
  77. bind: '{persist}',
  78. boxLabel: '记住账户'
  79. },
  80. {
  81. xtype: 'box',
  82. html: '<a href="#passwordreset" class="link-forgot-password"> 忘记密码 ?</a>'
  83. }
  84. ]
  85. },
  86. {
  87. xtype: 'button',
  88. reference: 'loginButton',
  89. scale: 'large',
  90. ui: 'soft-green',
  91. iconAlign: 'right',
  92. iconCls: 'x-fa fa-angle-right',
  93. text: '登录',
  94. formBind: true,
  95. listeners: {
  96. click: 'onLoginButton'
  97. }
  98. },
  99. {
  100. xtype: 'box',
  101. html: '<div class="outer-div"><div class="seperator">或</div></div>',
  102. margin: '10 0'
  103. },
  104. {
  105. xtype: 'button',
  106. scale: 'large',
  107. ui: 'weixin',
  108. iconAlign: 'right',
  109. iconCls: 'x-fa fa-weixin',
  110. text: '微信登录',
  111. listeners: {
  112. click: 'onWeixinLogin'
  113. }
  114. },
  115. {
  116. xtype: 'box',
  117. html: '<div class="outer-div"><div class="seperator">或</div></div>',
  118. margin: '10 0'
  119. },
  120. {
  121. xtype: 'button',
  122. scale: 'large',
  123. ui: 'gray',
  124. iconAlign: 'right',
  125. iconCls: 'x-fa fa-user-plus',
  126. text: '创建账户',
  127. listeners: {
  128. click: 'onNewAccount'
  129. }
  130. }
  131. ]
  132. }
  133. ]
  134. });