gpt4 book ai didi

list - 使用 JsonP 代理的 Sencha Touch 2 离线缓存

转载 作者:行者123 更新时间:2023-12-02 05:06:39 25 4
gpt4 key购买 nike

假设我已经学习了 Sencha Touch 2 入门教程,并且有一个由 JsonP 代理数据填充的列表 - 如果用户离线,我该如何着手显示缓存数据?目前,如果没有互联网连接,则不会显示该列表。

在视频教程中,Ed 简要提到这可以“轻松完成”,但没有提供我可以在 Sencha 文档中找到它的引用。

下面是我的商店对象的一个​​例子:

Ext.define('test.store.NewsListStore', {
extend : 'Ext.data.Store',
requires: ['test.model.NewsListModel', 'Ext.data.Request'],
config : {
model : 'test.model.NewsListModel',
storeId : 'news-list-store',
autoLoad: true,
proxy: {
type: 'jsonp',
url : 'http://example.com/jsonp',
config : {
noCache: false
}
},
grouper : {
groupFn : function(record) {
var unix_timestamp = parseInt(record.get("entry_date"));
var date = new Date( unix_timestamp*1000 );
return Ext.Date.format(date, 'F');
}
},
}
});

最佳答案

看看这个教程关于采取 Sencha Touch app offline - 它不是 Sencha Touch 2,但它可能会为您指明正确的方向

关于list - 使用 JsonP 代理的 Sencha Touch 2 离线缓存,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10613735/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com