<input class="form-control xitem" autocomplete="off" oninput="fnInputStfinfo(this)" name="stfQymc" xtype="text" type="text" value="">
var timer = undefined, fnAjax = undefined
function fnInputStfinfo(ele){
let name = $(ele).val()
if(timer) {
fnAjax = function (){
fnGetQyList(name, fnRender)
}
}else{
fnGetQyList(name, fnRender)
}
}
function fnGetQyList(name, callback){
timer = true
let delay = Math.random().toFixed(2)*2500 + 500
console.log('get>>>>name', name, delay);
setTimeout(()=>{
callback&&callback('name参数:'+name+'返回了')
}, delay)
}
function fnRender(data) {
console.log(data, 'HHHHHHH', fnAjax);
timer = undefined
fnAjax&&fnAjax()
fnAjax = undefined
}