1.在vue项目中使用以下两种:
document.addEventListener(..);
setInterval
为了避免全局,一定要在生命周期的beforeDestroy中销毁
2.axios post请求后台接收不到参数问题
let config={'headers':{'content-Type':'application/x-www-form-urlencoded'}};
var params = new URLSearchParams();
params.append('imageName', '123.jpg');
this.$http.post("url",params,config)
https://github.com/axios/axios#using-applicationx-www-form-urlencoded-format