lcw
This commit is contained in:
1096
src/utils/index.js
1096
src/utils/index.js
File diff suppressed because it is too large
Load Diff
@ -45,7 +45,7 @@ service.interceptors.response.use(
|
||||
// 需要判断当前请求是否成功
|
||||
if (success && code === 10000) {
|
||||
return data ? data : response.data; // 成功后返回解析后的数据
|
||||
} else if (code === 200 || code == "00000" || code == "10000" || msg == 'success' || model) {
|
||||
} else if (code === 200 || code == "00000" || code == "10000" || msg == 'success' || model || response.data.success == true) {
|
||||
return data ? data : response.data; // // 成功后返回解析后的数据
|
||||
} else if (code === 401) {
|
||||
store.dispatch('user/logout');
|
||||
|
||||
@ -1,14 +1,27 @@
|
||||
import path from "path";
|
||||
import { getItem } from '@/utils/storage'
|
||||
/*
|
||||
*获取所有的子集路由
|
||||
*/
|
||||
const getChildrenRoutes = (routes) => {
|
||||
const result = [];
|
||||
const { deptBizType, deptLevel } = getItem('deptId')[0]
|
||||
routes.forEach((route) => {
|
||||
if (route.children && route.children.length > 0) {
|
||||
result.push(...route.children);
|
||||
if (deptBizType == '23') {
|
||||
result.push(...route.children);
|
||||
} else {
|
||||
if (route.path == '/HumanIntelligence') {
|
||||
route.children.splice(0, 1);
|
||||
result.push(...route.children);
|
||||
} else {
|
||||
result.push(...route.children);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
console.log(result);
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user