ajax请求报错:We're sorry but mff doesn't work properly without JavaScript enabled....

    今天我开发的时候遇到一个很抗人的问题

      ajax请求报错:We're sorry but mff doesn't work properly without JavaScript enabled. Please enable it to continue.

  ajax请求报错:We're sorry but mff doesn't work properly without JavaScript enabled...._第1张图片

   this.queryData(url, create)是一个请求接口的函数,url的create=2明明已经传了过来如下图:

 按理上是调用 第一个  url = `/srmperf/supPerfTemplate/queryPerfTemplateDetail?templateId=${supPerformanceId}` ,但是我一进来页面的就报错并且没有调用这个接口请求:

ajax请求报错:We're sorry but mff doesn't work properly without JavaScript enabled...._第2张图片

原因:

是因为我create是传了一个字符串类型,我用了“===”来严格判断,所以url=""传了过去,因为axios请求了一个空url就返回了首页:

 ajax请求报错:We're sorry but mff doesn't work properly without JavaScript enabled...._第3张图片

 

你可能感兴趣的:(ajax请求报错:We're sorry but mff doesn't work properly without JavaScript enabled....)