axios get请求中文乱码
我尝试修改过header
axios.get(url,{headers:{Accept:'/'}})
以及
headers: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
无法解决问题
解决办法:
const {data: res} = await this.$http.get(
encodeURI('/dean/arrange/version/status?'
+ 'openYear=' + this.openYear
+ '&semester=' + this.semester
+ '&versionId=' + this.id
),
);
还可以选着在axios拦截器中使用 encodeURI