Sencha touch 2 正在存储区中加载Json以将其显示在列表Sencha Touch 2 jsonp上

Sencha touch 2 正在存储区中加载Json以将其显示在列表Sencha Touch 2 jsonp上,sencha-touch-2,jsonp,store,Sencha Touch 2,Jsonp,Store,这是我的模型 Ext.define("StockWatch.model.Market", { extend: "Ext.data.Model", config: { idProperty: 'CompanyCode', fields: [ { name: 'CompanyCode', type: 'string' }, { name: 'LastTradedPrice', type: 'string' }, { name: 'Per

这是我的模型

Ext.define("StockWatch.model.Market", {
extend: "Ext.data.Model",
config: {
    idProperty: 'CompanyCode',
    fields: [
        { name: 'CompanyCode', type: 'string' },
        { name: 'LastTradedPrice', type: 'string' },
        { name: 'PercentageDiff', type: 'string' },
        { name: 'FiftyTwoWeekHigh', type: 'string' },
        { name: 'FiftyTwoWeekLow', type: 'string' },
        { name: 'ChangePercent', type: 'string' },
        { name: 'Change', type: 'string' },
        { name: 'MarketCap', type: 'string' },
        { name: 'High', type: 'string' },
        { name: 'Low', type: 'string' },
        { name: 'PrevClose', type: 'string' },
        { name: 'OpenInterest', type: 'string' },
        { name: 'MarketLot', type: 'string' },
        { name: 'ChangeInOpenInterest', type: 'string' },
        { name: 'LastTradedTime', type: 'date', dateFormat: 'c' },
    ]
}
});
这是我的商店

Ext.define("StockWatch.store.Markets", {
    extend: "Ext.data.Store",
    requires: ["Ext.data.proxy.LocalStorage", "Ext.data.proxy.JsonP", "StockWatch.model.Market"],
    config: {
        model: "StockWatch.model.Market",
        autoLoad : true,
        proxy : {
            type : 'jsonp',
            url : 'http://money.rediff.com/money1/current_status_new.php?companylist=17023928%7C17023929&id=1354690151&Rand=0.6305125835351646',
            reader:{
                    type:'json',
                    rootProperty:''
                }
        }
    }
});
我无法将数据添加到我的列表中,可能是在某个地方获取数据出错。 引导我找到解决方案。 另外,我正在使用pull-to-refresh列表插件,那么每次我下拉列表时,数据是否会自动加载,或者我是否需要在那里写点什么

提前通知

编辑: 我在控制台中也收到了这个警告

Resource interpreted as Script but transferred with MIME type text/html: "http://money.rediff.com/money1/current_status_new.php?companylist=17023928%7C17023929&id=1354690151&Rand=0.6305125835351646&_dc=1355822361093&page=1&start=0&limit=25&callback=Ext.data.JsonP.callback1". 

您需要将JSON响应封装在JSONP的回调函数中。看起来您的远程调用并没有返回此消息,请尝试指定一个回调参数-否则,如果远程服务器不允许,您需要通过另一台服务器将其传递到回调函数中

还有,你在帖子底部提到的警告,别担心。它不会引起任何问题。

使用

callbackKey:指定将发送到服务器的GET参数,该参数包含请求完成时要执行的函数名。默认为回调。因此,一个公共请求的形式是url?callback=Ext.data.JsonP.callback1

默认为:“回调”