【发布时间】:2015-01-14 06:45:15
【问题描述】:
我的 extjs 5 应用程序有一些问题。我正在使用 Sencha Architect 并在 FreeBSD 上运行该应用程序。
我得到的错误是 Uncaught TypeError: undefined is not a function for 'Ext.application'
这是我的代码
// @require @packageOverrides
Ext.Loader.setConfig({
});
Ext.application({
models: [
'BassSearch',
'BassSearchResult',
'Menu',
'Customer',
'Subscription',
'NetInfo',
'Products',
'AddressSearch',
'AddressAll',
'Interface',
'Phone'
],
stores: [
'SearchStore',
'CustomerStore',
'NetinfoStore',
'InterfaceStore',
'PhoneStore',
'BassMenuStore',
'JsonSubscriptions'
],
views: [
'fSearch',
'searchResult',
'SearchPanel',
'ApplicationPanel',
'MenuPanel',
'MainBass',
'CustomerInfoView'
],
controllers: [
'searchController',
'MenuSubController',
'CustomerInfoController'
],
name: 'MyApp',
launch: function() {
Ext.create('MyApp.view.MainBass');
//load
var myCookieVal = document.cookie.indexOf('basssessionid');
if (myCookieVal) {
window.location.href="index.html";
} else {
var xhReq = new XMLHttpRequest();
var request = 'api/checkSession';
xhReq.open("GET", request, false);
xhReq.send(null);
var json = JSON.parse(xhReq.responseText);
if (!json.success) {
window.location.href="index.html";
}
}
Ext.define('BASSSharedData', {cid: 0});
MyApp.globals = {
currentcid: 0,
userid: 0,
callback: "",
subscriptionid: 0,
currentView: null
};
}
});
任何帮助appriciated。
谢谢
【问题讨论】:
标签: javascript extjs