Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f054dd54a4 |
1 changed files with 10 additions and 2 deletions
|
|
@ -362,13 +362,21 @@ export const useCounterMixin = defineStore("mixin", () => {
|
|||
const messageError = (q: any, e: any = "", msg: string = "") => {
|
||||
if (e.response !== undefined) {
|
||||
if (e.response.data.status !== undefined) {
|
||||
if (e.response.data.status == 401) {
|
||||
if (
|
||||
e.response.data.status == 401 ||
|
||||
(e.response.data.status == 404 &&
|
||||
e.response.data.message == "ไม่พบข้อมูลสิทธิ์")
|
||||
) {
|
||||
//invalid_token
|
||||
const msg =
|
||||
e.response.data.status == 401
|
||||
? "ล็อกอินหมดอายุ กรุณาล็อกอินใหม่อีกครั้ง"
|
||||
: e.response.data.message;
|
||||
q.dialog({
|
||||
component: CustomComponent,
|
||||
componentProps: {
|
||||
title: `พบข้อผิดพลาด`,
|
||||
message: `ล็อกอินหมดอายุ กรุณาล็อกอินใหม่อีกครั้ง`,
|
||||
message: msg,
|
||||
icon: "warning",
|
||||
color: "red",
|
||||
onlycancel: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue