store
Ext.define('Sencha.store.ArticleShowST', { extend: 'Ext.data.Store', //继承 config: { fields: ['title', 'content'], autoLoad: true, proxy: { type: 'ajax', url: 'http://192.168.1.199/duduke/json/1.php?type=article', extraParams: { param: 'xxx' } } } });
controller
Ext.define('Sencha.controller.Main', { extend: 'Ext.app.Controller', config: { refs: { indexCard: 'index_card_xx', Index:'index_xx', indexList:'index_list_xx', indexListShow:'index_list_show_xx', indexCarousel:'index_carousel_xx' }, control: { indexList: { itemtap: 'onContactSelect', }, '#carousel_1':{ tap:function(){ alert('11111'); } }, } }, onContactSelect: function(list, index, node, record) { if (!this.indexListShow) { this.indexListShow = Ext.create('Sencha.view.IndexListShow'); } console.log(list.getStore().getAt(index).get('title'));//获取对应行title //操作store var articleShowST = Ext.getStore('ArticleShowST'); articleShowST.getProxy().setExtraParam('param', 'wwwwwww'); articleShowST.load(); //\ this.getIndexCard().push(this.indexListShow); } });