Parcourir la source

Merge branch 'zhangtao' of gitadmin/tuoheng_lc_web into develop

tags/v1.0.0^2
zhangtao il y a 2 ans
Parent
révision
9951260011
1 fichiers modifiés avec 11 ajouts et 7 suppressions
  1. +11
    -7
      src/utils/http/interceptors.js

+ 11
- 7
src/utils/http/interceptors.js Voir le fichier

@@ -38,18 +38,15 @@ export function setupInterceptor(service) {
const { code } = response?.data
const { currentRoute } = router
switch (code) {
case -1:
$message.error(response.data.msg)
break
case 0:
if (method !== 'get') {
$message.success(response.data.msg)
}
break
case -1:
$message.error(response.data.msg)
break
case 10009:
$message.error(response.data.msg)
break
case 500:
case 400:
$message.error(response.data.msg)
break
case 401:
@@ -60,7 +57,14 @@ export function setupInterceptor(service) {
query: { ...currentRoute.query, redirect: currentRoute.path }
})
break
case 500:
$message.error(response.data.msg)
break
case 10009:
$message.error(response.data.msg)
break
default:
$message.error(response.data.msg)
break
}
return response?.data

Chargement…
Annuler
Enregistrer