| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- Ext.define('saas.view.auth.LoginController', {
- extend: 'Ext.app.ViewController',
- alias: 'controller.login',
- init: function() {
- this.callParent(arguments);
- },
- onLoginButton: function() {
- // var me = this,
- // form = me.lookup('authdialog'),
- // values = form.getValues();
- // me.getView().setMasked(true);
- // saas.model.Session.login(values.username, values.password)
- // .then(function(session) {
- // me.fireEvent('login', session);
- // })
- // .catch(function(error) {
- // Ext.toast(error);
- // })
- // .then(function(session) {
- // me.getView().setMasked(false);
- // });
- this.fireEvent('login', new saas.model.Session({
- token: 'XXXXXX',
- expires: 180000,
- timestamp: new Date().getTime(),
- account: new saas.model.Account({
- username: 'XXXXXX',
- realname: '张三',
- email: 'zhangs@gmail.com',
- mobile: '15812345678'
- })
- }));
- },
- onWeixinLogin : function() {
- },
- onNewAccount: function() {
- }
- });
|