module-menu-vue 0.0.32 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/Util/axios.js +12 -13
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import axios from 'axios';
|
|
|
2
2
|
import baseCof from './config';
|
|
3
3
|
import getStore from './userInfo';
|
|
4
4
|
import { checkToken} from './permessionUtils';
|
|
5
|
-
|
|
5
|
+
const DEFAULT_LOGOUT_URL = '/#/login'
|
|
6
6
|
let tokenValue = '574536b1-5832-417b-b909-82e204679d67';
|
|
7
7
|
|
|
8
8
|
axios.interceptors.response.use(
|
|
@@ -34,7 +34,7 @@ axios.interceptors.response.use(
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
console.log('=========', JSON.stringify(error.response))
|
|
37
|
-
return Promise.reject(error.response
|
|
37
|
+
return Promise.reject(error.response);
|
|
38
38
|
},
|
|
39
39
|
);
|
|
40
40
|
|
|
@@ -84,17 +84,16 @@ function Axios(method, api, params, map) {
|
|
|
84
84
|
};
|
|
85
85
|
console.log('httpDefult', JSON.stringify(httpDefult))
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
})
|
|
87
|
+
axios(httpDefult)
|
|
88
|
+
.then((res) => {
|
|
89
|
+
console.log('res: ', res)
|
|
90
|
+
localStorage.clear();
|
|
91
|
+
sessionStorage.clear();
|
|
92
|
+
window.location.href = DEFAULT_LOGOUT_URL;
|
|
93
|
+
})
|
|
94
|
+
.catch((err) => {
|
|
95
|
+
console.log('err: ', err)
|
|
96
|
+
});
|
|
98
97
|
}
|
|
99
98
|
|
|
100
99
|
export default Axios;
|