在ExtJS 4中从静态类或继承动态设置url

在ExtJS 4中从静态类或继承动态设置url,url,dynamic,extjs4,store,Url,Dynamic,Extjs4,Store,我有以下课程: Ext.define('Modeller.store.Datasources', { extend: 'Modeller.store.Base', requires: ['Modeller.Defaults'], autoLoad: true, proxy: { type: 'rest', url: 'api/v1.0/datasources', reader: { type: 'json', root: '

我有以下课程:

Ext.define('Modeller.store.Datasources', {
  extend: 'Modeller.store.Base',
  requires: ['Modeller.Defaults'],
  autoLoad: true,
  proxy: {
    type: 'rest',
    url: 'api/v1.0/datasources',
    reader: {
        type: 'json',
        root: 'data'
    }
  }
});
问题在于路径
api/v1.0/datasources
可能会有很大不同。这取决于服务器软件的设置方式。它可以是
/api/…
,也可以是
/anotherapi/api
,这取决于它是安装在虚拟文件夹下还是直接安装在根目录下

服务器软件api与客户端是分开的

我只需要设置一次,而不是每次存储加载。配置应包含例如
/
其他API/
,并影响所有代理URL

有没有办法使用ext类来实现这一点