@@ -5,7 +5,7 @@ | |||
<link rel="icon" type="image/svg+xml" href="/logo_1.jpg" /> | |||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |||
<title>后台管理系统</title> | |||
<script type="module" crossorigin src="/assets/index-GHos7aRt.js"></script> | |||
<script type="module" crossorigin src="/assets/index-fDuc1V1b.js"></script> | |||
<link rel="stylesheet" crossorigin href="/assets/index-7KXeZgtg.css"> | |||
</head> | |||
<body> |
@@ -41,7 +41,7 @@ instance.interceptors.response.use(function (response) { | |||
window.location.reload(); | |||
router.replace('/login'); | |||
case 403: | |||
message.warning(response.data.msg); | |||
// message.warning(response.data.msg); | |||
break; | |||
case 600: | |||
if(response.data.errors) { | |||
@@ -82,7 +82,6 @@ export const httpPost : Function = (url : string, data : object, cb : Function) | |||
const resData = res; | |||
typeHelper.isFunction(cb) && cb(resData); | |||
}).catch(err => { | |||
console.log(err) | |||
// cb(err.response) | |||
}) | |||
} |
@@ -42,7 +42,6 @@ import { Model } from 'node_modules/echarts/index'; | |||
// }); | |||
router.beforeEach((to, from, next) => { | |||
document.title = `${to.meta.title} - 菊城人才市场后台管理`; | |||
if (!sessionStorage.getItem('token')) { | |||
if (to.matched.length > 0 && !to.matched.some(record => record.meta.requiresAuth)) { | |||
next() |
@@ -3,8 +3,9 @@ import { useAsRouter } from '@/hooks/useAsRouter'; | |||
import { routesModuleList } from '@/router/dynamic'; | |||
import { LayoutRoute } from '@/router/routes'; | |||
import { GetUserMenulist } from '@/apis/models'; | |||
import { message } from 'ant-design-vue'; | |||
const { routerDynamic, routerAdd, routerInit } = useAsRouter(); | |||
const { routerDynamic, routerAdd, routerInit, routerTo } = useAsRouter(); | |||
export interface PermissionState { | |||
@@ -49,12 +50,21 @@ const actions = { | |||
routerAdd(LayoutRoute); | |||
let initialRoutes = routerInit(); | |||
commit('SET_PERMISSION', [...initialRoutes]); | |||
} catch { | |||
} catch(err) { | |||
console.log(err) | |||
message.error(err.data.msg, 3, onClose); | |||
debugger | |||
} | |||
} | |||
}; | |||
const onClose = () => { | |||
debugger | |||
sessionStorage.clear(); | |||
routerTo('/login') | |||
window.location.reload() | |||
} | |||
const pushItem = (item : Object) => { | |||
state.arrresult.push({action:item.action, name:item.name}) | |||
if (item.childs) { |
@@ -30,7 +30,7 @@ | |||
let { store, commomParams, showModal } = useCommon(); | |||
let loading = ref<Boolean>(true); | |||
onMounted(() => { | |||
getData(commomParams.value.search); | |||
getData(); | |||
}) | |||
const searchData = (data : object) => { |
@@ -29,8 +29,6 @@ | |||
watch(() => props.search_params, (newVal) => { | |||
emit('searchData', commomParams.value.search) | |||
}, { | |||
immediate: true | |||
}) | |||
const getData = () => { |