|
请教树根老师,senchatouch的页面跳转为什么这么慢?需要至少2-3秒。感觉满慢的。怎么才能调整到1-2S就登录呢?
应用中有2个panel第一个是login_panel,.js第二个是index_panel.js 两个都是静态页面,无动态获取数据。
我测试是在login_panel中点击登录。直接跳到index_panel
login_panel中的代码:
Ext.define('test2.view.login_panel', {
extend: 'Ext.Panel',
requires: [
'Ext.field.Select',
'Ext.field.Password',
'Ext.TitleBar',
'Ext.Button',
'Ext.field.Checkbox'
],
config: {
style: 'background: url(images/background.png) no-repeat;background-size:100% 100%;',
items: [
{
xtype: 'selectfield',
label: '登录方式',
options: [
{
text: '用户名登录',
value: 'Select'
},
{
text: '手机登录',
value: 'today'
},
]
},
{
xtype: 'textfield',
label: '集团号',
required: true,
placeHolder: '请输入您企业的集团编号'
},
{
xtype: 'textfield',
label: '用户名',
required: true,
placeHolder: '请输入您的用户名'
},
{
xtype: 'passwordfield',
label: '密码',
required: true,
placeHolder: '请输入您的密码'
},
{
xtype: 'titlebar',
docked: 'top',
title: '用户登录',
items: [
{
xtype: 'button',
align: 'right',
itemId: 'mybutton8',
iconCls: 'user',
text: ''
},
{
xtype: 'button',
ui: 'back',
text: '退出'
}
]
},
{
xtype: 'button',
centered: false,
itemId: 'mybutton',
style: 'width:120px;margin-left:120px;margin-top:100px',
top: '185px',
ui: 'confirm',
text: '登录'
},
{
xtype: 'checkboxfield',
centered: false,
label: '记住密码'
}
],
listeners: [
{
fn: 'onMybutton8Tap',
event: 'tap',
delegate: '#mybutton8'
},
{
fn: 'onMybuttonTap',
event: 'tap',
delegate: '#mybutton'
}
]
},
onMybutton8Tap: function(button, e, eOpts) {
var userMain = Ext.create('test2.view.lixian_txl_panel');
Ext.Viewport.setActiveItem(userMain);
},
index_panel.js的代码
Ext.define('test2.view.index_panel', {
extend: 'Ext.tab.Panel',
requires: [
'Ext.TitleBar',
'Ext.Button',
'Ext.dataview.List',
'Ext.XTemplate',
'Ext.tab.Bar'
],
config: {
height: '100%',
items: [
{
xtype: 'titlebar',
docked: 'top',
title: '企业信息管理平台',
items: [
{
xtype: 'button',
itemId: 'mybutton3',
ui: 'back',
text: '返回'
},
{
xtype: 'button',
align: 'right',
text: '操作'
}
]
},
{
xtype: 'container',
title: '个人门户',
iconCls: 'home',
layout: 'fit',
items: [
{
xtype: 'list',
data: [
{
title: '公司新闻'
},
{
title: '最新公告'
},
{
title: '待办事宜'
},
],
itemId: 'mylist',
itemTpl: [
'<div>{title}</div>'
]
}
]
},
{
xtype: 'container',
title: '工作流程',
badgeText: '有新任务',
iconCls: 'compose',
layout: 'fit',
items: [
{
xtype: 'list',
data: [
{
title: '待办事宜'
},
{
title: '已办事宜'
},
{
title: '办结事宜'
},
],
itemId: 'mylist2',
itemTpl: [
'<div>{title}</div>'
]
}
]
},
{
xtype: 'container',
title: '通讯录',
iconCls: 'user',
layout: 'fit',
items: [
{
xtype: 'list',
data: [
{
title: '公共通讯录'
},
{
title: '通讯录同步'
},
],
itemId: 'mylist3',
itemTpl: [
'<div>{title}</div>'
]
}
]
},
{
xtype: 'container',
title: '内部邮箱',
badgeText: '有新邮件',
iconCls: 'star',
layout: 'fit',
items: [
{
xtype: 'list',
data: [
{
title: '写邮件',
weidu_num: ''
},
{
title: '收件箱',
weidu_num: '( 7 )'
},
{
title: '草稿箱',
weidu_num: ''
},
{
title: '已发送邮件',
weidu_num: ''
},
{
title: '邮件查询',
weidu_num: ''
},
],
itemId: 'mylist1',
itemTpl: [
'<div><div style="float:left">{title}</div> <div style="color:red;float:right">{weidu_num}</div></div>'
]
}
]
},
{
xtype: 'container',
title: '更多',
iconCls: 'more',
layout: 'fit',
items: [
{
xtype: 'list',
data: [
{
title: '一键签到'
},
{
title: '二维码扫描'
},
{
title: '工作量评估表'
},
{
title: '清理'
},
{
title: '检查新版本'
},
{
title: '关于'
},
{
title: '退出?'
},
],
itemId: 'mylist4',
itemTpl: [
'<div>{title}</div>'
]
}
]
}
],
tabBar: {
docked: 'bottom',
ui: 'light',
layout: {
type: 'hbox',
align: 'stretchmax',
pack: 'justify'
}
},
},
|
|