DataConfig = function (){

}
DataConfig.urlFun = "/exhibition/detail?number=2&";
DataConfig.getAllData = function (id,callback){
    var data = {
        "id":id
    };
    let url = DataConfig.urlFun+"id="+id
    if (ignoreVisit == "1") {
        url += "&ignore_visit=1"
    }
    Request.sendMessage(url, (res)=>{
        if(res){
            console.log("success")
            if(callback){
                callback(res);
            }
        }
    })
}
Request.sendMessage = function (url, onSuccess) {
    var objValue = {type: 'get',url: url,timeout : 1000, dataType:'json',contentType: "application/json;charset=UTF-8",
        success: function (response) {
            if(response != null){
                if(onSuccess){
                    onSuccess(response);
                }
            }
        },
        error:function (XMLHttpRequest, textStatus) {
            console.log(XMLHttpRequest)
            onSuccess(null);
        }
    };
    $.ajax(objValue);
}
