Login.js 4.4 KB

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