0

我正在尝试在我的 Sencha 应用程序中从我的 WordPress 博客中获取一些帖子。

但我不断收到此错误“未定义控制台”。

Hare 是我用于不同文件的代码。

应用程序.js

Ext.Loader.setPath({
'Ext': 'touch/src',
'ov_app': 'app'
});


Ext.application({
name: 'ov_app',

requires: [
    'Ext.MessageBox'
],
profiles: ['Phone', 'Tablet', 'Desktop'],
views: ['Main', 'Eligibelity', 'HeaderBar', 'ListNavigation', 'FooterBar', 'home_button', 'main_navigation', 'Corporateclints', 'Question_form', 'Quick_Enquiry', 'sinlgepost'],
stores: ['NavigationItems', 'GetContent'],
models: ['Items', 'PostContent', 'MainNavigation' ],

controllers: ['MainController'],

launch: function() {
    // Destroy the #appLoadingIndicator element
    Ext.fly('appLoadingIndicator').destroy();

    // Initialize the main view
    ov_app.container = Ext.Viewport.add(Ext.create('ov_app.view.Main'));
},
});

获取内容.js

Ext.define('ov_app.model.PostContent', {
extend:'Ext.data.Model',
config:{
    fields: [
        {name: 'content'}
        ]
    }
});

获取内容.js

Ext.define('ov_app.store.GetContent', {
extend: 'Ext.data.Store',
config:{
    model: 'ov_app.model.PostContent',
    autoLoad :true,
    proxy:{
        type:'jsonp',
        url:'http://www.one-visa.com/api/get_post/?id=2798',
        reader:{
            type:'json',
            rootProperty:'post'
        },
    }
}
});

sinlgepost.js

Ext.define('ov_app.view.sinlgepost', {
xtype:'sinlgepost',
extend:'Ext.Container',
config:{
    xtype: 'data',
    store: 'getcontent',
    itemTpl: '<p>{content}</p>'
}
});

我真的不知道我做错了什么。

4

1 回答 1

0

错误“consle is not defined”已经清楚地指出了你犯的错误:如果你想访问console对象,它的名字console不是consle.

于 2013-07-10T14:06:17.980 回答