From f284035d9725911d5f9bf2c3fbfbbeb61c3e97b9 Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期三, 22 十二月 2021 15:43:27 +0800 Subject: [PATCH] Merge branch 'master' of https://192.168.0.10:8443/r/pcalife/PAM --- PAMapp/shared/services/httpClient.ts | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/PAMapp/shared/services/httpClient.ts b/PAMapp/shared/services/httpClient.ts index 531eda2..e524ddf 100644 --- a/PAMapp/shared/services/httpClient.ts +++ b/PAMapp/shared/services/httpClient.ts @@ -1,7 +1,8 @@ import { AxiosRequestConfig, AxiosError, AxiosResponse} from 'axios'; -import ErrorMessageBox from '../errorService'; import axios from 'axios'; import _ from 'lodash'; + +import messageBoxService from './message-box.service'; const notRequireInterceptorErrorUrl = [ '/otp/verify', @@ -59,13 +60,13 @@ if (!_.includes(notRequireInterceptorErrorUrl, error.config.url)) { switch (error.response.status) { case 401: - Promise.all([ErrorMessageBox('���暹��'), window.$nuxt.$store.dispatch('localStorage/actionStorageClear')]).then(() => { + Promise.all([messageBoxService.showErrorMessage('���暹��'), window.$nuxt.$store.dispatch('localStorage/actionStorageClear')]).then(() => { _.isEqual(window.$nuxt.$route.name, 'index') ? location.reload() : window.$nuxt.$router.push('/'); }); break; default: - ErrorMessageBox('', error); + messageBoxService.showErrorMessage('', error); break; } } -- Gitblit v1.8.0