module-menu-vue 0.0.11 → 0.0.13
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
|
@@ -95,38 +95,6 @@ export default {
|
|
|
95
95
|
}
|
|
96
96
|
return logoAndTitle;
|
|
97
97
|
},
|
|
98
|
-
/**
|
|
99
|
-
* 判断第三方服务是否有对应服务的菜单权限
|
|
100
|
-
* @param {*} authMenus
|
|
101
|
-
* @param {*} rootMenuPath
|
|
102
|
-
*/
|
|
103
|
-
judgeThirdPartyServiceIsHaveMenus (authMenus, rootMenuPath) {
|
|
104
|
-
let dsMenus = [];
|
|
105
|
-
if (
|
|
106
|
-
typeof authMenus !== "undefined" &&
|
|
107
|
-
authMenus !== null &&
|
|
108
|
-
authMenus.length > 0
|
|
109
|
-
) {
|
|
110
|
-
const rootMenus = authMenus.filter((item) => {
|
|
111
|
-
const { parentId, type, path } = item;
|
|
112
|
-
if (parentId === -1 && type === "3" && path === rootMenuPath) {
|
|
113
|
-
return true;
|
|
114
|
-
}
|
|
115
|
-
return false;
|
|
116
|
-
});
|
|
117
|
-
if (
|
|
118
|
-
rootMenus &&
|
|
119
|
-
Object.keys(rootMenus).length > 0 &&
|
|
120
|
-
rootMenus[0].children
|
|
121
|
-
) {
|
|
122
|
-
dsMenus = rootMenus[0].children;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
if (!dsMenus || dsMenus.length === 0) {
|
|
126
|
-
return false;
|
|
127
|
-
}
|
|
128
|
-
return true;
|
|
129
|
-
},
|
|
130
98
|
// 跳转各个模块
|
|
131
99
|
toModulePage (nameStr) {
|
|
132
100
|
console.log('nameStr', nameStr)
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
</template>
|
|
31
31
|
|
|
32
32
|
<script >
|
|
33
|
-
import Axios from '../Util/axios.js';
|
|
33
|
+
// import Axios from '../Util/axios.js';
|
|
34
|
+
import {logout} from '../Util/permessionUtils'
|
|
34
35
|
import {userMenuIcon} from './constant.js'
|
|
35
36
|
export default {
|
|
36
37
|
name: 'UserInfo',
|
|
@@ -59,7 +60,7 @@ export default {
|
|
|
59
60
|
} else if (flag === 'systerm') {
|
|
60
61
|
url = '/#/admin/user/index'
|
|
61
62
|
} else if (flag === 'logout') {
|
|
62
|
-
|
|
63
|
+
logout()
|
|
63
64
|
}
|
|
64
65
|
window.location.href = url;
|
|
65
66
|
},
|
|
@@ -70,18 +71,6 @@ export default {
|
|
|
70
71
|
}
|
|
71
72
|
return '';
|
|
72
73
|
},
|
|
73
|
-
// 退出登录
|
|
74
|
-
logout () {
|
|
75
|
-
Axios('delete','/auth/token/logout', '', {}).then(() => {
|
|
76
|
-
console.log('退出登录接口调用成功')
|
|
77
|
-
localStorage.clear();
|
|
78
|
-
sessionStorage.clear();
|
|
79
|
-
window.location.href = "/#/login";
|
|
80
|
-
}).catch((error) => {
|
|
81
|
-
console.error('Error while logging out, error:', error);
|
|
82
|
-
this.$message.error('服务器错误,请稍后重试');
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
74
|
}
|
|
86
75
|
}
|
|
87
76
|
</script>
|