module-menu-vue 0.0.36 → 0.0.38
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
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
-
import
|
|
2
|
+
import baseCof from './config';
|
|
3
|
+
import getStore from './userInfo';
|
|
3
4
|
import { checkToken } from './permessionUtils';
|
|
4
5
|
let tokenValue = '574536b1-5832-417b-b909-82e204679d67';
|
|
5
6
|
axios.interceptors.response.use(
|
|
@@ -71,9 +72,12 @@ axios.interceptors.request.use(
|
|
|
71
72
|
|
|
72
73
|
function Axios(method, url) {
|
|
73
74
|
|
|
74
|
-
let httpDefult
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
let httpDefult;
|
|
76
|
+
// 几个外部特殊接口
|
|
77
|
+
// 退出登录
|
|
78
|
+
httpDefult = {
|
|
79
|
+
method: method,
|
|
80
|
+
url: `${baseCof.baseSever}${url}`,
|
|
77
81
|
};
|
|
78
82
|
console.log('httpDefult', httpDefult)
|
|
79
83
|
return new Promise((resolve, reject) => {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* 获取认证相关的localStorage/SessionStorage
|
|
3
|
+
*/
|
|
4
|
+
function getStore(params) {
|
|
2
5
|
let { name } = params;
|
|
3
6
|
const { debug } = params;
|
|
4
7
|
const keyName = 'bigdata-';
|
|
@@ -28,6 +31,7 @@ export const getStore = (params) => {
|
|
|
28
31
|
}
|
|
29
32
|
return content;
|
|
30
33
|
}
|
|
34
|
+
export default getStore;
|
|
31
35
|
|
|
32
36
|
export const getUserName = () => {
|
|
33
37
|
const userInfo = getStore({ name: 'userInfo' });
|
|
@@ -43,4 +47,4 @@ export const getUserId = () => {
|
|
|
43
47
|
return userInfo.id;
|
|
44
48
|
}
|
|
45
49
|
return '';
|
|
46
|
-
};
|
|
50
|
+
};
|