errorPernission page
This commit is contained in:
parent
87f3209073
commit
24374ab8f2
3 changed files with 33 additions and 1 deletions
|
|
@ -32,7 +32,8 @@ http.interceptors.response.use(
|
|||
if (typeof error !== undefined) {
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
if (error.hasOwnProperty("response")) {
|
||||
if (error.response.status === 401 || error.response.status === 403) {
|
||||
if (error.response.status === 403) {
|
||||
window.location.href = "/error";
|
||||
// Store.commit("SET_ERROR_MESSAGE", error.response.data.message);
|
||||
// Store.commit("REMOVE_ACCESS_TOKEN")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ const MainLayout = () => import("@/views/MainLayout.vue");
|
|||
const Dashboard = () => import("@/modules/01_dashboard/views/Dashboard.vue");
|
||||
const Error404NotFound = () => import("@/views/Error404NotFound.vue");
|
||||
const loginMain = () => import("@/views/login.vue");
|
||||
const ErrorPermission = () => import("@/views/ErrorPermission.vue");
|
||||
|
||||
import ModuleTransfer from "@/modules/02_transfer/router";
|
||||
import ModuleRetire from "@/modules/03_retire/router";
|
||||
|
|
@ -38,6 +39,11 @@ const router = createRouter({
|
|||
Key: [7],
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/error",
|
||||
name: "errorPermission",
|
||||
component: ErrorPermission,
|
||||
},
|
||||
|
||||
...ModuleTransfer,
|
||||
...ModuleRetire,
|
||||
|
|
|
|||
25
src/views/ErrorPermission.vue
Normal file
25
src/views/ErrorPermission.vue
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<script setup lang="ts"></script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="bg-white text-center q-pa-md flex flex-center"
|
||||
style="height: 90vh"
|
||||
>
|
||||
<div>
|
||||
<div class="text-h3">
|
||||
<q-icon name="mdi-alert-outline" color="red" /> ไม่พบข้อมูลที่ต้องการ
|
||||
</div>
|
||||
|
||||
<q-btn
|
||||
class="q-mt-xl"
|
||||
color="primary"
|
||||
text-color="white"
|
||||
to="/"
|
||||
label="กลับหน้าหลัก"
|
||||
no-caps
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue