2015-10-06 33 views
-1

使得API调用framework7我试图让使用framework7 Dom7 它的做工非常精细,当我在浏览器中测试我的混合应用程序的API调用,但是当我build online on phonegap对Android的APK我的手机上。把所有的JS工作在手机上,但只有ajax调用没有被解雇。AJAX不是内部版本

$$('form.ajax-submit').on('submitted', function (e) { 
    e.preventDefault(); 
myApp.showPreloader(); 
    var searchKey=$$("#search-key").val(); 
       $$("#track").text('API calling'); 
    $$.get("http://my/api/path/dev/apiv-1-0-2/students/"+searchKey,function(response){ 
      $$("#track").text('got the response'); 
}); 
}); 

我越来越直到API calling但不是GOT THE RESPONSE消息。

回答

0

你正在页面中添加jQuery或jQueryMobile库头文件..?

+0

没什么,真的需要吗? framework7不够单独? – amoeba

+0

是的,我包括http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.js cdn文件上面我的framework7.js甚至ajax无法调用API。 – amoeba