whychdw
2019-08-31 74d8534a366850995e2403ebe4af58097eb67843
src/js/common_functions.js
@@ -100,35 +100,36 @@
}
function ajax(option) {
    bui.ajax({
        method: 'POST',
        async: true,
        url: CORS+option.url,
        data: option.data,
        dataType: 'json'
    }).then(function(res) {
        if(typeof(option.success) == 'function') {
            option.success(res);
        }
        if(typeof(option.complete) == 'function') {
            option.complete();
        }
    },
    function() {
        if(typeof(option.complete) == 'function') {
            option.complete();
        }
    });
    // $.ajax({
    //     type: 'post',
    // bui.ajax({
    //     method: 'POST',
    //     async: true,
    //     url: CORS+option.url,
    //     data: option.data,
    //     dataType: 'json',
    //     success: option.success,
    //     error: option.error,
    //     complete: option.complete
    //     needNative: true,
    // }).then(function(res) {
    //     if(typeof(option.success) == 'function') {
    //         option.success(res);
    //     }
    //     if(typeof(option.complete) == 'function') {
    //         option.complete();
    //     }
    // },
    // function() {
    //     if(typeof(option.complete) == 'function') {
    //         option.complete();
    //     }
    // });
    $.ajax({
        type: 'post',
        async: true,
        url: CORS+option.url,
        data: option.data,
        dataType: 'json',
        success: option.success,
        error: option.error,
        complete: option.complete
    });
}
//将秒转化成时:分:秒