This commit is contained in:
2023-12-12 16:49:30 +08:00
parent 26033219af
commit 4daf5f80a8
2 changed files with 23 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
import axios from 'axios'
// import { Dialog } from './utils.js'
import { Dialog } from './utils.js'
import store from '../vuex/store'
import router from '@/router'
import i18n from '../i18n/i18n'
@@ -37,6 +37,7 @@ axios.interceptors.response.use(
if (error && error.response) {
switch (error.response.status) {
case 400:
Dialog(error.message)
break
case 401:
store.dispatch('setSignOut')
@@ -57,7 +58,7 @@ export const post = (sevmethod, params) => {
resolve(response.data)
}, error => {
// Dialog(error.message)
reject(error.message)
reject(error)
})
.catch((error) => {
reject(error)