lanjianrong 3 년 전
부모
커밋
04812b605c
3개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 2 2
      src/app.tsx
  2. 2 2
      src/locales/zh-CN/request.ts
  3. 1 1
      src/pages/Role/Hr/index.tsx

+ 2 - 2
src/app.tsx

@@ -127,7 +127,7 @@ export const request: RequestConfig = {
       const errorInfo = errorAdaptor(resData, ctx)
       if (resData.code !== consts.RET_CODE.SUCCESS) {
         // 抛出错误到 errorHandler 中处理
-        const error: RequestError = new Error(errorInfo.errorMessage)
+        const error: ResponseError = new Error(errorInfo.errorMessage)
         error.name = 'BizError'
         error.data = resData
         error.info = errorInfo
@@ -157,7 +157,7 @@ export const request: RequestConfig = {
 
       if (res?.code !== consts.RET_CODE.SUCCESS) {
         // 抛出错误到 errorHandler 中处理
-        const error: RequestError = new Error(errorInfo.errorMessage)
+        const error: ResponseError = new Error(errorInfo.errorMessage)
         error.name = 'BizError'
         error.data = resData
         error.info = errorInfo

+ 2 - 2
src/locales/zh-CN/request.ts

@@ -15,5 +15,5 @@ export default {
   'app.request.500': '服务器发生错误,请检查服务器。',
   'app.request.502': '网关错误。',
   'app.request.503': '服务不可用,服务器暂时过载或维护。',
-  'app.request.504': '网关超时。',
-};
+  'app.request.504': '网关超时。'
+}

+ 1 - 1
src/pages/Role/Hr/index.tsx

@@ -204,7 +204,7 @@ const Hr = () => {
                       fieldProps={{
                         onChange(checked) {
                           if (!checked) {
-                            formRef.current?.setFieldsValue({ department: [] })
+                            formRef.current?.setFieldsValue({ employee: [] })
                           }
                         }
                       }}