鍍金池/ 問答/HTML/ axios IE9+下數(shù)據(jù)接收不正常

axios IE9+下數(shù)據(jù)接收不正常

因為我們是mac開發(fā)。當時就忘記測試了ie 在ie9+瀏覽器的表現(xiàn)是 沒有任何報錯。。
就是接不到接口數(shù)據(jù)。
接口有數(shù)據(jù)并且發(fā)出請求有返回值

// 添加響應(yīng)攔截器 response請求
fetch.interceptors.response.use(
  function(response) {
    // 對響應(yīng)數(shù)據(jù)做點什么
    if (typeof response === 'string') {
      response = JSON.parse(response)
    }

我懷疑是response 問題 加了攔截器轉(zhuǎn)換沒有用..

import 'es6-promise/auto'
import Vue from 'vue'
import App from './App'
import router from './router

main.js里面也加入了es6-promise 的兼容

getUpdateUserInfo() {
      api.getUserInfoApi().then(res => {
        if (res.data.code === ERR_OK) {
          this.userinfo = res.data.data
          if (this.userinfo.birthday == '0000-00-00') {
            this.userinfo.birthday = new Date().getTime()
          }
          this.isShow = true
          this.setCityList(this.userinfo.places.top)
          if (this.userinfo.places.son == 0) {
            this.userinfo.places.son = '無數(shù)據(jù)'
          }
        } else {
          console.log('接口返回失敗,錯誤碼:' + res.data.code)
        }
      })
    },

在ie上看到的效果就是
clipboard.png
還沒有報錯...
求大神指導(dǎo)

回答
編輯回答
墻頭草

ie兼容跨域問題

2018年6月14日 00:07
編輯回答
詆毀你

如果有跨域訪問的話,可能IE下需要多個p3p頭

2017年10月9日 07:26
編輯回答
晚風(fēng)眠

應(yīng)該是跨域問題,你看看 結(jié)果是不是走的.catch()
圖片描述

2018年9月17日 21:25
編輯回答
不歸路

我也是這樣,請問你解決了這個問題嘛?

2017年8月29日 02:32
編輯回答
墻頭草

拒絕ie (嚴肅臉)

2017年2月21日 01:46
編輯回答
陌上花

遇到一樣的問題,polyfill也都加了,爆炸

2017年11月3日 16:22
編輯回答
心沉
 api.getUserInfoApi().then(res => {
console.log(res) //加這一句,先打出來看看,是什么東西
        if (res.data.code === ERR_OK) {
2017年1月13日 01:38