let m = { pay(data,fn){ fn.success(); console.log(typeof fn.success == 'function') console.log(typeof fn.fail) console.log(typeof fn.cancel) } } m.pay(1,{ success:()=>{ console.log('success'); } })