From c8c18ece009bafdcac9ed73446d8c2d4fbbf3256 Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期三, 19 一月 2022 09:16:20 +0800 Subject: [PATCH] fixed TODO#134382 新增約訪紀錄: "defaultValue" is not defined error --- 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