hellolck123 2014-12-15 14:52 采纳率: 100%
浏览 2296
已采纳

sencha touch打包压缩后,访问报jsonp undefined

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 ){
}
}
}
});

  • 写回答

3条回答 默认 最新

查看更多回答(2条)

报告相同问题?