sencha touch开发好的工程在电脑上运行正常,用官方的ryby工具压缩后电脑上无法运行,提示Uncaught TypeError: Cannot read property 'JsonP' of undefined ;
在工程中的众多store中都用到jsonp的访问方式,经过压缩后无法识别JsonP,不知道是否有大神知道解决办法?
答对50分送上,其中一个store的源码如下:
Ext.define("video.store.MenuStorej",{
extend:"Ext.data.Store",
requires:["video.model.MenuModel","Ext.data.Request",
"Ext.data.proxy.JsonP","Ext.data.JsonP"],
config:{
model:"video.model.MenuModel",
proxy: {
type: 'jsonp',
url: 'https://openapi.youku.com/v2/schemas/video/category.json',
reader: {
type: "json",
rootProperty: "categories"
}
},
listeners:{
beforeload:function( store, operation, eOpts ){
},
load:function( store, records, successful, operation, eOpts ){
}
}
}
});