因为我们是mac开发。当时就忘记测试了ie 在ie9+浏览器的表现是 没有任何报错。。
就是接不到接口数据。
接口有数据并且发出请求有返回值
// 添加响应拦截器 response请求
fetch.interceptors.response.use(
function(response) {
// 对响应数据做点什么
if (typeof response === 'string') {
response = JSON.parse(response)
}
我怀疑是response 问题 加了拦截器转换没有用..
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 = '无数据'
}
} else {
console.log('接口返回失败,错误码:' + res.data.code)
}
})
},
在ie上看到的效果就是
还没有报错...
求大神指导
我也是这样,请问你解决了这个问题嘛?