我正在为项目使用dojo。在那里,我有一个服务器的ajax请求。我提供的URL是有效的,我从URL获取数据。此外,我已经在浏览器中检查了请求是否已发送,以及它如何响应。但回调根本没有执行......这是代码:
require([
"dojox/grid/EnhancedGrid",
"dojo/store/Memory",
"dojo/store/JsonRest",
"dojo/store/Cache",
"dojo/data/ObjectStore",
"dojo/request",
// a few other things i require
"dojo/domReady!"
], function(EnhancedGrid, Memory, JsonRest, Cache, ObjectStore, request, query, on, dom, parser, registry, cookie, json, array, button, attr, lang) {
request.get("<?= base_url(); ?>c_fremdkosten/get_list",
{
handleAs: "json"
}
).then(function(data){
console.log(data); //is NOT executed...
});
});
有人有想法吗?