xhr 首先动态绑定指定的xhr对象 xhr.abort() axios const CancelToken = axios.CancelToken; const source = CancelToken.source(); axios.get("http://url",{ cancelToken: source.token }).then(res=>{ if (res&&res.code==="SUCCESS"){ return } }) source.cancel();