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