js引用axios异步请求 首先下载axios源码,github可下。然后采用script标签引入即可使用。下面为最简单的使用 axios({ method: 'get', url: custom_const.backend.project_path+'/common/config/dispatcher', //地址 params:sendData //参数 //data:{} //post }).then((res)=>{ //成功后的逻辑 }).catch((error)=>{ //失败后的逻辑 console.log(error); });