Explorar o código

fix: 优化errorHandler中对showType进行提示的逻辑

lanjianrong %!s(int64=4) %!d(string=hai) anos
pai
achega
05e73e1e64
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/app.tsx

+ 3 - 0
src/app.tsx

@@ -112,9 +112,11 @@ const errorHandler = error => {
         console.log('error', showType === ErrorShowType.ERROR_MESSAGE)
 
         message.error(errorMessage)
+        break
       case ErrorShowType.WARN_MESSAGE:
         console.log('warn', showType === ErrorShowType.WARN_MESSAGE)
         message.warn(errorMessage)
+        break
       case ErrorShowType.NOTIFICATION:
         console.log('noti', showType === ErrorShowType.NOTIFICATION)
         const title = consts.TOKEN_INVALID_CODE.includes(errorCode) ? '用户信息过期' : '请求失败'
@@ -122,6 +124,7 @@ const errorHandler = error => {
           message: title,
           description: errorMessage
         })
+        break
       default:
         break
     }