jacky_008
jacky_008
  • 发布:2015-11-05 15:56
  • 更新:2015-11-05 15:56
  • 阅读:1286

请求接口怎么回调到里面

分类:MUI
mui
(function($, doc) {  
    $.init();  
    $.ready(function() {  
        //-----------------------------------------  
        //                  //级联示例  
        var cityPicker3 = new $.PopPicker({  
            layer: 3,  
        });  
        cityPicker3.setData();  
        var showCityPickerButton = doc.getElementById('showCityPicker3');  
        var cityResult3 = doc.getElementById('cityResult3');  
        var setAddress = doc.getElementById('set_add');  
        showCityPickerButton.addEventListener('tap', function(event) {  
            cityPicker3.show(function(items) {  
                setAddress.style.display = 'none';  
                cityResult3.innerText = (items[0] || {}).text + " " + (items[1] || {}).text + " " + (items[2] || {}).text;  
                //返回 false 可以阻止选择框的关闭  
                //return false;  
            });  
        }, false);  
    });  
})(mui, document);  
$.ajax(getInfoUrl, {  
    data: {  
        userId: userId,  
        token: token  
    },  
    dataType: 'json', //服务器返回json格式数据  
    type: 'get', //HTTP请求类型  
    timeout: 10000, //超时时间设置为10秒;  
    success: function(data) {  
        console.log(data)  
    },  
    error: function(xhr, type, errorThrown) {  
        //异常处理;  
        console.log(type);  
    }  
});

我下的AJAX怎么能回到那个 .setData();数据里面呢

2015-11-05 15:56 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复