http://www.cnblogs.com/wgl1995/p/6232027.html
目前针对拦截器vue的全局里面可以直接设置 相对来说比较方便
如果不涉及到兼容可以直接使用token
let token = jwt.encode(param,'dingshaohua',{
expiresIn: 60*60 // 24小时过期
});
$(document).ajaxStart(onStart)
.ajaxComplete(onComplete)
.ajaxSuccess(onSuccess);
function onStart(event) {
//.....
}
function onComplete(event, xhr, settings) {
//.....
}
function onSuccess(event, xhr, settings) {
//.....
}
.ajaxComplete(onComplete)
.ajaxSuccess(onSuccess);
function onStart(event) {
//.....
}
function onComplete(event, xhr, settings) {
//.....
}
function onSuccess(event, xhr, settings) {
//.....
}
emmm
下面是比较着急要换的导航了