You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

从Vue 2升级至Vue 3后,应用在Firefox中无法正常运行

Vue中Axios请求始终返回Promise错误
  • 发起Axios请求时控制台出现错误
  • 存在对应错误日志

Vue实例可正常创建,但调用Axios请求获取数据时始终返回Promise错误。

相关代码如下:

fetchReports(body) {    
  const inst = axios.create();    
  store.state.currentListing = 'RecentReportListing';    
  this.interceptRequest(inst, "setMyReportsInProgressStatus");    
  this.interceptResponse(inst, "setMyReportsCompleteStatus");    
  return inst      
    .post(this.baseUrl() + "getReports", body, {        
      headers: getAppConfig().headers      
    })      
    .then(response => {        
      return response.data;      
    })      
    .catch(error => {        
      this.logHttpException(this.url, "getReports", error);      
    });  
},

已尝试的排查步骤:

  • 移除废弃的babel/polyfill库,改用core-js和runtime,问题仍未解决
  • 相同代码在Chrome和Edge浏览器中可正常运行

内容的提问来源于stack exchange,提问作者RESHAM SRIVASTAVA

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.02 07:18:10