I'm trying to get some j son data from a local server using Senchatouch-2 app:
我收到以下消息:
load http://localhost:8084/Sencha/senchatest. Origin http://localhost:8084 is not allowed by Access-Control-Allow-Origin.
Even If I launch my sencha app as an, I get this:
XMLHttpRequest cannot load http://localhost:8084/Sencha/senchatest.Origin null is not allowed by Access-Control-Allow-Origin
The web service returns data. I try to catch the data items like this:
// 动态列表视图
proxy:{
type: 'ajax',
method:'GET',
model:'List.model.Mainmodel',
url: 'http://localhost:8084/Sencha/senchatest',
reader: {
type: 'json',
rootProperty: 'data.firstName.lastName'
}}
And I'm trying to get this structure:
{"data":[{"firstName": "dhina", "lastName": "karan"},{"firstName": "dhina", "lastName": "karan"},{"firstName": "dhina", "lastName": "karan"},{"firstName": "dhina", "lastName": "karan"},{"firstName": "dhina", "lastName": "karan"},{"firstName": "dhina", "lastName": "karan"}]}
你知道我为什么会收到这个错误吗?
谢谢,
问候