function showAlert()

in AliRTC2.5/Web/RtcSample/utils.js [70:82]


function showAlert(text,type,delay) {
    if(!text) return;
    var _type = type ?  "alert-" + type : "alert-success"
    var _delay = delay || 2500
    $(".alert").html(text).addClass(_type).show().delay(_delay).fadeOut("normal",() => {$(".alert").removeClass(_type)});
    if(_type === "warning"){
        console.warn(text)
    }else if(_type === "danger"){
        console.error(text)
    }else {
        console.log(text)
    }
}