Javascript 如何将函数参数之一传递给extjs4中的存储类?

Javascript 如何将函数参数之一传递给extjs4中的存储类?,javascript,jquery,html,css,extjs4,Javascript,Jquery,Html,Css,Extjs4,在其中一个窗口中,我将搜索类型作为参数传递。之后,我在mcmFindCityPair中获取搜索类型,并与mcmFocusMarketStore存储一起传递。我需要传递名为的商店中的搜索类型。mcmFocusMarketStore。我通过了store,但它说searchType没有定义。有人能帮我重新组织代码吗。 代码段包括: window.js 这是代码 App.mcmFindCityPair(this.mcmSearchType, this.mcmOriginTextbox.getValue(

在其中一个窗口中,我将搜索类型作为参数传递。之后,我在mcmFindCityPair中获取搜索类型,并与mcmFocusMarketStore存储一起传递。我需要传递名为的商店中的搜索类型。mcmFocusMarketStore。我通过了store,但它说searchType没有定义。有人能帮我重新组织代码吗。 代码段包括:

window.js 这是代码

App.mcmFindCityPair(this.mcmSearchType, this.mcmOriginTextbox.getValue(),
                    this.mcmDestinationTextbox.getValue(),this.mcmStartDateTimeField.getValue(), 
                    this.mcmEndDateTimeField.getValue());
app.js 这是密码

mcmFindCityPair : function(searchType, org, dest, start, end) {
        App.mcmFocusMarketStore.removeAll(true);
        var startDate = start ? Ext.Date.format(start, 'd-M-y H:i') : '';
        var endDate = end ? Ext.Date.format(end, 'd-M-y H:i') : '';
        console.log(searchType);
        App.mcmFocusMarketStore.proxy.url = getProxyUrl()
                + "&action=getFMFlights&searchType="+searchType
                + ("&origin=" + org)
                + ("&destination=" + dest)
                + (startDate ? ("&startDate=" + startDate) : '')
                + (endDate ? ("&endDate=" + endDate) : '');
        console.log(App.mcmFocusMarketStore.proxy.url);
        App.mcmFocusMarketStore.load();
        App.mcmAllFocusMarketStore.removeAll(true);
        App.mcmAllFocusMarketStore.proxy.url = getProxyUrl()
                + "&action=getFMFlights&searchType="+searchType;
        App.mcmAllFocusMarketStore.load();
    }



App.mcmFocusMarketStore = Ext.create(
                    'Ext.data.Store',
                    {
                        model : 'FocusMarketModel',
                        proxy : {
                            timeout : AJAX_TIMEOUT,
                            type : 'jsonp',
                            url : getProxyUrl()
                                    + "&action=getFMFlights&searchType="+ searchType,
                            reader : {
                                type : 'focusmarketReader',
                                root : 'success',
                                totalProperty : 'total'
                            },
                            listeners : {
                                exception : function(proxy, exception,
                                        operation) {
                                    alert('Failed to get any kind of response from server! The application will be restarted. ');

                                }
                            }
                        }
                    });

有人能帮我重新组织代码吗。提前谢谢

只要
这个.mcmSearchType
是fine@ArunPJohny不,此.mcmSearchType位于不同的js文件中。我只是把它传递给另一个函数main.js。我将它作为查询字符串加载到存储中。Arun P Johny No this.mcmSearchType位于不同的js文件中。我只是把它传递给另一个函数main.js。在这种情况下,我将其作为查询字符串加载到存储中。